[GH-ISSUE #269] Keyboard stutters #217

Open
opened 2026-05-05 05:42:32 -06:00 by gitea-mirror · 11 comments
Owner

Originally created by @AverageGuy on GitHub (Mar 14, 2019).
Original GitHub issue: https://github.com/debauchee/barrier/issues/269

Operating Systems

Server: Mint Mate 18
Client: Mint Mate 19

Barrier Version

1.9.0

Steps to reproduce bug

Start typing, sooner or latter you will type a letter, number, punctuation or space and magically 2 or more of them will appear. It's fairly intermittent. I typed only one t in "later", for instance.

Other info

  • When did the problem start to occur? After I installeddd barrier on both systems from source.
  • Is there a way to work around it? No, other than using the backspace key.
  • Does this bug prevent you from using Barrier entirely? No
    Put anything else you can think of here.
    It affects anything you aree typing into. This bug, a terminal window, Vim instance, are exampllles of where it happens, and no I'm not holding the key down. I'm a touch typiist and get on/off the keys pretty fast.
Originally created by @AverageGuy on GitHub (Mar 14, 2019). Original GitHub issue: https://github.com/debauchee/barrier/issues/269 ### Operating Systems ### Server: Mint Mate 18 Client: Mint Mate 19 ### Barrier Version ### 1.9.0 ### Steps to reproduce bug ### Start typing, sooner or latter you will type a letter, number, punctuation or space and magically 2 or more of them will appear. It's fairly intermittent. I typed only one t in "later", for instance. ### Other info ### * When did the problem start to occur? After I installeddd barrier on both systems from source. * Is there a way to work around it? No, other than using the backspace key. * Does this bug prevent you from using Barrier entirely? No Put anything else you can think of here. It affects anything you aree typing into. This bug, a terminal window, Vim instance, are exampllles of where it happens, and no I'm not holding the key down. I'm a touch typiist and get on/off the keys pretty fast.
Author
Owner

@AverageGuy commented on GitHub (Mar 14, 2019):

All works OK on the server. No stuttering. I replaced synergy with barrieer but never saw it with synerrgy. The client is a new machine running Mate 19 annd I was unable to get synergy to run on it. Incompatible versions it said. That's why I am runniiing barrier....
I didn't type but onnnnne period.

<!-- gh-comment-id:473023312 --> @AverageGuy commented on GitHub (Mar 14, 2019): All works OK on the server. No stuttering. I replaced synergy with barrieer but never saw it with synerrgy. The client is a new machine running Mate 19 annd I was unable to get synergy to run on it. Incompatible versions it said. That's why I am runniiing barrier.... I didn't type but onnnnne period.
Author
Owner

@AdrianKoshka commented on GitHub (Mar 15, 2019):

Are you trying to use barrier over wifi?

<!-- gh-comment-id:473419988 --> @AdrianKoshka commented on GitHub (Mar 15, 2019): Are you trying to use barrier over wifi?
Author
Owner

@AverageGuy commented on GitHub (Mar 17, 2019):

Both systems are connected to a gigabit swiiiitch via ethernet.

<!-- gh-comment-id:473669279 --> @AverageGuy commented on GitHub (Mar 17, 2019): Both systems are connected to a gigabit swiiiitch via ethernet.
Author
Owner

@AverageGuy commented on GitHub (Oct 9, 2019):

At a different location, I have the same issue. Mint 19 on one machine, Mint 18 on the other. The only difference is the master is running 19 at this location. The original problem exists when the master is on 18. Stuttering is on the slave in both cases.

<!-- gh-comment-id:540188837 --> @AverageGuy commented on GitHub (Oct 9, 2019): At a different location, I have the same issue. Mint 19 on one machine, Mint 18 on the other. The only difference is the master is running 19 at this location. The original problem exists when the master is on 18. Stuttering is on the slave in both cases.
Author
Owner

@evantandersen commented on GitHub (Dec 2, 2019):

I also have this problem. I have a VFIO setup, and I use barrier to share the mouse between OSes. The server runs on linux, and the guest is either windows 10 or another linux instance. The stuttering is ONLY present on the linux guest, windows works fine. In both cases, the machines are connected through a virtualized 10gbit link, so I highly doubt this is a networking issue.

<!-- gh-comment-id:560327350 --> @evantandersen commented on GitHub (Dec 2, 2019): I also have this problem. I have a VFIO setup, and I use barrier to share the mouse between OSes. The server runs on linux, and the guest is either windows 10 or another linux instance. The stuttering is ONLY present on the linux guest, windows works fine. In both cases, the machines are connected through a virtualized 10gbit link, so I highly doubt this is a networking issue.
Author
Owner

@evantandersen commented on GitHub (Jan 27, 2020):

Does anyone have any information on this? The stutters can be quite long for me (several seconds). If I happened to be pressing a key while editing code, it will mess up what I'm editing. This happens multiple times per hour. Luckily I can ctrl-z, but it breaks my flow.

It's really funny when it gets stuck on backspace and deletes 10+ lines of code :)

Is there a bug bounty for this repo anywhere? I could easily donate $100 for this to be fixed!

<!-- gh-comment-id:578558199 --> @evantandersen commented on GitHub (Jan 27, 2020): Does anyone have any information on this? The stutters can be quite long for me (several seconds). If I happened to be pressing a key while editing code, it will mess up what I'm editing. This happens multiple times per hour. Luckily I can ctrl-z, but it breaks my flow. It's really funny when it gets stuck on backspace and deletes 10+ lines of code :) Is there a bug bounty for this repo anywhere? I could easily donate $100 for this to be fixed!
Author
Owner

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

TL;DR: use xset r off on client.

BET:DEV: fix barrier(1) client code to disable autorepeat on XTest simulated keys (only simulated by it itself).

I use latest version barrier with ArchLinux PC -> ArchLinux Laptop over home router 5G wifi.
I strongly suspect the root problem lays in "X11 autorepeat" feature working both on server and client.
Barrier sends keydown and keyup events separately, and if network latency becomes more than autorepeat trigger on client -- it will result in wrong autorepeat. It's easy to verify:

  • use xset r rate 80 20 on client to observe the issue on almost each keypress
  • use xset r off -- and issue on client is gone.

There is no need to disable autorepeat on server -- its events will propagate to client and "simulate" autorepeat there. If they are not propagated (another bug?) then you can increase autorepeat rate to be above your network latency: xset r rate 800 50

<!-- gh-comment-id:635969393 --> @amerlyq commented on GitHub (May 29, 2020): TL;DR: use `xset r off` on client. BET:DEV: fix barrier(1) client code to disable autorepeat on XTest simulated keys (only simulated by it itself). I use latest version barrier with `ArchLinux PC -> ArchLinux Laptop` over home router 5G wifi. I strongly suspect the root problem lays in "X11 autorepeat" feature working *both* on server and client. Barrier sends keydown and keyup events separately, and if network latency becomes more than autorepeat trigger on client -- it will result in wrong autorepeat. It's easy to verify: * use `xset r rate 80 20` on client to observe the issue on almost each keypress * use `xset r off` -- and issue on client is gone. There is no need to disable autorepeat on server -- its events will propagate to client and "simulate" autorepeat there. If they are not propagated (another bug?) then you can increase autorepeat rate to be above your network latency: `xset r rate 800 50`
Author
Owner

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

Unfortunately, that's not the problem. The mouse always freezes along with the keyboard input.

<!-- gh-comment-id:636188004 --> @evantandersen commented on GitHub (May 29, 2020): Unfortunately, that's not the problem. The mouse always freezes along with the keyboard input.
Author
Owner

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

This bug looks like a duplicate of #617 which is fixed in #679.

<!-- gh-comment-id:636193231 --> @p12tic commented on GitHub (May 29, 2020): This bug looks like a duplicate of #617 which is fixed in #679.
Author
Owner

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

Probably wifi lag... barrier could reduce this by implementing a "keep_alive" option: sending dummy packets at a constant rate to the client in order to keep wifi module active.

My current workaround:

starting netcat in the server:
nc -l 5555

using netcat in the client to send a "." to the server every 50ms:
while [ 1 ]; do sleep 0.05; echo .; done | nc 192.168.1.190 5555

<!-- gh-comment-id:666680175 --> @deters commented on GitHub (Jul 30, 2020): Probably wifi lag... barrier could reduce this by implementing a "keep_alive" option: sending dummy packets at a constant rate to the client in order to keep wifi module active. My current workaround: starting netcat in the server: nc -l 5555 using netcat in the client to send a "." to the server every 50ms: while [ 1 ]; do sleep 0.05; echo .; done | nc 192.168.1.190 5555
Author
Owner

@evantandersen commented on GitHub (Dec 5, 2021):

This was fixed (at least for me) by #679

<!-- gh-comment-id:986177716 --> @evantandersen commented on GitHub (Dec 5, 2021): This was fixed (at least for me) by #679
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#217
No description provided.