[GH-ISSUE #604] Multiple characters appear on client for single key press #474

Open
opened 2026-05-05 06:29:48 -06:00 by gitea-mirror · 16 comments
Owner

Originally created by @IPWright83 on GitHub (Mar 31, 2020).
Original GitHub issue: https://github.com/debauchee/barrier/issues/604

Operating Systems

Server: Windows 10 Pro x64 v1903
Client: Ubuntu x64 18.04.4 LTS

Barrier Version

Server: Version: 2.3.2-snapshot-210c2b70
Client: Version: 2.3.2-snapshot-9080ce45

Steps to reproduce bug

When typing (haven't seen this with mouse) on occasion a single press of the keyboard will result in multiple key strokes on the client (typically 4/5). This is intermittent. It happens with a range of keys on a mechanical keyboard so I'm confident it's not a sticky key/me accidentally double pressing.

Other info

This has happen since install, obviously deleting the characters resolves the problem, it's more of an annoyance. It also happened with Synergy (I replaced it with Barrier once I'd discovered it).

Happy to capture some verbose logs if that's helpful.

Originally created by @IPWright83 on GitHub (Mar 31, 2020). Original GitHub issue: https://github.com/debauchee/barrier/issues/604 ### Operating Systems ### Server: Windows 10 Pro x64 v1903 Client: Ubuntu x64 18.04.4 LTS ### Barrier Version ### Server: Version: 2.3.2-snapshot-210c2b70 Client: Version: 2.3.2-snapshot-9080ce45 ### Steps to reproduce bug ### When typing (haven't seen this with mouse) on occasion a single press of the keyboard will result in multiple key strokes on the client (typically 4/5). This is intermittent. It happens with a range of keys on a mechanical keyboard so I'm confident it's not a sticky key/me accidentally double pressing. ### Other info ### This has happen since install, obviously deleting the characters resolves the problem, it's more of an annoyance. It also happened with Synergy (I replaced it with Barrier once I'd discovered it). Happy to capture some verbose logs if that's helpful.
Author
Owner

@IcFlyer commented on GitHub (Apr 2, 2020):

I have exactly the same setup - and exactly the same problem
Would also add that there is an occasional lag - where client doesn't respond to key press for a short period (perhaps a second or 2) before catching up

<!-- gh-comment-id:607723464 --> @IcFlyer commented on GitHub (Apr 2, 2020): I have exactly the same setup - and exactly the same problem Would also add that there is an occasional lag - where client doesn't respond to key press for a short period (perhaps a second or 2) before catching up
Author
Owner

@bkqtnte10 commented on GitHub (Apr 22, 2020):

I have a similar setup and the same problem.

Operating Systems:
Server: Manjaro 19.0.2
Client: Ubuntu 18.04.4 LTS

Barrier Version
Server: Version: 2.3.2-RELEASE-00000000 (?)
Client: Version: 2.3.2-snapshot-9080ce45

I have the lag for mouse also.
I have a ping running between the two computers and can not find anything abnormal.

<!-- gh-comment-id:617880622 --> @bkqtnte10 commented on GitHub (Apr 22, 2020): I have a similar setup and the same problem. Operating Systems: Server: Manjaro 19.0.2 Client: Ubuntu 18.04.4 LTS Barrier Version Server: Version: 2.3.2-RELEASE-00000000 (?) Client: Version: 2.3.2-snapshot-9080ce45 I have the lag for mouse also. I have a ping running between the two computers and can not find anything abnormal.
Author
Owner

@berglh commented on GitHub (Apr 23, 2020):

Similar issue on Ubuntu server and client:

Version: 2.3.1+dfsg-1ubuntu1

I get mouse lag and repeating characters on input. One of the machines is cabled, the other is on quite fast WiFi 802.11ac on a dedicated AP for this device.

Interestingly, I've noticed the double input problem also occurring on the server, just not as frequently. It's like it locks the last input on the server and repeats it. I'm not sure if this is happening during the mouse lag events.

<!-- gh-comment-id:618162093 --> @berglh commented on GitHub (Apr 23, 2020): Similar issue on Ubuntu server and client: Version: 2.3.1+dfsg-1ubuntu1 I get mouse lag and repeating characters on input. One of the machines is cabled, the other is on quite fast WiFi 802.11ac on a dedicated AP for this device. Interestingly, I've noticed the double input problem also occurring on the server, just not as frequently. It's like it locks the last input on the server and repeats it. I'm not sure if this is happening during the mouse lag events.
Author
Owner

@amerlyq commented on GitHub (May 29, 2020):

Very similar to #269

<!-- gh-comment-id:635963442 --> @amerlyq commented on GitHub (May 29, 2020): Very similar to #269
Author
Owner

@deters commented on GitHub (Jul 30, 2020):

This is happening due to lag in the connection, probably due to using wifi network.

My workaround to this is to keep the wifi connection always active by sending a constant rate of data between server and client.

In my server (linux) I'm opening a tcp port using netcat:
nc -l 5555

In my client (also linux) I'm connecting to this open port and sending a "." to it every 50 ms:
while [ 1 ]; do sleep 0.05; echo .; done | nc SERVER_IP 5555

My mouse also is much more smooth now.

I think there should be a keep_alive option in barriers... if enabled, a dummy package should be sent to the client every N ms in such a way the wifi connection would keep always open, avoiding any lag.

<!-- gh-comment-id:666527148 --> @deters commented on GitHub (Jul 30, 2020): This is happening due to lag in the connection, probably due to using wifi network. My workaround to this is to keep the wifi connection always active by sending a constant rate of data between server and client. In my server (linux) I'm opening a tcp port using netcat: nc -l 5555 In my client (also linux) I'm connecting to this open port and sending a "." to it every 50 ms: while [ 1 ]; do sleep 0.05; echo .; done | nc SERVER_IP 5555 My mouse also is much more smooth now. I think there should be a keep_alive option in barriers... if enabled, a dummy package should be sent to the client every N ms in such a way the wifi connection would keep always open, avoiding any lag.
Author
Owner

@IPWright83 commented on GitHub (Aug 3, 2020):

@deters I've had to abandon barrier unfortunately as it was just too unreliable for me - but for me both devices were using Ethernet direct to the Router at the time over a distance < 10m.

<!-- gh-comment-id:667920837 --> @IPWright83 commented on GitHub (Aug 3, 2020): @deters I've had to abandon barrier unfortunately as it was just too unreliable for me - but for me both devices were using Ethernet direct to the Router at the time over a distance < 10m.
Author
Owner

@deters commented on GitHub (Aug 28, 2020):

@IPWright83

Despite my previosly mentioned hack, I was still experiencing lag and repeating keys in my setup, mostly when doing network intensive operations.

I completely fixed the issue by upgrading my setup to gigabit ethernet.

<!-- gh-comment-id:683158464 --> @deters commented on GitHub (Aug 28, 2020): @IPWright83 Despite my previosly mentioned hack, I was still experiencing lag and repeating keys in my setup, mostly when doing network intensive operations. I completely fixed the issue by upgrading my setup to gigabit ethernet.
Author
Owner

@skorokithakis commented on GitHub (Sep 11, 2020):

I experience the same problem between two Linux machines with Gigabit ethernet on one and 5GHz wifi on the other.

<!-- gh-comment-id:691117878 --> @skorokithakis commented on GitHub (Sep 11, 2020): I experience the same problem between two Linux machines with Gigabit ethernet on one and 5GHz wifi on the other.
Author
Owner

@benreyn commented on GitHub (Dec 1, 2020):

Im experiencing this issue as well. The interesting bit is that it never (anecdotally) happens on my macOS client, but does happen on my Linux client.

<!-- gh-comment-id:736856214 --> @benreyn commented on GitHub (Dec 1, 2020): Im experiencing this issue as well. The interesting bit is that it _never_ (anecdotally) happens on my macOS client, but does happen on my Linux client.
Author
Owner

@glymph commented on GitHub (Mar 25, 2021):

I've been experiencing this issue with a mac OS 10.14.6 host and Ubuntu 18.04.5 LTS and mac OS 10.14.6 guests; restarting the wifi on the Mac seems to help, and increasing the keyboard repeat threshold on Ubuntu also seems to reduce the frequency of the problem occurring:
xset r rate 1000 100
This command only applies to the terminal, of course, so I'd need to make a similar change in the system settings.
Connecting through an ssh tunnel seems to work better, but that's not possible as far as I'm aware in my setup having two external systems.

<!-- gh-comment-id:806544876 --> @glymph commented on GitHub (Mar 25, 2021): I've been experiencing this issue with a mac OS 10.14.6 host and Ubuntu 18.04.5 LTS and mac OS 10.14.6 guests; restarting the wifi on the Mac seems to help, and increasing the keyboard repeat threshold on Ubuntu also seems to reduce the frequency of the problem occurring: xset r rate 1000 100 This command only applies to the terminal, of course, so I'd need to make a similar change in the system settings. Connecting through an ssh tunnel seems to work better, but that's not possible as far as I'm aware in my setup having two external systems.
Author
Owner

@morganhein commented on GitHub (Jan 6, 2022):

I am also encountering this issue.

Arch Linux Host 5.15.3-arch1-1
MBP Big Sur 11.6.1
Barriers 2.4.0

Computers are sitting next to each other, using wired GigE on a local switch (like 5 foot runs).

I personally feel like the MBP is crap, and often has network issues in general, so some kind of latency/lack of ACK from the MBP in a timely fashion seems like a plausible explanation in my case... Regardless, it's very annoying!

If there's some log I can provide to track this down i'd be happy to provide.

Cheers and thanks for the software!

<!-- gh-comment-id:1006763253 --> @morganhein commented on GitHub (Jan 6, 2022): I am also encountering this issue. Arch Linux Host 5.15.3-arch1-1 MBP Big Sur 11.6.1 Barriers 2.4.0 Computers are sitting next to each other, using wired GigE on a local switch (like 5 foot runs). I personally feel like the MBP is crap, and often has network issues in general, so some kind of latency/lack of ACK from the MBP in a timely fashion seems like a plausible explanation in my case... Regardless, it's very annoying! If there's some log I can provide to track this down i'd be happy to provide. Cheers and thanks for the software!
Author
Owner

@synthead commented on GitHub (Jul 7, 2022):

I'm encountering this issue, too. Windows 10 server, Arch Linux client. Version 2.4.0 on both.

<!-- gh-comment-id:1177473934 --> @synthead commented on GitHub (Jul 7, 2022): I'm encountering this issue, too. Windows 10 server, Arch Linux client. Version 2.4.0 on both.
Author
Owner

@rayanfer32 commented on GitHub (Oct 12, 2022):

Same problem here , its a deal breaker 😢
Server: Windows 8
Client: Ubuntu 22.0
Barrier: 2.4.0
Connection: LAN

Workaround:
Using Windows as Client is working OP , cheers!

<!-- gh-comment-id:1275892135 --> @rayanfer32 commented on GitHub (Oct 12, 2022): Same problem here , its a deal breaker :cry: Server: Windows 8 Client: Ubuntu 22.0 Barrier: 2.4.0 Connection: LAN Workaround: Using Windows as Client is working OP , cheers!
Author
Owner

@thiagohdeplima commented on GitHub (Jan 24, 2023):

I was facing the same problem, until that I turned on the option Check clients every and get it solved.

image

I realize it after read the @deters comment, so, thank you soo much for your tip man! :D

Server: Arch Linux
Client: Arch Linux
Barrier: 2.4.0 (both server and client)
Connection: LAN (Wi-Fi)

<!-- gh-comment-id:1402090224 --> @thiagohdeplima commented on GitHub (Jan 24, 2023): I was facing the same problem, until that I turned on the option _Check clients every_ and get it solved. ![image](https://user-images.githubusercontent.com/357059/214328527-33a6cb68-c818-49a2-9db6-dfc1ae9b1244.png) I realize it after read the @deters comment, so, thank you soo much for your tip man! :D Server: Arch Linux Client: Arch Linux Barrier: 2.4.0 (both server and client) Connection: LAN (Wi-Fi)
Author
Owner

@SquareWhite commented on GitHub (Dec 17, 2023):

Getting the same issues with the following setup:
Server: Kubuntu 22.04
Client: Fedora 39 (Gnome x11)
Barrier: 2.4.0 (flatpak)

Machines are connected via ethernet directly, so it looks like this shouldn't be a network issue. Neither switching the option to "Check clients every 1000ms", nor the solution proposed by @deters seem to work.

<!-- gh-comment-id:1859262380 --> @SquareWhite commented on GitHub (Dec 17, 2023): Getting the same issues with the following setup: Server: Kubuntu 22.04 Client: Fedora 39 (Gnome x11) Barrier: 2.4.0 (flatpak) Machines are connected via ethernet directly, so it looks like this shouldn't be a network issue. Neither switching the option to "Check clients every 1000ms", nor the solution proposed by @deters seem to work.
Author
Owner

@nverwer commented on GitHub (Sep 11, 2024):

I have the same problem, on Barriers, but also on Synergy 1 and Synergy 3.
Server: Windows 10 Barrier 2.4.0
Client: Linux Mint 22 Cinnamon Barier 2.4.0

The machines are connected via ethernet and a switch. Setting "check clients every 1000 ms" did not work.

It looks like the key-down event has the wrong key code, and the key-up event is not received, which triggers auto-repeat.

<!-- gh-comment-id:2344026934 --> @nverwer commented on GitHub (Sep 11, 2024): I have the same problem, on Barriers, but also on Synergy 1 and Synergy 3. Server: Windows 10 Barrier 2.4.0 Client: Linux Mint 22 Cinnamon Barier 2.4.0 The machines are connected via ethernet and a switch. Setting "check clients every 1000 ms" did not work. It looks like the key-down event has the wrong key code, and the key-up event is not received, which triggers auto-repeat.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#474
No description provided.