Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Mouse is jumping #300

Open
domske opened this issue May 7, 2019 · 79 comments
Open

[Bug] Mouse is jumping #300

domske opened this issue May 7, 2019 · 79 comments
Labels
bug Something isn't working macOS Related to macOS windows Related to Microsoft Windows

Comments

@domske
Copy link

domske commented May 7, 2019

Bug Report

The mouse is jumping if moved from rest. No problem when I move it continuously.
But if you wait between movements (just a few milliseconds / < second), the mouse jumps.
It's like it sleeps immediately, as soon as she stops moving.

See screen record:
screenrecord

Reproduce:
Move the mouse back and forth. While she has come to a complete halt for a moment.

This is very annoying. I expected a smooth movement. This is not possible if the mouse awakes delayed and jumps to position.
Maybe this is a wanted behavior to hibernate the transmission. If so, the timeout time should be increased to a minute or a few seconds.

Version

Server: Windows 10 Home (2.2.0)
Client: Mac OS X High Sierra (2.10) (Issue)

Any questions? I am glad to help.

@AdrianKoshka AdrianKoshka added bug Something isn't working macOS Related to macOS windows Related to Microsoft Windows labels May 7, 2019
@noisyshape
Copy link

Would I be correct in assuming that you're connecting over wifi? And that one or both systems have a power saving feature enabled? A mitigation for this might be sending dummy packets for a while after mouse movement.

@domske
Copy link
Author

domske commented May 8, 2019

Yes, both devices are connected via WiFi in same network on a router. Do you mean, using LAN will not have this problem?...

@AdrianKoshka
Copy link

Do you mean, using LAN will not have this problem?...

It's entirely possible, I was tired when I saw this issue, but thanks for @noisyshape for pointing out the possible WiFi problem. In my experience with WiFi and barrier, things do seem latent. I'm not going to say it will fix your issue, but if you could try to reproduce this over ethernet, it'd be appreciated.

@mrwensveen
Copy link

I also have this issue when I'm connected over WiFi. It's not consistent, though. Sometimes everything is silky smooth and sometimes not. I think it might depend on how much the network is utilized (it definitely seems worse when the kids are home and streaming video etc.)

@AdrianKoshka
Copy link

New release, unlikely it fixes this issue, but I thought I'd bring it up: https://github.com/debauchee/barrier/releases/tag/v2.3.0

@maliesa96
Copy link

I had this issue. Decreasing the polling frequency on my mouse fixed it.

@tinybot-ca
Copy link

tinybot-ca commented Mar 1, 2020

I recall this being an issue with Synergy way back in the day -- and connecting my client machine (Macbook Pro laptop) via Ethernet got around it. Now, many years later, this still seems to be an issue on Wi-Fi? I suppose I can dig up an ethernet dongle -- but would love for a solution that would work for Wi-Fi.

Update: I connected my MacBook Pro to ethernet via dongle, and sure enough, this lagging/stuttering/jumping went completely away. If you do this, don't forget to stop and reload Barrier to pick-up and use the IP address used by your ethernet connection.

@pinei
Copy link

pinei commented Aug 7, 2020

It seems to perform better over 5 Ghz Wifi than 2 Ghz

@mrpew
Copy link

mrpew commented Oct 28, 2020

Bug still relevant, I get frequent mouse stuttering/jumping between two Ubuntu Systems connected via Ethernet with a sub 1ms ping.

Sometimes happens occasionally (e.g. every 10-30 seconds) sometimes constantly (Unusable until barrier process is killed or direct input on the client is given).

While its happening, using the keyboard does not work either.

Happens with both the v2.3.3 release tag as well as the current master branch.

@fiftyfathoms
Copy link

This bug affects me too. Kubuntu host 18.04.5, Windows 10 guest. It's strange that everything used work just fine for months and all of a sudden the mouse pointer started to show extreme stutters today.

@Skrimpton
Copy link

Skrimpton commented Nov 16, 2020

I have the same issue on one manjaro nibia 20.2 client.

Mouse also stops even with continous movement.

It is not an issue (at all) on a clean-installed Manjaro minimal nibia 20.2 laptop, where both share a windows 10 host.

The client with the bug is an upgraded system, that has been in use for about 6/7 months, with several "extra" apps installed.

The bug occurs with both a wireless logitech g602 mouse and a wired hp M-BT96a. Keyboard (logitech k350 wireless) is also affected, but with less noticable lag.

Added: Host pc uses a wired connection, whereas both clients are connected via WI-FI.

Second addition: Seems like rebooting into a "fresh" session fixed whatever was causing the issue for me. Also forgot to add I am running KDE Plasma on both clients.

Sorry if this then is a divergent/different issue, but leaving the comment for others to delete if neccesary

@clankill3r
Copy link

Same issue with 10.14.6. Ethernet cable made it better, but that's not really an option for me.

@fiftyfathoms
Copy link

An update to my previous comment:
After also checking Synergy and experiencing the same issue, I changed the the wifi band of my router from 2.4 to 5 GHz and the issue seems to be gone. I had switched off the 5 GHz channel long before, mainly due to the rather long distance between my computer and the router. Apparently even slight change in the position of the router helps a great deal with the transmission performance of the signal.

@ishridharhegde
Copy link

I still have this issue using Windows 10 -> Linux Lite connected over wifi.
Many of you have suggested to switch to 5GHz band but my router does not have that band!
Is there any other fixes that any of you have found?

When I am using Windows 10 -> Windows 10, Mouse Without Borders works flawlessly !

@hungerregnuh
Copy link

For my setup:

  • Client is a MBP (Catalina and Big Sur)
  • Linux Mint as my server and had no issues
  • I'm now running it as a server on a MBP (Big Sur) and this is when i noticed the mouse jumping issue.

What ultimately fixed it for me was getting my multi-display issue fixed. Anyone running a MBP with multi-display knows how finicky OSX has been lately with them. I have a 3 display setup and getting the third display to be stable was key. Once i got the third display to stop reconnecting the mouse jumping issue went away. Even when i don't have the third display connected the mouse jumps. I suspect barrier, OSX or both are "remembering" the third display even though it's not connected and is causing the mouse to jump around as something is constantly changing the actual width of my desktops.

not sure if this helps, hope it does.

@hungerregnuh
Copy link

Not a fix, but it works - i also found out that if you enable the double tap edge to switch, the mouse doesn't jump around anymore, not as convenient sure - but works.

@leonardssh
Copy link

Has anyone solved this problem? (🟦Windows > 🐧Ubuntu) 😊

@bbook1997
Copy link

bbook1997 commented Mar 5, 2021

Running Windows 10 Pro 10.0.19041 Build on two PC's. Connected via wireless for months now.
Running Barrier 2.3.3-release-f2bf7cb7 without any issues during all this time except for one time with mouse became sluggish on client. Restarting the server fixed it. Been running fine for weeks since then.
Suddenly, yesterday, the mouse has become very choppy on the client. I've rebooted both server and client twice since then, and it is still the same. I tried @hungerregnuh 's workaround, but that didn't help. I've tried changing the port used, but that hasn't helped. Logging is not turned on. Over 100GB available on all disk drives.
Would love to get some ideas on how to fix it.

I believe it is related to the fact that I have been doing a lot of testing using applications that talk to each other over the same network, and yesterday I had them sending tons of messages back and forth. But that test is not running now, and after rebooting, I had hoped it would clear out whatever is causing the delays, but nothing has helped so far.

Edit:
After uninstalling on both client and server and reinstalling, it now runs smoothly again.

@harveyr
Copy link

harveyr commented Apr 20, 2021

I just had this problem for the first time. Host is macOS, client is Ubuntu. The problem seemed to coincide with a large-ish Google Meet on the client machine, which I assume caused a lot of network activity. More troubling than the mouse choppiness was the keyboard activity. It acted like keys were sticking on the client machine. So I'd try to type "Hello" and end up with "Hhhhhhhhhhheloooooooooo."

The problem persisted after the meeting ended. I tried restarting both client and server to no avail. I used the Reload button and hadn't tried manually restarting the processes yet. But just as I arrived here to write this, the problem went away. 🤷

Edit: This might be my issue #679

@noveltomatillo8
Copy link

I'm having this same issue for the first time on my client. Host and client are both W10, WiFi host, ethernet client. The (wireless) mouse cursor lags and skips around for 1-5 seconds every 5-10 seconds no matter what speed I move the cursor but keyboard is totally fine. Switching mice didn't make a difference. Did a clean reinstall of Barrier on both machines to no avail. I only have one band on my router, so changing that isn't an option.

Worked perfectly for a month or so, but now randomly seeing this issue with no changes to either machine that I can think of. Any idea if this is just an underlying bug, or did any fix make a lasting difference?

@bbook1997
Copy link

Somewhat off topic, but I switched over to "Mouse Without Boarders" from Microsoft. And so far, I've had very little problem with it. Only once when I had heavy internet traffic did the mouse start lagging, but a quick disconnect / reconnect fixed it immediately. Also, I had a lot of problems with Barrier connecting my two computers together. Sometimes having to fiddle with things for several minutes. I've had zero issues with MWB connecting the two PC's together. Also, it's a 2-way connection, so I can use either mouse or keyboard. All in all, much better experience on Windows 10

@intositeme
Copy link

Somewhat off topic, but I switched over to "Mouse Without Boarders" from Microsoft. And so far, I've had very little problem with it. Only once when I had heavy internet traffic did the mouse start lagging, but a quick disconnect / reconnect fixed it immediately. Also, I had a lot of problems with Barrier connecting my two computers together. Sometimes having to fiddle with things for several minutes. I've had zero issues with MWB connecting the two PC's together. Also, it's a 2-way connection, so I can use either mouse or keyboard. All in all, much better experience on Windows 10

Thanks for the share! Was connecting 2 Windows 10 systems, one on LAN and another on Wifi, and had the jumpy/laggy mouse on the client system. Tried "Mouse Without Boarders" and it didn't have the same kind of lag.

@jwallet
Copy link

jwallet commented May 4, 2021

I'm still following this thread, but I found out it was better for me to be connected by LAN instead of wirelessly (WAN). I'm sure I will always have issues on wifi because my laptop only connects to the 2.4gHz network, and I also tried to have everything on the same desk (pc (wired), laptop (wifi), router) and I still got issues.

2.4gHz frequency band network can have their beacon signal interfered by many stuff in your house that use this same frequency, like appliances, like microwave or the router next door or even your cellphone, unlike 5gHz that have less interference. However 5gHz are easily stop by walls, so they reach less far than 2.4gHz band network.

It might not be what cause your problem, though.
But, if someone wants to try out the app using 5.gHz band network, that would be nice.

@clankill3r
Copy link

I don't think people realize how fast computers are. You don't need 5gHz in order to send the mouse position 60 times a second.

@jwallet
Copy link

jwallet commented May 31, 2021

No but, like I said, you need a steady connection, I did not talk about the speed, but interference. I'm talking about shitty home router or having too many stuff interfering on your network, that may lower the quality of your wireless signal randomly. I want this software to be accurate at all time, not dropping for a second every 15 minutes or so.

@idenc
Copy link

idenc commented Jun 10, 2021

Even on a 5gHz network, it stutters for me. Only solution was to use LAN

@aboode95
Copy link

To make barrier work over wifi, disable wifi power management:

Run:

sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

This conf file contains:

[connection]
wifi.powersave = 3

change the value to '2'. And reboot.

These instruction are from here.

Big thanks to @noisyshape for mentioning it is a wifi power saving feature issue!

(I am using a laptop with ralink 3090 card. Pretty troublesome card I must say)

@MisutaaAsriel
Copy link

MisutaaAsriel commented Dec 18, 2022

@itsCaveMan's suggestion to decrease the client check period worked to reduce the lag but it's not gone.

The PC client is hardwired but the MacBook Air is on 5GHz Wi-Fi. The lag is also really intermittent.

I'm not entirely sure what may be causing it in my cases. — Changing the ethernet adapter's power saving options helped a little too, though.

@glantucan
Copy link

glantucan commented Dec 19, 2022

I can confirm that in my case, both server and client being linux (pop_os! 22.04) and both conneted through Wi-Fi, disabling power saving for the Wi-Fi solved the issue completely.
Steps to disable Wi-Fi power saving:

  • Edit /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf as root.
    sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
    
  • Change wifi.powersave = 3 to wifi.powersave = 2
  • Run systemctl restart NetworkManager

@draeder
Copy link

draeder commented Dec 19, 2022

I added port 28400 to my WiFi router's QoS and gave it highest priority. I then also configured the Barrier server's advanced settings to check clients every 5000 ms. The two together seems to alleviate my issues. However, I've had false positives on a fix for this in the past.

What I found by inspecting the network traffic is that the packets are being retransmitted when the lag occurs. They are TCP packets, which in my opinion is the wrong traffic type for this application. To me, it should be UDP which is better suited for real-time streaming data.

@annetimdegraaf
Copy link

I'm running the latest barrier on a Mac Mini and a Windows 11 laptop. The Mac Mini is the server. Both are connected with ethernet to the same switch. Mouse warps like crazy on the Windows 11 Client. Tried everything from this list. Disable Airdrop, disable Relative Mouse, and enabled. Changed the "Check client every 1000ms". Nothing helps. The Windows 11 client just won't work like it should. Wished it was a WiFi problem but in my case, this is not the fix.

@aryansaurav
Copy link

I'm running the latest barrier on a Mac Mini and a Windows 11 laptop. The Mac Mini is the server. Both are connected with ethernet to the same switch. Mouse warps like crazy on the Windows 11 Client. Tried everything from this list. Disable Airdrop, disable Relative Mouse, and enabled. Changed the "Check client every 1000ms". Nothing helps. The Windows 11 client just won't work like it should. Wished it was a WiFi problem but in my case, this is not the fix.

I am also using it on Mac Mini and Windows PC. The way it worked for me was to run barrier in server mode on the Mac and client mode on Windows. You may have to specify the server's IP on the Windows PC but sometimes it may get detected automatically.

I didn't need any other trick. But at the same time, the other way (running server on Windows and client on Mac) never works at all. Hope this helps!

@annetimdegraaf
Copy link

I'm running the latest barrier on a Mac Mini and a Windows 11 laptop. The Mac Mini is the server. Both are connected with ethernet to the same switch. Mouse warps like crazy on the Windows 11 Client. Tried everything from this list. Disable Airdrop, disable Relative Mouse, and enabled. Changed the "Check client every 1000ms". Nothing helps. The Windows 11 client just won't work like it should. Wished it was a WiFi problem but in my case, this is not the fix.

I am also using it on Mac Mini and Windows PC. The way it worked for me was to run barrier in server mode on the Mac and client mode on Windows. You may have to specify the server's IP on the Windows PC but sometimes it may get detected automatically.

I didn't need any other trick. But at the same time, the other way (running server on Windows and client on Mac) never works at all. Hope this helps!

Thanks for helping me! I use the Mac Mini as server. Still warps on my client computer. So same setup but the with problems on my end. The connection between the two works, that is not the problem. It's just not stable on the client side.

@minimask
Copy link

Thought disabling Airdrop fixed it for me, but the problem came back. I read on the Synergy site that it's a known Apple bug that Apple isn't prioritizing to fix. More info here.

@draeder
Copy link

draeder commented Jan 12, 2023

@minimask I have had this problem with all Synergy-based vKVMs between every OS I've ever tried to use them on. It has been this way for over a decade. I do not believe this is a problem with a particular OS. TCP should really not be used for realtime data. There is a reason multiplayer FPS games use UDP.

@MisutaaAsriel
Copy link

@minimask I have had this problem with all Synergy-based vKVMs between every OS I've ever tried to use them on. It has been this way for over a decade. I do not believe this is a problem with a particular OS. TCP should really not be used for realtime data. There is a reason multiplayer FPS games use UDP.

Not only that, but Synergy says it's an issue primarily effecting Mac clients, but for myself, and I'm sure many others, we're running the server from our Mac.

After all, which is more likely to be ran partially "headless" (handless?) — A desktop PC with no mouse or keyboard, nestled in the corner of the living room plugged in to a TV? Or your expensive fruit-company laptop that you can throw in a bag and take with you everywhere?

it's based on an assumption that users prefer PC, which says no one is really quite testing their software the other direction.

@minimask
Copy link

@MisutaaAsriel yes, I'm also running both the client and the server on two M1 Macs.

@draeder
Copy link

draeder commented Jan 16, 2023

@minimask @mishmishb
I've run it between mac <-> windows, windows <-> linux, mac <-> linux, with the server on both sides of all three and all three had the same issues. Since at least 2009.

@minimask
Copy link

@draeder does it happen only over Wifi? I'm not close to my router so could not test it via ethernet.

@draeder
Copy link

draeder commented Jan 17, 2023

@minimask Unfortunately, I'm in the same boat. I did try a local switch some years ago and it didn't make a difference if I recall correctly. At that time it was windows <-> windows.

@vjpr
Copy link

vjpr commented Jan 31, 2023

Anyone notice this is a new issue?

I'm running macOS (server - macbook) -> Windows 10 (client - 2nd macbook bootcamp).

I haven't used Barrier for a couple of months, but I remember it being really smooth and flawless.

I was using Mac to Mac recently with Universal Control and so had to enable AirDrop, etc.

Maybe Universal Control or some recent mac update it causing it.

@draeder
Copy link

draeder commented Feb 16, 2023

I've been able to confirm a reliable workaround for macOS (server) -> Windows 10 (client). It isn't a permanent workaround, but when the issue crops up it does seem to be fairly reliable.

Mac:

  1. Stop Barrier
  2. From System Preferences, choose Network > WiFi
  3. Click Turn WiFi Off
  4. Click Advanced
  5. Click Hardware
  6. Change the Configure dropdown from Automatically to Custom
  7. Click OK
  8. Click Apply
  9. Turn WiFi On
  10. Repeat these steps but change the Configure dropdown from Custom back to Automatically
  11. Start Barrier

This seems to work for me every time the issue crops up. The steps are tedious but not as tedious as the mouse jumping all over and keystrokes being delayed.

Please report your mileage with this.

@lk251
Copy link

lk251 commented Feb 19, 2023

I've been able to confirm a reliable workaround for macOS (server) -> Windows 10 (client). It isn't a permanent workaround, but when the issue crops up it does seem to be fairly reliable.

Mac:

  1. Stop Barrier
  2. From System Preferences, choose Network > WiFi
  3. Click Turn WiFi Off
  4. Click Advanced
  5. Click Hardware
  6. Change the Configure dropdown from Automatically to Custom
  7. Click OK
  8. Click Apply
  9. Turn WiFi On
  10. Repeat these steps but change the Configure dropdown from Custom back to Automatically
  11. Start Barrier

This seems to work for me every time the issue crops up. The steps are tedious but not as tedious as the mouse jumping all over and keystrokes being delayed.

Please report your mileage with this.

this solved the issue but after my mac, the server, went to sleep, the client, a win11 pc, started having the issue again.

how to solve this permamently? it didn't happen until today, i had been using barrier with no issues for a few days before this.

@draeder
Copy link

draeder commented Feb 20, 2023

this solved the issue but after my mac, the server, went to sleep, the client, a win11 pc, started having the issue again.

how to solve this permamently? it didn't happen until today, i had been using barrier with no issues for a few days before this.

Unfortunately, there is no permanent fix. It has been an issue since at least 2009 and appears that it will never be solved. It's so bad, I have been looking into writing my own mouse and keyboard sharing software.

@Congles
Copy link

Congles commented Mar 27, 2023

I just installed Barrier and ran into this issue with a Mac -> Windows hardware setup.

enabling "Switch after waiting" in the Advanced Server settings area fixed this issue entirely for me.

The minimum setting seems to be 25ms and is an almost entirely unnoticeable delay. I wonder if the Dev's could look at this as a potential fix - perhaps by having a check box "Fix mouse jumping (enable if you have trouble with mouse teleports)" and this might set the value internally to 5ms.

@lk251
Copy link

lk251 commented Apr 6, 2023

this solved the issue but after my mac, the server, went to sleep, the client, a win11 pc, started having the issue again.
how to solve this permamently? it didn't happen until today, i had been using barrier with no issues for a few days before this.

Unfortunately, there is no permanent fix. It has been an issue since at least 2009 and appears that it will never be solved. It's so bad, I have been looking into writing my own mouse and keyboard sharing software.

thanks for the heads up. if you do write it, please do share a link here, i'd love to try it!

@PrafulDhungana
Copy link

I don't know if i could call this an actual solution but, when I plug in my client side laptop there are no stutters, and when I pull the plug the mouse stutters are back.
Windows 7 Desktop Host and Windows 10 Laptop client.

@draeder
Copy link

draeder commented May 5, 2023

The minimum setting seems to be 25ms and is an almost entirely unnoticeable delay. I wonder if the Dev's could look at this as a potential fix - perhaps by having a check box "Fix mouse jumping (enable if you have trouble with mouse teleports)" and this might set the value internally to 5ms.

This appears to have greatly reduced the delay I was experiencing (notably I was able to lower this all the way to 10ms). It still happens, but not to the degree where it happens every half second (or less) with the delay sometimes happening for 1-2 seconds over minutes to hours at a time.

@mikbuch
Copy link

mikbuch commented Jun 2, 2023

I just installed Barrier and ran into this issue with a Mac -> Windows hardware setup.

enabling "Switch after waiting" in the Advanced Server settings area fixed this issue entirely for me.

The minimum setting seems to be 25ms and is an almost entirely unnoticeable delay. I wonder if the Dev's could look at this as a potential fix - perhaps by having a check box "Fix mouse jumping (enable if you have trouble with mouse teleports)" and this might set the value internally to 5ms.

Amazing, this solution helped me to with Mac as a server and (an older) Mac as a client. Although this did not resolved the problem entirely, the lagging is now acceptable.

Btw., here is how to access advanced Barrier settings: #232 (comment)

@rayanfer32
Copy link

I can confirm that in my case, both server and client being linux (pop_os! 22.04) and both conneted through Wi-Fi, disabling power saving for the Wi-Fi solved the issue completely. Steps to disable Wi-Fi power saving:

  • Edit /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf as root.
    sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
    
  • Change wifi.powersave = 3 to wifi.powersave = 2
  • Run systemctl restart NetworkManager

Thank you , I was using windows 8 as host and ubuntu 22 laptop as client , and this solution solved the multiple keystrokes issue and mouse lag

@akayuki39
Copy link

I am using a mac as sever and a win as client in a 5G WIFI environment. It used to work well but I found the mouse become jumpy and laggy today.
Eventually find the reason is that my old mac's WIFI is not working well. Disable and enable the WIFI switch on my mac solve this problem. Hope this helps.

@Henriquex25
Copy link

Posso confirmar que no meu caso, tanto o servidor quanto o cliente sendo Linux (pop_os! 22.04) e ambos conectados via Wi-Fi, desabilitar a economia de energia para o Wi-Fi resolveu o problema completamente. Etapas para desativar a economia de energia do Wi-Fi:

  • Edite /etc/NetworkManager/conf.d/default-wifi-powersave-on.confcomo root.
    sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
    
  • Mudar wifi.powersave = 3parawifi.powersave = 2
  • Corrersystemctl restart NetworkManager

This solved my problem!!! Thankss

W11 > Pop_OS 22.04

@gregwidener
Copy link

I'm using Windows 11 as the server and a Steam Deck OLED as the client. I had the jumpy mouse issue and went through the entire thread and tried every trick as far as settings go. None of that worked. What worked for me was disabling wifi power savings on the Steam Deck, which I found in another forum. You have to go to Settings -> System -> Enable Developer Options. Once that is enabled, Developer Options are at the bottom of Settings. Go in there and disable Wifi Power Savings, which requires a restart. 100% fixed it for me! Looks like the issue is power savings on the wifi adapter across multiple versions of Linux/Unix/Mac OS X.

@ekoleszar
Copy link

An update to my previous comment: After also checking Synergy and experiencing the same issue, I changed the the wifi band of my router from 2.4 to 5 GHz and the issue seems to be gone. I had switched off the 5 GHz channel long before, mainly due to the rather long distance between my computer and the router. Apparently even slight change in the position of the router helps a great deal with the transmission performance of the signal.

That worked for me thank you very much!

@kr1surb4n
Copy link

Start from the network settings.
Check your router first. You might have some default settings which mess up the connection.
i.e.

  • my new router had the long preamble on by default -> the packets contain additional error correction data and are bigger, short preamble fixed the issue.
  • the 5GHz can solve the issue too, as it can send more data per unit of time
  • you might have also some sort of packet filtering
    After network check your system. You might also change which machine is the server and the client.
    If nothing works revert to cable.

@xortuna
Copy link

xortuna commented Apr 13, 2024

This issue purely stems from WIFI's power saving modes.

If you are on Mac no option exists to change the WIFI power saving feature,

Instead you have to utilise the connection constantly to stop it going into power save mode, apple is VERY aggressive with their power saving, if a packet hasn't been sent in 200ms it'll power save and introduce a 300ms delay before the adapter will even begin acknowledge packets again.

To solve this simply ping your server every 200ms and it will reset the timeout and prevent the wifi adapter going into powersave, and eliminate the lag completely.
ping [YourServerIp] -i 0.20

@xtremextr
Copy link

Finally fixed this problem on my end, ironically by a completely unrelated reason - buying a new mouse.

I'm using Barrier with Windows 11 as server x Linux Mint as client
Mouse stuttering was unbearable, I had to move it very slowly and steadily to have no stuttering.

Both are laptops using the same Wi-Fi network, tried everything listed here before, deactivated every power saving configs available on both laptops, tried 5ghz, everything set for performance, no solution.

While searching for a new mouse I came to understand Polling Rate, which is the update frequency of the mouse towards the pc.
If you have a good mouse, set for 500hz+ (in my case it was set for 1ms - 1000hz), this is the problem.

As soon as I set my Polling Rate to 4ms (250hz) or 8ms (125hz), the problem was gone.
Anything above this, the Wi-Fi simply can't take it and the mouse starts stuttering on the virtual screen.

This was mentioned once on this topic and I remember trying it through regedit without really understanding why.
Turns out I either 1. didn't reboot after changing for testing, or 2. Regedit couldn't override my mouse's hardware-saved config.

Hopefully this helps anyone going through this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS Related to macOS windows Related to Microsoft Windows
Projects
None yet
Development

No branches or pull requests