[GH-ISSUE #1043] Cursor jumps to the exact middle of primary display on macOS #827

Open
opened 2026-05-05 07:11:21 -06:00 by gitea-mirror · 19 comments
Owner

Originally created by @LukasMojzis on GitHub (Jan 29, 2021).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1043

Describe the bug
A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Go to non macOS screen
  2. Go back to macOS screen
  3. Cursor jumps to the exact middle of primary display on macOS

Expected behavior
Mouse cursor appears near the edge, as if it passed from screen to screen

Desktop (please complete the following information):

  • OS: macOS 10.15.7 & Windows 10
  • Barrier version: 2.3.3
Originally created by @LukasMojzis on GitHub (Jan 29, 2021). Original GitHub issue: https://github.com/debauchee/barrier/issues/1043 **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to non macOS screen 2. Go back to macOS screen 3. Cursor jumps to the exact middle of primary display on macOS **Expected behavior** Mouse cursor appears near the edge, as if it passed from screen to screen **Desktop (please complete the following information):** - OS: macOS 10.15.7 & Windows 10 - Barrier version: 2.3.3
Author
Owner

@hungerregnuh commented on GitHub (Feb 2, 2021):

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.

<!-- gh-comment-id:771648764 --> @hungerregnuh commented on GitHub (Feb 2, 2021): 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.
Author
Owner

@LukasMojzis commented on GitHub (Feb 9, 2021):

I did have that enabled at the time of filing this bug report. I believe this might have something to do when the macOS is used as a server. For now I am using duo of keyboards and mice again, until I buy a KVM switch that supports keyboard shortcut switching.

<!-- gh-comment-id:775962973 --> @LukasMojzis commented on GitHub (Feb 9, 2021): I did have that enabled at the time of filing this bug report. I believe this might have something to do when the macOS is used as a server. For now I am using duo of keyboards and mice again, until I buy a KVM switch that supports keyboard shortcut switching.
Author
Owner

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

I have noticed this on my setup as well although it's somewhat inconsistent. My best guess is that my Mac display (server) is a 1440p ultrawide and my Windows display is 1080p so maybe there's some weird coordinate translation happening? That wouldn't explain the inconsistent behavior though

<!-- gh-comment-id:807001111 --> @stephensilber commented on GitHub (Mar 25, 2021): I have noticed this on my setup as well although it's somewhat inconsistent. My best guess is that my Mac display (server) is a 1440p ultrawide and my Windows display is 1080p so maybe there's some weird coordinate translation happening? That wouldn't explain the inconsistent behavior though
Author
Owner

@thedaneeffect commented on GitHub (Sep 18, 2021):

I've got the same issue except Win11 is the server and BigSur is the client. It seems to happen a lot more often when you quickly move the mouse.

<!-- gh-comment-id:922177256 --> @thedaneeffect commented on GitHub (Sep 18, 2021): I've got the same issue except Win11 is the server and BigSur is the client. It seems to happen a lot more often when you quickly move the mouse.
Author
Owner

@twizzayy commented on GitHub (Jan 28, 2022):

Also experiencing this bug between Mac OS Big Sur 11.6.2 and GNU/Linux Debian 10 "Buster"
Mac is the server.

Work Around for Mac Users

I had to set my primary screen to the far right on my Mac system because the cursor would jump to the middle of the primary display. Like below:

Screen Shot 2022-01-28 at 4 29 40 PM

 
 
 
 
Here is the Barrier set up I have for reference:

Screen Shot 2022-01-28 at 4 31 30 PM

So, if I had my primary display set to the far left monitor on my Mac, and I moved from my Debian screen to my Mac, then the cursor would jump all the way to the middle of the primary display on the Mac (The far left display). This means it would jump across two other screens.

 

Solution

The Workaround I am using for this currently is to have my Mac displays isolated to the left side of my desk, and then setting the primary display to the Mac monitor on the far right.

This stops it from jumping across screens, but the cursor will still jump to the middle of the screen on my Mac when switching from Debian.

So to remedy that with Barrier, on my Mac, I go to: Configure Server Advanced server settings and click the “Switch After waiting” Check Box and set the time to like 200ms. So when switching from Debian to Mac quickly, it feels more natural for the mouse to be in the middle of the screen after a .2-second delay. This does, however, also add a delay when switching from Mac to Debian. Which is a bit annoying. Pick your poison.

<!-- gh-comment-id:1024726081 --> @twizzayy commented on GitHub (Jan 28, 2022): Also experiencing this bug between Mac OS Big Sur 11.6.2 and GNU/Linux Debian 10 "Buster" Mac is the server. ## Work Around for Mac Users I had to set my primary screen to the far right on my Mac system because the cursor would jump to the middle of the primary display. Like below: ![Screen Shot 2022-01-28 at 4 29 40 PM](https://user-images.githubusercontent.com/88040412/151630888-8319e938-58de-4c31-a0e0-cce8a1154ebd.png) &nbsp; &nbsp; &nbsp; &nbsp; Here is the Barrier set up I have for reference: <img width="779" alt="Screen Shot 2022-01-28 at 4 31 30 PM" src="https://user-images.githubusercontent.com/88040412/151631138-d995c8d1-a1e1-40aa-89e2-bead92fae48e.png"> So, if I had my primary display set to the far left monitor on my Mac, and I moved from my Debian screen to my Mac, then the cursor would jump all the way to the middle of the primary display on the Mac (The far left display). This means it would jump across two other screens. &nbsp; ### Solution The Workaround I am using for this currently is to have my Mac displays isolated to the left side of my desk, and then setting the primary display to the Mac monitor on the far right. This stops it from jumping across screens, but the cursor will still jump to the middle of the screen on my Mac when switching from Debian. So to remedy that with Barrier, on my Mac, I go to: Configure Server Advanced server settings and click the “Switch After waiting” Check Box and set the time to like 200ms. So when switching from Debian to Mac quickly, it feels more natural for the mouse to be in the middle of the screen after a .2-second delay. This does, however, also add a delay when switching from Mac to Debian. Which is a bit annoying. Pick your poison.
Author
Owner

@derpuma commented on GitHub (Sep 23, 2022):

Is there a solution for this problem?
I have the same issue between MacOS Monterey (Server) and Windows 10 (Client).
Mouse jumps like crazy back to MacOS screen while using it on Windows 10 screen.

<!-- gh-comment-id:1256095634 --> @derpuma commented on GitHub (Sep 23, 2022): Is there a solution for this problem? I have the same issue between MacOS Monterey (Server) and Windows 10 (Client). Mouse jumps like crazy back to MacOS screen while using it on Windows 10 screen.
Author
Owner

@helms-charity commented on GitHub (Dec 18, 2022):

Confirmed that the issue persists on Mac Monterey OR Ventura (server) + Windows 10 (Client).
Thanks all for your comments, I had assumed there was some micro disconnections that were happening between them.

The setting to "double tap to switch" is the only thing that 'fixes' it so far.

<!-- gh-comment-id:1356784515 --> @helms-charity commented on GitHub (Dec 18, 2022): Confirmed that the issue persists on Mac Monterey OR Ventura (server) + Windows 10 (Client). Thanks all for your comments, I had assumed there was some micro disconnections that were happening between them. The setting to "double tap to switch" is the only thing that 'fixes' it so far.
Author
Owner

@tiredtofu commented on GitHub (Dec 24, 2022):

This is not just for when it's Mac OS as the server. I'm having this happen to me despite having a Windows 10 server + MacOS Ventura (13.1) client. It only happens when the mouse is being moved to the MacOS client, but not when I move the mouse back to the Windows server.

Things I've tried to fix this (that did not work):

  • Switching wi-fi networks
  • Attempting to slow down the mouse movement to the edge.
  • Reinstalling Barrier on both computers
  • Rebooting both computers
  • Rearranging the layout of the barrier server configuration
  • Turning on "Switch after waiting X ms"
  • Turning on "Check clients every X ms"
  • Toggling "Use relative mouse moves"
  • Toggling "Don't take foreground window on Windows servers"
  • Toggling clipboard sharing.
<!-- gh-comment-id:1364438677 --> @tiredtofu commented on GitHub (Dec 24, 2022): This is not just for when it's Mac OS as the server. I'm having this happen to me despite having a Windows 10 server + MacOS Ventura (13.1) client. It only happens when the mouse is being moved to the MacOS client, but not when I move the mouse back to the Windows server. Things I've tried to fix this (that did not work): - Switching wi-fi networks - Attempting to slow down the mouse movement to the edge. - Reinstalling Barrier on both computers - Rebooting both computers - Rearranging the layout of the barrier server configuration - Turning on "Switch after waiting X ms" - Turning on "Check clients every X ms" - Toggling "Use relative mouse moves" - Toggling "Don't take foreground window on Windows servers" - Toggling clipboard sharing.
Author
Owner

@dinbtechit commented on GitHub (Feb 27, 2023):

Having the same issue here. Tried everything. Nothing seems to be working. :(

<!-- gh-comment-id:1446937659 --> @dinbtechit commented on GitHub (Feb 27, 2023): Having the same issue here. Tried everything. Nothing seems to be working. :(
Author
Owner

@bigH commented on GitHub (Mar 24, 2023):

I've noticed that:

  1. when started for the first time, this issue doesn't occur,
  2. after sleeping (Cmd+Ctrl+Q on macos and screensaver on Windows) the issue occurs, and
  3. clicking "Reload" on the barrier server instance fixes this issue.

EDIT: All of the above anecdotally worked, but wasn't consistent. Doing further experiments gives better clarity (see later comment).

<!-- gh-comment-id:1482174355 --> @bigH commented on GitHub (Mar 24, 2023): I've noticed that: 1. ~when started for the first time, this issue doesn't occur~, 2. ~after sleeping (Cmd+Ctrl+Q on macos and screensaver on Windows) the issue occurs~, and 3. ~clicking "Reload" on the barrier server instance fixes this issue~. EDIT: All of the above anecdotally worked, but wasn't consistent. Doing further experiments gives better clarity (see [later comment](https://github.com/debauchee/barrier/issues/1043#issuecomment-1485778214)).
Author
Owner

@dinbtechit commented on GitHub (Mar 24, 2023):

I've noticed that:

  1. when started for the first time, this issue doesn't occur,
  2. after sleeping (Cmd+Ctrl+Q on macos and screensaver on Windows) the issue occurs, and
  3. clicking "Reload" on the barrier server instance fixes this issue.

@bigH interesting observation.. In my case, I use MacOS Ventura (server) and Windows 10 (client). Reloading the server does not fix the issue.. :(

<!-- gh-comment-id:1482711484 --> @dinbtechit commented on GitHub (Mar 24, 2023): > I've noticed that: > > 1. when started for the first time, this issue doesn't occur, > 2. after sleeping (Cmd+Ctrl+Q on macos and screensaver on Windows) the issue occurs, and > 3. clicking "Reload" on the barrier server instance fixes this issue. @bigH interesting observation.. In my case, I use MacOS Ventura (server) and Windows 10 (client). Reloading the server does not fix the issue.. :(
Author
Owner

@bigH commented on GitHub (Mar 27, 2023):

I've noticed that #2 is incorrect on my end. It'll intermittently work and not work and I can't explain why. I've tried a few experiments. No experiment repros/doesn't repro it 100% of the time.

  • Turning on wait at edge - this seems to trigger the bug the least. For example, if I hang out at the edge and go back and forth slowly without moving too much, I can consistently keep the cursor at the edge.
  • Going slowly at the edge - this seems to trigger the bug less often. If I hang out at the edge and go back and forth VERY SLOWLY, I can mostly stay there. My mouse has onboard adjustable DPI, and changing that to be lower (unusably slow-moving cursor) improves my ability to stay at the edge. What I usually do is draw 5px diameter circles at the edge at a rate of 1 per 3 seconds or so.
  • Going fast at the edge - this seems to consistently reproduce the bug.

@dinbtechit - I have the same setup macos server and Windows 10 client.

<!-- gh-comment-id:1485778214 --> @bigH commented on GitHub (Mar 27, 2023): I've noticed that #2 is incorrect on my end. It'll intermittently work and not work and I can't explain why. I've tried a few experiments. No experiment repros/doesn't repro it 100% of the time. - Turning on wait at edge - this seems to trigger the bug the least. For example, if I hang out at the edge and go back and forth slowly without moving too much, I can consistently keep the cursor at the edge. - Going slowly at the edge - this seems to trigger the bug less often. If I hang out at the edge and go back and forth VERY SLOWLY, I can mostly stay there. My mouse has onboard adjustable DPI, and changing that to be lower (unusably slow-moving cursor) improves my ability to stay at the edge. What I usually do is draw 5px diameter circles at the edge at a rate of 1 per 3 seconds or so. - Going fast at the edge - this seems to consistently reproduce the bug. @dinbtechit - I have the same setup macos server and Windows 10 client.
Author
Owner

@coffnix commented on GitHub (Sep 20, 2023):

After connecting with either the Linux or Windows client, stop and start the server on the Mac. This action should resolve the bug. Tested with the openSUSE Tumbleweed Linux client, Windows 11 client, and macOS Sonoma 14.0 server.

<!-- gh-comment-id:1727297953 --> @coffnix commented on GitHub (Sep 20, 2023): After connecting with either the Linux or Windows client, stop and start the server on the Mac. This action should resolve the bug. Tested with the openSUSE Tumbleweed Linux client, Windows 11 client, and macOS Sonoma 14.0 server.
Author
Owner

@shitchell commented on GitHub (Dec 13, 2023):

  • Going slowly at the edge - this seems to trigger the bug less often. If I hang out at the edge and go back and forth VERY SLOWLY, I can mostly stay there. My mouse has onboard adjustable DPI, and changing that to be lower (unusably slow-moving cursor) improves my ability to stay at the edge. What I usually do is draw 5px diameter circles at the edge at a rate of 1 per 3 seconds or so.

  • Going fast at the edge - this seems to consistently reproduce the bug.

@dinbtechit - I have the same setup macos server and Windows 10 client.

@bigH This is what I'm seeing as well.

Scenario Result
Move cursor slowly from server to client Cursor appears on client screen edge as expected
Move cursor at normal rate or faster from server to client Cursor appears in the middle of the client screen
Move cursor from client to server Cursor always appears on server screen edge as expected

Server: Windows 10, barrier v2.4.0-release3e0d758b
Client: Debian 12, barrier v2.4.0-release00000000

<!-- gh-comment-id:1854503336 --> @shitchell commented on GitHub (Dec 13, 2023): > * Going slowly at the edge - this seems to trigger the bug less often. If I hang out at the edge and go back and forth VERY SLOWLY, I can mostly stay there. My mouse has onboard adjustable DPI, and changing that to be lower (unusably slow-moving cursor) improves my ability to stay at the edge. What I usually do is draw 5px diameter circles at the edge at a rate of 1 per 3 seconds or so. > > * Going fast at the edge - this seems to consistently reproduce the bug. > > @dinbtechit - I have the same setup macos server and Windows 10 client. @bigH This is what I'm seeing as well. | Scenario | Result | | -------- | ------- | | Move cursor slowly from server to client | Cursor appears on client screen edge as expected | | Move cursor at normal rate or faster from server to client | Cursor appears in the middle of the client screen | | Move cursor from client to server | Cursor always appears on server screen edge as expected | **Server**: Windows 10, barrier v2.4.0-release3e0d758b **Client**: Debian 12, barrier v2.4.0-release00000000
Author
Owner

@shitchell commented on GitHub (Dec 13, 2023):

After connecting with either the Linux or Windows client, stop and start the server on the Mac. This action should resolve the bug. Tested with the openSUSE Tumbleweed Linux client, Windows 11 client, and macOS Sonoma 14.0 server.

@coffnix This does not resolve the issue for me using a Windows 10 server

  1. Start Windows barrier server
  2. Start Linux barrier client
  3. Connection is established, and the bug is there
  4. Stop Windows barrier server
  5. Start Windows barrier server
  6. Connection is automatically re-established, and the bug is still there

Server: Windows 10, barrier v2.4.0-release3e0d758b
Client: Debian 12, barrier v2.4.0-release00000000

<!-- gh-comment-id:1854552786 --> @shitchell commented on GitHub (Dec 13, 2023): > After connecting with either the Linux or Windows client, stop and start the server on the Mac. This action should resolve the bug. Tested with the openSUSE Tumbleweed Linux client, Windows 11 client, and macOS Sonoma 14.0 server. @coffnix This does not resolve the issue for me using a Windows 10 server 1. Start Windows barrier server 2. Start Linux barrier client 3. Connection is established, and the bug is there 4. _Stop Windows barrier server_ 5. _Start Windows barrier server_ 6. Connection is automatically re-established, and the bug is still there **Server**: Windows 10, barrier v2.4.0-release3e0d758b **Client**: Debian 12, barrier v2.4.0-release00000000
Author
Owner

@dinbtechit commented on GitHub (Dec 19, 2023):

@bigH - I just noticed today this issue no longer happens on my setup (macos server and windows 10 client). I am not sure if that has to do with the recent upgrade of my macos from Ventura (macos13) to Sonama (macos 14). But that's the only that was changed in the last few days.

Can you confirm if upgrading macos solves this issue for you?

<!-- gh-comment-id:1863029858 --> @dinbtechit commented on GitHub (Dec 19, 2023): @bigH - I just noticed today this issue no longer happens on my setup (macos server and windows 10 client). I am not sure if that has to do with the recent upgrade of my macos from Ventura (macos13) to Sonama (macos 14). But that's the only that was changed in the last few days. Can you confirm if upgrading macos solves this issue for you?
Author
Owner

@tiagoslucas commented on GitHub (Mar 28, 2024):

@dinbtechit I can confirm I still have this behavior using MacOS Sonoma 14.4.1 so it's definitely not fixed by the update.

<!-- gh-comment-id:2025827125 --> @tiagoslucas commented on GitHub (Mar 28, 2024): @dinbtechit I can confirm I still have this behavior using MacOS Sonoma 14.4.1 so it's definitely not fixed by the update.
Author
Owner

@mnunezpoggi commented on GitHub (Aug 30, 2024):

I had this exact same issue with Windows 11 + Windows 10 setup.
My configuration is:
Laptop screen 1 - External screen 1 ----barrier---- External screen 2 - Laptop screen 2

I originally had the issue when both laptop's screens were set as the main display (both at the edges).
I fixed it by making External screen 2 the main display of Laptop 2.
So make sure that at least one main display is next to the other device. And restart the service, of course.

<!-- gh-comment-id:2321309674 --> @mnunezpoggi commented on GitHub (Aug 30, 2024): I had this exact same issue with Windows 11 + Windows 10 setup. My configuration is: Laptop screen 1 - External screen 1 ----barrier---- External screen 2 - Laptop screen 2 I originally had the issue when both laptop's screens were set as the main display (both at the edges). I fixed it by making External screen 2 the main display of Laptop 2. So make sure that at least one main display is next to the other device. And restart the service, of course.
Author
Owner

@coffnix commented on GitHub (Aug 30, 2024):

fixed on macOS (server): https://github.com/coffnix/barrier-ng

<!-- gh-comment-id:2322275494 --> @coffnix commented on GitHub (Aug 30, 2024): fixed on macOS (server): https://github.com/coffnix/barrier-ng
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#827
No description provided.