[GH-ISSUE #94] Cursor is stuck in bottom of client screen. Issue with high resolution displays? #69

Open
opened 2026-05-05 04:55:00 -06:00 by gitea-mirror · 41 comments
Owner

Originally created by @mcx808 on GitHub (Jul 12, 2018).
Original GitHub issue: https://github.com/debauchee/barrier/issues/94

Operating Systems

Server: Windows 10 x64 1709

Client: macOS 10.13.5

Barrier Version

2.1.0

Steps to reproduce bug

I have a Surface book (3000x2000 scaled at 200%) with a 3840x2160 monitor above scaled at 150%.
My MacbookPro (1280x800) is to the right. Whenever I move the mouse to the mac, the cursor jumps straight to the bottom right screen and stays there. I can right click but not move it. I can use the mac trackpad to move the mouse but not the Windows mouse.

I disabled my laptop screen so I am only using the external display. Same issue.

I moved the orientation of the mbp to the right. Same issue.

The log shows the following warning when I move to the client screen: WARNING: cursor may not be visible

Other info

  • When did the problem start to occur? Every time the above steps are followed
  • Is there a way to work around it? No
  • Does this bug prevent you from using Barrier entirely? Yes

Logs are attached
clienttlog.txt
serverlog.txt

Originally created by @mcx808 on GitHub (Jul 12, 2018). Original GitHub issue: https://github.com/debauchee/barrier/issues/94 ### Operating Systems ### Server: Windows 10 x64 1709 Client: macOS 10.13.5 ### Barrier Version ### 2.1.0 ### Steps to reproduce bug ### I have a Surface book (3000x2000 scaled at 200%) with a 3840x2160 monitor above scaled at 150%. My MacbookPro (1280x800) is to the right. Whenever I move the mouse to the mac, the cursor jumps straight to the bottom right screen and stays there. I can right click but not move it. I can use the mac trackpad to move the mouse but not the Windows mouse. I disabled my laptop screen so I am only using the external display. Same issue. I moved the orientation of the mbp to the right. Same issue. The log shows the following warning when I move to the client screen: WARNING: cursor may not be visible ### Other info ### * When did the problem start to occur? Every time the above steps are followed * Is there a way to work around it? No * Does this bug prevent you from using Barrier entirely? Yes Logs are attached [clienttlog.txt](https://github.com/debauchee/barrier/files/2188116/clienttlog.txt) [serverlog.txt](https://github.com/debauchee/barrier/files/2188117/serverlog.txt)
gitea-mirror added the
bug
HiDPI
labels 2026-05-05 04:55:00 -06:00
Author
Owner

@walker0643 commented on GitHub (Sep 8, 2018):

@mcx808 this should be fixed with 075d4f4758. can you try it and report back? if you're not comfortable building barrier from source this fix will be included in the next release (2.2). thanks!

<!-- gh-comment-id:419665785 --> @walker0643 commented on GitHub (Sep 8, 2018): @mcx808 this should be fixed with 075d4f4758f86c49ef0b5257a2de076b1d7d4569. can you try it and report back? if you're not comfortable building barrier from source this fix will be included in the next release (2.2). thanks!
Author
Owner

@walker0643 commented on GitHub (Sep 8, 2018):

Reopen if your issue isn't resolved after 2.2. Thank you :)

<!-- gh-comment-id:419676919 --> @walker0643 commented on GitHub (Sep 8, 2018): Reopen if your issue isn't resolved after 2.2. Thank you :)
Author
Owner

@CaptainJawZ commented on GitHub (Jan 2, 2019):

Sorry for opening the issue again, but I am experimenting the same problem, with similar devices, here is my setup:
[Desktop] [Desktop}
[Surface pro]

When I use my desktop as a client it works seamlessly, just as I expect it.
However, when I try to run the surface as a client, the mouse just get's stuck on the bottom of the screen, top left corner.
I don't know if it's a DPI issue, or if it's a problem with multiple monitor setup, which I still havent figured out what's the right way to set, is it making two monitors with the same name?

<!-- gh-comment-id:450770014 --> @CaptainJawZ commented on GitHub (Jan 2, 2019): Sorry for opening the issue again, but I am experimenting the same problem, with similar devices, here is my setup: [Desktop] [Desktop} [Surface pro] When I use my desktop as a client it works seamlessly, just as I expect it. However, when I try to run the surface as a client, the mouse just get's stuck on the bottom of the screen, top left corner. I don't know if it's a DPI issue, or if it's a problem with multiple monitor setup, which I still havent figured out what's the right way to set, is it making two monitors with the same name?
Author
Owner

@luckcolors commented on GitHub (Jan 12, 2019):

Hello.
I'm having the same issue. I'm willing to help you debug this, feel free to ask me things to test.

<!-- gh-comment-id:453769730 --> @luckcolors commented on GitHub (Jan 12, 2019): Hello. I'm having the same issue. I'm willing to help you debug this, feel free to ask me things to test.
Author
Owner

@luckcolors commented on GitHub (Jan 14, 2019):

So, as a test i've built the latest version of the code from the repo and the fix you have committed 075d4f4758.
And it's working correctly so yeah this issue should be already fixed.
Please make an ufficial build whenever you get the chance. 😄
Thanks for your help.

Also i've noticed that the setup build script points to a folder wich doesn't exist.

<!-- gh-comment-id:454147352 --> @luckcolors commented on GitHub (Jan 14, 2019): So, as a test i've built the latest version of the code from the repo and the fix you have committed https://github.com/debauchee/barrier/commit/075d4f4758f86c49ef0b5257a2de076b1d7d4569. And it's working correctly so yeah this issue should be already fixed. Please make an ufficial build whenever you get the chance. 😄 Thanks for your help. Also i've noticed that the setup build script points to a folder wich doesn't exist.
Author
Owner

@AdrianKoshka commented on GitHub (Jan 14, 2019):

Also i've noticed that the setup build script points to a folder wich doesn't exist.

What do you mean? Could you get me log output from the build script?

<!-- gh-comment-id:454150573 --> @AdrianKoshka commented on GitHub (Jan 14, 2019): > Also i've noticed that the setup build script points to a folder wich doesn't exist. What do you mean? Could you get me log output from the build script?
Author
Owner

@luckcolors commented on GitHub (Jan 14, 2019):

The line in the build_installer.bat tries to CD into build/setup wich isn't created by the build script.
Instead two folders wich are named similarly are present: setup-wix, setup-inno.
I guess it's just a broken reference?

Log:

C:\barrier>build_installer.bat
Cannot find the specified file.
To build a 64-bit Windows installer:
 - set Q_BUILD_TYPE=Release in build_env.bat
 - also set other environmental overrides necessary for your build environment
 - run clean_build.bat to build Barrier and verify that it succeeds
 - re-run this script to create the installation package
<!-- gh-comment-id:454201785 --> @luckcolors commented on GitHub (Jan 14, 2019): The [line](https://github.com/debauchee/barrier/blob/4dedd88ab2fc900b44cea0003cddf065f01fa521/build_installer.bat#L9) in the build_installer.bat tries to CD into build/setup wich isn't created by the build script. Instead two folders wich are named similarly are present: setup-wix, setup-inno. I guess it's just a broken reference? Log: ``` C:\barrier>build_installer.bat Cannot find the specified file. To build a 64-bit Windows installer: - set Q_BUILD_TYPE=Release in build_env.bat - also set other environmental overrides necessary for your build environment - run clean_build.bat to build Barrier and verify that it succeeds - re-run this script to create the installation package ```
Author
Owner

@luckcolors commented on GitHub (Jan 14, 2019):

Also i've noticed that the error mentions to change the variable Q_BUILD_TYPE=Release, but in the clean_build.cmd the variable is called B_BUILD_TYPE=Release.
Setting Q_BUILD_TYPE=Release does nothing.
(Also i did build successfully barrier by setting the proper variables before so no idea about this).

<!-- gh-comment-id:454202910 --> @luckcolors commented on GitHub (Jan 14, 2019): Also i've noticed that the error mentions to change the variable Q_BUILD_TYPE=Release, but in the clean_build.cmd the variable is called B_BUILD_TYPE=Release. Setting Q_BUILD_TYPE=Release does nothing. (Also i did build successfully barrier by setting the proper variables before so no idea about this).
Author
Owner

@AdrianKoshka commented on GitHub (Jan 14, 2019):

did you read this? https://github.com/debauchee/barrier/wiki/Building-on-Windows Pretty sure you don't need to run build_installer.bat.

<!-- gh-comment-id:454204142 --> @AdrianKoshka commented on GitHub (Jan 14, 2019): did you read this? https://github.com/debauchee/barrier/wiki/Building-on-Windows Pretty sure you don't need to run `build_installer.bat`.
Author
Owner

@luckcolors commented on GitHub (Jan 15, 2019):

I didn't so that's probably why 😄 .

<!-- gh-comment-id:454212615 --> @luckcolors commented on GitHub (Jan 15, 2019): I didn't so that's probably why 😄 .
Author
Owner

@luckcolors commented on GitHub (Jan 20, 2019):

Turned on barrier again today, it broke again. Restarting barrier on both machines doesn't fix it.

<!-- gh-comment-id:455862817 --> @luckcolors commented on GitHub (Jan 20, 2019): Turned on barrier again today, it broke again. Restarting barrier on both machines doesn't fix it.
Author
Owner

@AdrianKoshka commented on GitHub (Jan 20, 2019):

Oh, huh.

<!-- gh-comment-id:455885700 --> @AdrianKoshka commented on GitHub (Jan 20, 2019): Oh, huh.
Author
Owner

@p12tic commented on GitHub (Jan 20, 2019):

In my experience sometimes barrier breaks the input system of either or both the server and the client. Restarting the machines themselves helps.

<!-- gh-comment-id:455894476 --> @p12tic commented on GitHub (Jan 20, 2019): In my experience sometimes barrier breaks the input system of either or both the server and the client. Restarting the machines themselves helps.
Author
Owner

@FredNass commented on GitHub (Jan 10, 2020):

Hello,

This happens on my side too with the following setup:

  • Server : Linux Fedora 31 with barrier 2.3.2-snapshot-9080ce45 installed with Snap
  • Client : macOS Catalina 10.15.2 with barrier 2.3.2 downloaded from Github

I installed 2.3.1 on a brand new Mac Mini running Mojave. I can swear it worked once (I could see and move the client's cursor by moving server's mouse) then the client's cursor disappeared forever. Actually, it got stucked in the bottom right corner of the client's screen.

Restarting Barrier on both server and client doesn't help.
Restarting both machines does not help either.
Uninstalling and reinstalling did not help
Upgrading macOS to Catalina did not help.

When both barriers and barrierc are started and connected, as soon as the server's cursor crosses the right screen edge (I use 2 screens on the server machine), it jumps to the client's bottom right of the screen and get stucked there.

The only way I can get my mouse back on the server is by stopping barrierc on the client.

Regards,
Frédéric.

<!-- gh-comment-id:573055663 --> @FredNass commented on GitHub (Jan 10, 2020): Hello, This happens on my side too with the following setup: - Server : Linux Fedora 31 with barrier 2.3.2-snapshot-9080ce45 installed with Snap - Client : macOS Catalina 10.15.2 with barrier 2.3.2 downloaded from Github I installed 2.3.1 on a brand new Mac Mini running Mojave. I can swear it worked once (I could see and move the client's cursor by moving server's mouse) then the client's cursor disappeared forever. Actually, it got stucked in the bottom right corner of the client's screen. Restarting Barrier on both server and client doesn't help. Restarting both machines does not help either. Uninstalling and reinstalling did not help Upgrading macOS to Catalina did not help. When both barriers and barrierc are started and connected, as soon as the server's cursor crosses the right screen edge (I use 2 screens on the server machine), it jumps to the client's bottom right of the screen and get stucked there. The only way I can get my mouse back on the server is by stopping barrierc on the client. Regards, Frédéric.
Author
Owner

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

Hello,
I have the same problem.

  • Server : Windows 10 in a Dual Display Setup with barrier 2.3.2
  • Client : Arch Linux with barrier 2.3.2

The problem only occurs if I have my second display connected. If I connect it, the cursor will change to the client and get stuck in the top right corner.
When I don't use my second display, everything runs fine.

My first display is an HiDPI one, so I doubt the HiDPI display itself is the root of the bug.

<!-- gh-comment-id:618696442 --> @emilpaw commented on GitHub (Apr 23, 2020): Hello, I have the same problem. - Server : Windows 10 in a Dual Display Setup with barrier 2.3.2 - Client : Arch Linux with barrier 2.3.2 The problem only occurs if I have my second display connected. If I connect it, the cursor will change to the client and get stuck in the top right corner. When I don't use my second display, everything runs fine. My first display is an HiDPI one, so I doubt the HiDPI display itself is the root of the bug.
Author
Owner

@yume-chan commented on GitHub (Oct 5, 2021):

There was a fix for client mode in #306, not sure why it's not applied for server mode and why it was removed in aea488167a as a "clean up".

Anyway, I found a workaround which you can apply now (I only have one monitor, I'm not sure whether it will work with multiple monitors):

EDIT: https://github.com/debauchee/barrier/issues/94#issuecomment-979408763 contains updated instructions for more use cases.

  1. Open Explorer and navigate to Barrier installation folder
  2. Right-click on barrierc.exe or barriers.exe depends on your usage (client mode vs server mode), or both if you use both
  3. Select "Properties"
  4. Switch to "Compatibility" tab and click the "Change high DPI settings" button
    image
  5. In the new dialog, check "Override high DPI scaling behavior" and make sure "Application" is selected in the "Scaling performed by" dropdown menu
    image
  6. Click "OK" twice to close both dialogs
  7. Kill all barrier*.exe processes or simple restart the computer

Now it should work.

<!-- gh-comment-id:934400562 --> @yume-chan commented on GitHub (Oct 5, 2021): There was a fix for client mode in #306, not sure why it's not applied for server mode and why it was removed in aea488167af19845369e062bf9af4edfadc4fa71 as a "clean up". Anyway, I found a workaround which you can apply now (I only have one monitor, I'm not sure whether it will work with multiple monitors): **EDIT:** https://github.com/debauchee/barrier/issues/94#issuecomment-979408763 contains updated instructions for more use cases. 1. Open Explorer and navigate to Barrier installation folder 2. Right-click on `barrierc.exe` or `barriers.exe` depends on your usage (client mode vs server mode), or both if you use both 3. Select "Properties" 4. Switch to "Compatibility" tab and click the "Change high DPI settings" button ![image](https://user-images.githubusercontent.com/1330321/136028803-b18b4320-509a-47f9-a6f0-6e926f1f5fb9.png) 5. In the new dialog, check "Override high DPI scaling behavior" and make sure "Application" is selected in the "Scaling performed by" dropdown menu ![image](https://user-images.githubusercontent.com/1330321/136029264-8ca43f84-17ab-405f-8071-41dd7efc063d.png) 6. Click "OK" twice to close both dialogs 7. Kill all barrier*.exe processes or simple restart the computer Now it should work.
Author
Owner

@jiboncom commented on GitHub (Nov 2, 2021):

Having this problem with a Surface Pro 5 as the server and Barrier 2.4

<!-- gh-comment-id:958083290 --> @jiboncom commented on GitHub (Nov 2, 2021): Having this problem with a Surface Pro 5 as the server and Barrier 2.4
Author
Owner

@paulrrogers commented on GitHub (Nov 4, 2021):

Confirmed this happened on Windows 10 20H2 (server) and MacOS 10.14.6 (client). The above High DPI workaround didn't help in my case.

<!-- gh-comment-id:960378133 --> @paulrrogers commented on GitHub (Nov 4, 2021): Confirmed this happened on Windows 10 20H2 (server) and MacOS 10.14.6 (client). The above High DPI workaround didn't help in my case.
Author
Owner

@Gooseheaded commented on GitHub (Nov 12, 2021):

I am also facing this problem, using two Windows machines.

Machine A:

  • Operating System: Windows 10 Home 64-bit (10.0, Build 19042) (19041.vb_release.191206-1406)
  • Barrier: 2.4.0-release-3e0d758b
  • User DPI Setting: 120 DPI (125 percent)
  • System DPI Setting: 120 DPI (125 percent)

Machine B:

  • Operating System: Windows 10 Pro 64-bit (10.0, Build 19043) (19041.vb_release.191206-1406)
  • Barrier: 2.4.0-release-3e0d758b
  • User DPI Setting: 240 DPI (250 percent)
  • System DPI Setting: 288 DPI (300 percent)

Regardless of which machine acts as Server or Client, the behavior is exactly the same. Moving the mouse from the Server's screen onto the Client's immediately "traps" the Server's mouse on the bottom-right corner of the Client's screen. The only way I know to exit this state is to press "Reload" on the Client's Barrier GUI.

I have tried resetting the Server's configuration, and reinstalling Barrier (version 2.4.0) on both machines.
I have also tried @yume-chan 's proposed workaround, but it did not help me.
I am also able to reproduce this issue among machines that do not have high-resolution displays. (I have a third Windows machine running into this same problem, not included here for simplicity).

Let me know if there is anything I can do to help. I will happily install experimental versions and provide relevant logs.

<!-- gh-comment-id:966750959 --> @Gooseheaded commented on GitHub (Nov 12, 2021): I am also facing this problem, using two Windows machines. **Machine A**: - Operating System: Windows 10 Home 64-bit (10.0, Build 19042) (19041.vb_release.191206-1406) - Barrier: 2.4.0-release-3e0d758b - User DPI Setting: 120 DPI (125 percent) - System DPI Setting: 120 DPI (125 percent) **Machine B**: - Operating System: Windows 10 Pro 64-bit (10.0, Build 19043) (19041.vb_release.191206-1406) - Barrier: 2.4.0-release-3e0d758b - User DPI Setting: 240 DPI (250 percent) - System DPI Setting: 288 DPI (300 percent) Regardless of which machine acts as Server or Client, the behavior is exactly the same. Moving the mouse from the Server's screen onto the Client's immediately "traps" the Server's mouse on the bottom-right corner of the Client's screen. The only way I know to exit this state is to press "Reload" on the Client's Barrier GUI. I have tried resetting the Server's configuration, and reinstalling Barrier (version 2.4.0) on both machines. I have also tried @yume-chan 's proposed workaround, but it did not help me. I am also able to reproduce this issue among machines that do not have high-resolution displays. (I have a third Windows machine running into this same problem, not included here for simplicity). Let me know if there is anything I can do to help. I will happily install experimental versions and provide relevant logs.
Author
Owner

@halter73 commented on GitHub (Nov 12, 2021):

It seems 2.4 made this issue occur in a lot more environments than before.

I'd seen issues like this before when changing DPI settings or attaching monitors while Barrier was running, but this only became a consistent issue for me after upgrading the server from 2.3.3 to 2.4.0. Downgrading the server from 2.4.0 back to 2.3.3 fixed the issue for me. I posted more details at https://github.com/debauchee/barrier/issues/1423.

I now see there are more similar reports about upgrading to 2.4 causing these issues (look at the newer comments in the older issues) at https://github.com/debauchee/barrier/issues/206, https://github.com/debauchee/barrier/issues/1363, https://github.com/debauchee/barrier/issues/1364, https://github.com/debauchee/barrier/issues/1382, https://github.com/debauchee/barrier/issues/1405, https://github.com/debauchee/barrier/issues/1415 and https://github.com/debauchee/barrier/issues/1422.

<!-- gh-comment-id:966823365 --> @halter73 commented on GitHub (Nov 12, 2021): It seems 2.4 made this issue occur in a lot more environments than before. I'd seen issues like this before when changing DPI settings or attaching monitors while Barrier was running, but this only became a consistent issue for me after upgrading the server from 2.3.3 to 2.4.0. Downgrading the server from 2.4.0 back to 2.3.3 fixed the issue for me. I posted more details at https://github.com/debauchee/barrier/issues/1423. I now see there are more similar reports about upgrading to 2.4 causing these issues (look at the newer comments in the older issues) at https://github.com/debauchee/barrier/issues/206, https://github.com/debauchee/barrier/issues/1363, https://github.com/debauchee/barrier/issues/1364, https://github.com/debauchee/barrier/issues/1382, https://github.com/debauchee/barrier/issues/1405, https://github.com/debauchee/barrier/issues/1415 and https://github.com/debauchee/barrier/issues/1422.
Author
Owner

@Gooseheaded commented on GitHub (Nov 12, 2021):

Thank you, @halter73 ; reverting to version 2.3.3 seems to have fixed the issue for me.

<!-- gh-comment-id:966839582 --> @Gooseheaded commented on GitHub (Nov 12, 2021): Thank you, @halter73 ; reverting to version 2.3.3 seems to have fixed the issue for me.
Author
Owner

@FliesWithWind commented on GitHub (Nov 16, 2021):

I'm having the same issue. I also remember having it before 2.4.0 release, when I grabbed the latest version compiled from main like two months ago or more.

<!-- gh-comment-id:969857997 --> @FliesWithWind commented on GitHub (Nov 16, 2021): I'm having the same issue. I also remember having it before 2.4.0 release, when I grabbed the latest version compiled from main like two months ago or more.
Author
Owner

@jhspyhard commented on GitHub (Nov 17, 2021):

Same issue of cursor getting stuck at the bottom right corner of the barrier client when attempting to switch control focus. The only way to regain control of my cursor on the server side seemed to be stopping the connection from the barrier client using a hardwired mouse/keyboard.

Win10 (S) <-- Ubuntu 20.04 (C) both running Barrier v2.4.0. Reverting the server instance back to v2.3.4 seemed to fix the issue.

<!-- gh-comment-id:971691825 --> @jhspyhard commented on GitHub (Nov 17, 2021): Same issue of cursor getting stuck at the bottom right corner of the barrier client when attempting to switch control focus. The only way to regain control of my cursor on the server side seemed to be stopping the connection from the barrier client using a hardwired mouse/keyboard. Win10 (S) <-- Ubuntu 20.04 (C) both running Barrier v2.4.0. Reverting the server instance back to v2.3.4 seemed to fix the issue.
Author
Owner

@FliesWithWind commented on GitHub (Nov 17, 2021):

Issue is definitely DPI related. If I change the scale to 100% it works fine with 2.4.0. The moment I switch it back to 125%, the cursor breaks again. :(

<!-- gh-comment-id:971747000 --> @FliesWithWind commented on GitHub (Nov 17, 2021): Issue is definitely DPI related. If I change the scale to 100% it works fine with 2.4.0. The moment I switch it back to 125%, the cursor breaks again. :(
Author
Owner

@evertiro commented on GitHub (Nov 18, 2021):

Verified the above with Win10 server and both MacOS and Pop!_OS (latest versions) clients

<!-- gh-comment-id:973321255 --> @evertiro commented on GitHub (Nov 18, 2021): Verified the above with Win10 server and both MacOS and Pop!_OS (latest versions) clients
Author
Owner

@XanderDK commented on GitHub (Nov 20, 2021):

Same problem here. Problem disappers when I set the scaling to 100 percent. Reappears when the scaling is set to the default 150 %.

Running Win 11 (server) MacOS 12 (client) barrier 2.4.0

<!-- gh-comment-id:974674412 --> @XanderDK commented on GitHub (Nov 20, 2021): Same problem here. Problem disappers when I set the scaling to 100 percent. Reappears when the scaling is set to the default 150 %. Running Win 11 (server) MacOS 12 (client) barrier 2.4.0
Author
Owner

@hwti commented on GitHub (Nov 21, 2021):

For a Windows server, I changed the DPI settings on barriers.exe like @yume-chan's suggestion, but as it runs as system user, I chose "Change settings for all users".
The issue is then fixed after restarting the Barrier server.

<!-- gh-comment-id:974746415 --> @hwti commented on GitHub (Nov 21, 2021): For a Windows server, I changed the DPI settings on barriers.exe like @yume-chan's suggestion, but as it runs as system user, I chose "Change settings for all users". The issue is then fixed after restarting the Barrier server.
Author
Owner

@FliesWithWind commented on GitHub (Nov 22, 2021):

Thanks! "Change settings for all users" solved it for me as well :)

<!-- gh-comment-id:975070892 --> @FliesWithWind commented on GitHub (Nov 22, 2021): Thanks! "Change settings for all users" solved it for me as well :)
Author
Owner

@XanderDK commented on GitHub (Nov 25, 2021):

Could you please share a screenshot of your settings?

<!-- gh-comment-id:979330768 --> @XanderDK commented on GitHub (Nov 25, 2021): Could you please share a screenshot of your settings?
Author
Owner

@FliesWithWind commented on GitHub (Nov 25, 2021):

image

<!-- gh-comment-id:979408763 --> @FliesWithWind commented on GitHub (Nov 25, 2021): ![image](https://user-images.githubusercontent.com/7544133/143487156-0f514d46-22ae-48dc-916c-9ed91b28284f.png)
Author
Owner

@yume-chan commented on GitHub (Nov 26, 2021):

I did some research and forgot to post here. IIRC this issue is from here

fc045fc793/src/lib/platform/MSWindowsScreen.cpp (L1582-L1588)

GetSystemMetrics is not DPI aware and returns screen size as scaled to 100% DPI (much smaller than your real screen size).

On the other hand, Barrier reads mouse position using Low Level Mouse Hooks which always return mouse coordinates in physical pixels.

So when the cursor is at right/bottom border, barrier thinks it is out of bounds so it doesn't know what to do.

Untitled-1


About why does the workaround work, my guess is that it (incorrectly) makes GetSystemMetrics to return non-scaled values.


For a proper code fix, Windows also has a GetSystemMetricsForDpi API. However, I don't know which DPI should be used here (especially for multi-monitor setup with different DPIs).

<!-- gh-comment-id:979628855 --> @yume-chan commented on GitHub (Nov 26, 2021): I did some research and forgot to post here. IIRC this issue is from here https://github.com/debauchee/barrier/blob/fc045fc79326cef966405b1cc578e8f062ae5294/src/lib/platform/MSWindowsScreen.cpp#L1582-L1588 [`GetSystemMetrics`](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsystemmetrics) is not DPI aware and returns screen size as scaled to 100% DPI (much smaller than your real screen size). On the other hand, Barrier reads mouse position using Low Level Mouse Hooks which always return mouse coordinates in physical pixels. So when the cursor is at right/bottom border, barrier thinks it is out of bounds so it doesn't know what to do. ![Untitled-1](https://user-images.githubusercontent.com/1330321/143516839-1593e947-46ad-42de-9164-576fe8635a8c.png) --- About why does the workaround work, my guess is that it (incorrectly) makes `GetSystemMetrics` to return non-scaled values. --- For a proper code fix, Windows also has a [`GetSystemMetricsForDpi`](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsystemmetricsfordpi) API. However, I don't know which DPI should be used here (especially for multi-monitor setup with different DPIs).
Author
Owner

@jasonrayne commented on GitHub (Mar 15, 2022):

For a Windows server, I changed the DPI settings on barriers.exe like @yume-chan's suggestion, but as it runs as system user, I chose "Change settings for all users". The issue is then fixed after restarting the Barrier server.

Thanks a bunch. Confirmed working on my setup, no issues so far.

Server: Win10, dual HDPI monitors, scaled
Client 1: MacOS Monterey, single monitor, non-HDPI
Client 2: Kali 2022.1, single monitor, non-HDPI

<!-- gh-comment-id:1068121873 --> @jasonrayne commented on GitHub (Mar 15, 2022): > For a Windows server, I changed the DPI settings on barriers.exe like @yume-chan's suggestion, but as it runs as system user, I chose "Change settings for all users". The issue is then fixed after restarting the Barrier server. Thanks a bunch. Confirmed working on my setup, no issues so far. **Server:** Win10, dual HDPI monitors, scaled **Client 1:** MacOS Monterey, single monitor, non-HDPI **Client 2:** Kali 2022.1, single monitor, non-HDPI
Author
Owner

@daejungkim commented on GitHub (Aug 3, 2022):

Thank you!

<!-- gh-comment-id:1203439330 --> @daejungkim commented on GitHub (Aug 3, 2022): Thank you!
Author
Owner

@jpvanoosten commented on GitHub (Oct 6, 2022):

Changing the setting on the Windows (server) by applying to all users worked for me!

<!-- gh-comment-id:1270524454 --> @jpvanoosten commented on GitHub (Oct 6, 2022): > Changing the setting on the Windows (server) by applying to all users worked for me!
Author
Owner

@UjmaIT commented on GitHub (Oct 14, 2022):

Issue also occured for me.
Here My setup:

Server:
Windows 10 with 2x FullHD screens (100% sacling) and 1x 4k screen with 150% scaling.

Client;
Windows 11 with a FullHD Screen

By changing the scaling of the 4k Screen from 150% to 100% i was able to get it running.

<!-- gh-comment-id:1278628806 --> @UjmaIT commented on GitHub (Oct 14, 2022): Issue also occured for me. Here My setup: Server: Windows 10 with 2x FullHD screens (100% sacling) and 1x 4k screen with 150% scaling. Client; Windows 11 with a FullHD Screen By changing the scaling of the 4k Screen from 150% to 100% i was able to get it running.
Author
Owner

@Rayanfpv commented on GitHub (Feb 24, 2023):

I managed to fix my Windows 10 with dual monitors (as a server), and Steam Deck (desktop mode as a client) by making sure both environment displays are on the same scale, in my case 100%.

windows 1
Windows 2

https://user-images.githubusercontent.com/43546382/221292147-15514d1c-f252-49bd-a5b0-e18e787b4843.mp4

<!-- gh-comment-id:1444492191 --> @Rayanfpv commented on GitHub (Feb 24, 2023): I managed to fix my Windows 10 with dual monitors (as a server), and Steam Deck (desktop mode as a client) by making sure both environment displays are on the same scale, in my case 100%. ![windows 1](https://user-images.githubusercontent.com/43546382/221292077-8e965a9b-ef96-4b84-9517-b70c78c589c1.png) ![Windows 2](https://user-images.githubusercontent.com/43546382/221292092-3e6dd165-b33a-4cf0-ba54-4f5a45b5bbe0.png) https://user-images.githubusercontent.com/43546382/221292147-15514d1c-f252-49bd-a5b0-e18e787b4843.mp4
Author
Owner

@d-marquina commented on GitHub (Mar 1, 2023):

Hi, I encounter this issue just today, my setup is:

Barrier version: 2.4.0

Server (Windows 10):

  • Screen 1: 1920*1080 at 150% scaling
  • Screen 2: 1920*1080 at 125% scaling

Cliente (Windows 10):

  • Screen: 1920*1080 at 125% scaling

Changing the compatibility configuration, as suggested, of barriers.exe in my server fixed it, thanks.

<!-- gh-comment-id:1450417628 --> @d-marquina commented on GitHub (Mar 1, 2023): Hi, I encounter this issue just today, my setup is: Barrier version: 2.4.0 Server (Windows 10): - Screen 1: 1920*1080 at 150% scaling - Screen 2: 1920*1080 at 125% scaling Cliente (Windows 10): - Screen: 1920*1080 at 125% scaling Changing the compatibility configuration, as suggested, of barriers.exe in my server fixed it, thanks.
Author
Owner

@jartuso commented on GitHub (May 30, 2023):

Having the same mouse stuck in bottom right corner on client issue.
Using Barrier 2.4.0 -- previously this same setup was working on 2.3.4

Server = Windows 10
Client = Steam Deck

Changing the .exe DPI settings did not work for me.

Changing Windows display settings from 150% scale to 100% fixed it. However, my server screen isn't useable for me at 100% scale

I did some research and forgot to post here. IIRC this issue is from here

fc045fc793/src/lib/platform/MSWindowsScreen.cpp (L1582-L1588)

GetSystemMetrics is not DPI aware and returns screen size as scaled to 100% DPI (much smaller than your real screen size).

On the other hand, Barrier reads mouse position using Low Level Mouse Hooks which always return mouse coordinates in physical pixels.

So when the cursor is at right/bottom border, barrier thinks it is out of bounds so it doesn't know what to do.

Untitled-1

About why does the workaround work, my guess is that it (incorrectly) makes GetSystemMetrics to return non-scaled values.

For a proper code fix, Windows also has a GetSystemMetricsForDpi API. However, I don't know which DPI should be used here (especially for multi-monitor setup with different DPIs).

<!-- gh-comment-id:1569287781 --> @jartuso commented on GitHub (May 30, 2023): Having the same mouse stuck in bottom right corner on client issue. Using Barrier 2.4.0 -- previously this same setup was working on 2.3.4 Server = Windows 10 Client = Steam Deck Changing the .exe DPI settings did not work for me. Changing Windows display settings from 150% scale to 100% fixed it. However, my server screen isn't useable for me at 100% scale > I did some research and forgot to post here. IIRC this issue is from here > > https://github.com/debauchee/barrier/blob/fc045fc79326cef966405b1cc578e8f062ae5294/src/lib/platform/MSWindowsScreen.cpp#L1582-L1588 > > [`GetSystemMetrics`](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsystemmetrics) is not DPI aware and returns screen size as scaled to 100% DPI (much smaller than your real screen size). > > On the other hand, Barrier reads mouse position using Low Level Mouse Hooks which always return mouse coordinates in physical pixels. > > So when the cursor is at right/bottom border, barrier thinks it is out of bounds so it doesn't know what to do. > > ![Untitled-1](https://user-images.githubusercontent.com/1330321/143516839-1593e947-46ad-42de-9164-576fe8635a8c.png) > > About why does the workaround work, my guess is that it (incorrectly) makes `GetSystemMetrics` to return non-scaled values. > > For a proper code fix, Windows also has a [`GetSystemMetricsForDpi`](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsystemmetricsfordpi) API. However, I don't know which DPI should be used here (especially for multi-monitor setup with different DPIs).
Author
Owner

@foxotic commented on GitHub (Feb 7, 2024):

Can confirm having the scale at >100% causes problems. The hell! Can you help us 4K people out?

<!-- gh-comment-id:1931246023 --> @foxotic commented on GitHub (Feb 7, 2024): Can confirm having the scale at >100% causes problems. The hell! Can you help us 4K people out?
Author
Owner

@livejamie commented on GitHub (May 13, 2024):

Can confirm having the scale at >100% causes problems. The hell! Can you help us 4K people out?

Did you try @yume-chan / @hwti 's solution above? That works for most people.

<!-- gh-comment-id:2106666985 --> @livejamie commented on GitHub (May 13, 2024): > Can confirm having the scale at >100% causes problems. The hell! Can you help us 4K people out? Did you try @yume-chan / @hwti 's solution above? That works for most people.
Author
Owner

@souvikpodder commented on GitHub (Sep 30, 2024):

Can confirm having the scale at >100% causes problems. The hell! Can you help us 4K people out?

Did you try @yume-chan / @hwti 's solution above? That works for most people.

There was a fix for client mode in #306, not sure why it's not applied for server mode and why it was removed in aea4881 as a "clean up".

Anyway, I found a workaround which you can apply now (I only have one monitor, I'm not sure whether it will work with multiple monitors):

EDIT: #94 (comment) contains updated instructions for more use cases.

  1. Open Explorer and navigate to Barrier installation folder
  2. Right-click on barrierc.exe or barriers.exe depends on your usage (client mode vs server mode), or both if you use both
  3. Select "Properties"
  4. Switch to "Compatibility" tab and click the "Change high DPI settings" button
    image
  5. In the new dialog, check "Override high DPI scaling behavior" and make sure "Application" is selected in the "Scaling performed by" dropdown menu
    image
  6. Click "OK" twice to close both dialogs
  7. Kill all barrier*.exe processes or simple restart the computer

Now it should work.

Can confirm changing Compatibility DPI setting works. You just need to do it for both server machine also client machine. (If you are using windows for both.)

<!-- gh-comment-id:2383393698 --> @souvikpodder commented on GitHub (Sep 30, 2024): > > Can confirm having the scale at >100% causes problems. The hell! Can you help us 4K people out? > > Did you try @yume-chan / @hwti 's solution above? That works for most people. > There was a fix for client mode in #306, not sure why it's not applied for server mode and why it was removed in [aea4881](https://github.com/debauchee/barrier/commit/aea488167af19845369e062bf9af4edfadc4fa71) as a "clean up". > > Anyway, I found a workaround which you can apply now (I only have one monitor, I'm not sure whether it will work with multiple monitors): > > **EDIT:** [#94 (comment)](https://github.com/debauchee/barrier/issues/94#issuecomment-979408763) contains updated instructions for more use cases. > > 1. Open Explorer and navigate to Barrier installation folder > 2. Right-click on `barrierc.exe` or `barriers.exe` depends on your usage (client mode vs server mode), or both if you use both > 3. Select "Properties" > 4. Switch to "Compatibility" tab and click the "Change high DPI settings" button > ![image](https://user-images.githubusercontent.com/1330321/136028803-b18b4320-509a-47f9-a6f0-6e926f1f5fb9.png) > 5. In the new dialog, check "Override high DPI scaling behavior" and make sure "Application" is selected in the "Scaling performed by" dropdown menu > ![image](https://user-images.githubusercontent.com/1330321/136029264-8ca43f84-17ab-405f-8071-41dd7efc063d.png) > 6. Click "OK" twice to close both dialogs > 7. Kill all barrier*.exe processes or simple restart the computer > > Now it should work. Can confirm changing Compatibility DPI setting works. You just need to do it for both server machine also client machine. (If you are using windows for both.)
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#69
No description provided.