debauchee / barrier

Open-source KVM software
Other
27.4k stars 1.51k forks source link

Cursor jumps to the exact middle of primary display on macOS #1043

Open LukasMojzis opened 3 years ago

LukasMojzis commented 3 years ago

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):

hungerregnuh commented 3 years ago

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.

LukasMojzis commented 3 years ago

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.

stephensilber commented 3 years ago

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

galsjel commented 3 years ago

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.

twizzayy commented 2 years ago

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.

derpuma commented 2 years ago

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.

helms-charity commented 1 year ago

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.

tiredtofu commented 1 year ago

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):

dinbtechit commented 1 year ago

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

bigH commented 1 year ago

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).

dinbtechit commented 1 year ago

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.. :(

bigH commented 1 year ago

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.

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

coffnix commented 1 year ago

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.

shitchell commented 10 months ago
  • 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

shitchell commented 10 months ago

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

dinbtechit commented 9 months ago

@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?

tiagoslucas commented 6 months ago

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

mnunezpoggi commented 1 month ago

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.

coffnix commented 1 month ago

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