debauchee / barrier

Open-source KVM software
Other
27.22k stars 1.5k forks source link

Windows running server with scaled DPI doesn't work (v2.4.0) #1638

Open badvision opened 2 years ago

badvision commented 2 years ago

What happened?

I was using an older RC of 2.3.3 on Windows (running server) and MacOS (running client). I have a 4k monitor with scaling factor usually set to 250%. This was working fine in 2.3.3, but after upgrading to 2.4.0 (both mac and windows) when I connect the client, the mouse gets stuck in the bottom-right corner of the client (which layout-wise is on the right with the server windows machine on the left.)

When I set my desktop scaling in windows to 100% and restart, the issue goes away. So I suspect very strongly this is a regression in how Windows HiDPI settings are handled by Barrier.

Given that HiDPI is neither a new windows feature nor is it uncommon to use it, it would be wonderful if the application were more aware of it.

Version

v2.4.0

Git commit hash (if applicable)

No response

If applicable, where did you install Barrier from?

Installed from the github release downloads

What OSes are you seeing the problem on? (Check all that apply)

Windows

What OS versions are you using?

Windows (server): 10 21H1 Mac (client): 12.3.1

Relevant log output

No weird errors in the log but it's clear by the mouse enter coordinate that it's going all the way to the lower-right of the screen because it's getting a multiplied set of mouse coordinates and not the real physical coordinate somewhere along the way.

Any other information

No response

badvision commented 2 years ago

image After a lot of trial and error (and reading bug reports from Synergy dating back to 2014) here's what I've come up with as a work-around: 1) Open the program folder 2) Right-click on "barriers.exe" (note the S at the end, we want the server executable) 3) Open properties 4) Click "Change settings for all users" (this is the part that really stumped me, Barrier doesn't run as my user account!) 5) Click "Change High DPI Settings" 6) I'm not sure which one worked but I checked "Use this setting to fix scaling problems" and also Override high DPI scaling set to "Application" 7) OK on all the dialogs 8) Restart barrier (make sure you stop the server process and restart it so the setting takes effect.)

badvision commented 2 years ago

Can a 6-year old bug get some love?

airsoftsnake commented 2 years ago

image After a lot of trial and error (and reading bug reports from Synergy dating back to 2014) here's what I've come up with as a work-around:

Confirm that this works, important to do the "change setings for all users" I did not do that at first - I only did the change high dpi settings. Once I did the "all users", it worked. Thanks!

igoticecream commented 2 years ago

I can confirm this was the solution to my problem, I couldn't move the mouse on the client (clicks and keyboard did work). My display is 4K 150%

greenkalx commented 2 years ago

This resolved the problem for me as well. Windows server: 4k monitors with 200% scaling Linux client: single monitor 1600x1200

This wasn't a problem with Barrier 2.3.2.

yatli commented 2 years ago

Can confirm it works. It's the server program barriers.exe, not the UI program barrier.exe! :D

damienvancouver commented 2 years ago

I have tried the workaround every which way but had no luck using Windows 11, 250% scaling on my 4k builtin with an external 1440p DP -> HDMI. If I set scaling to 100% on the builtin monitor it works, but i literally have to use a magnifying glass i have sitting by the laptop if i have to look at any text on that screen, lol!

Has anyone else got the workaround to behave in win11?

Do we know what changed or where to look to start working on a fix?

EDIT: I was able to workaround by uninstalling then downloading/reinstalling barrier v2.3.4. Everything works properly with scaling using that version.

sejinK commented 2 years ago

I can't find v2.3.5 after v2.3.4 there is only v2.4.0

damienvancouver commented 2 years ago

I can't find v2.3.5 after v2.3.4 there is only v2.4.

Sorry, it is version 2.3.4 you want, my mistake!

patpadgett commented 1 year ago

Thanks! This helped me TREMENDOUSLY!

image After a lot of trial and error (and reading bug reports from Synergy dating back to 2014) here's what I've come up with as a work-around:

  1. Open the program folder
  2. Right-click on "barriers.exe" (note the S at the end, we want the server executable)
  3. Open properties
  4. Click "Change settings for all users" (this is the part that really stumped me, Barrier doesn't run as my user account!)
  5. Click "Change High DPI Settings"
  6. I'm not sure which one worked but I checked "Use this setting to fix scaling problems" and also Override high DPI scaling set to "Application"
  7. OK on all the dialogs
  8. Restart barrier (make sure you stop the server process and restart it so the setting takes effect.)
NaiveXu commented 1 year ago

image After a lot of trial and error (and reading bug reports from Synergy dating back to 2014) here's what I've come up with as a work-around:

  1. Open the program folder
  2. Right-click on "barriers.exe" (note the S at the end, we want the server executable)
  3. Open properties
  4. Click "Change settings for all users" (this is the part that really stumped me, Barrier doesn't run as my user account!)
  5. Click "Change High DPI Settings"
  6. I'm not sure which one worked but I checked "Use this setting to fix scaling problems" and also Override high DPI scaling set to "Application"
  7. OK on all the dialogs
  8. Restart barrier (make sure you stop the server process and restart it so the setting takes effect.)

thanks a lot for solving my problem!

amias-channer commented 10 months ago

would be great if this setting could be enabled by the installer

gleitoncampos commented 10 months ago

Confirmed here too, this workaround works like a charm.

hiuling commented 8 months ago

win 11 doesnt work..

SpaceCowboy850 commented 7 months ago

Barrier 2.4.0-release-3e0d758b I can't get the workaround to work. Windows 11 as server with 4K screen Ubuntu 23.10 as client

I've set C:\Program Files\Barrier\barrier.exe Properties->Compatibility -> Change Settings For All Users -> Change High DPI scaling override -> CHECKED Override high DPI scaling behavior Scaling performed by "Application"

And on dragging the mouse to my Ubuntu machine, the mouse still locks to the bottom right corner of the screen. If I change DPI scaling to 100%, everything works, but my server becomes unreadable.

Any other ideas?

kzaoaai commented 6 months ago

Putting this here in case someone had the same situation as I have. My case was MacOS server with Windows 11 client. Follow the same steps above, but instead of the "barrierS.exe" (server) file, apply them to the "barrierC.exe" (client) file.

liaoyichen123 commented 2 months ago

Solved my issues too, thanks!

jarrard commented 1 month ago

Cheers this helped me when connection a Win11 to Win10 Client. was barrierd.exe that needed that settings for me.

olaims commented 1 month ago

image After a lot of trial and error (and reading bug reports from Synergy dating back to 2014) here's what I've come up with as a work-around:

1. Open the program folder

2. Right-click on "barriers.exe" (note the S at the end, we want the server executable)

3. Open properties

4. Click "Change settings for all users" (this is the part that really stumped me, Barrier doesn't run as my user account!)

5. Click "Change High DPI Settings"

6. I'm not sure which one worked but I checked "Use this setting to fix scaling problems" and also Override high DPI scaling set to "Application"

7. OK on all the dialogs

8. Restart barrier (make sure you stop the server process and restart it so the setting takes effect.)

omg thanks a lot!! your comment should be pinned on the README.MD

sharim commented 4 weeks ago

Solved my issue on win11 server with 4K screen and 200% scaling, THANKS!!!