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

UHD/4K DPI scaling broken on Windows server #4041

Closed
nbolton opened this issue Oct 13, 2014 · 62 comments
Closed

UHD/4K DPI scaling broken on Windows server #4041

nbolton opened this issue Oct 13, 2014 · 62 comments
Labels
bug There is an error or the program doesn't work properly
Milestone

Comments

@nbolton
Copy link
Member

nbolton commented Oct 13, 2014

Imported issue:

  • Author: James White
  • Date: 2014-07-22 21:50:56
  • Legacy ID: 4111
  • Version: 1.5.0

Since an unspecified update to Windows 8.1 (I can't track the exact update at this time) Synergy 1.5 and 1.5.1 no longer works properly when a HiDPI device is configured as the server. In my case I'm using a Dell XPS 9530 running Windows 8.1 Update 1 with all the latest updates, with a screen resolution of 3200 x 1800 using DPI scaling.

What happens on all clients in my setup (regardless of Operating System) is when the focus is moved to said client, the mouse cursor immediately jumps to the bottom right hand side of the screen and becomes stuck, it cannot move, but mouse buttons and keyboard input are still correctly captured. Unfortunately, the only way to unstick the mouse is to kill the Synergy client software on the client machine. Because of this Synergy has now become unusable on my setup.

Steps to reproduce:

  1. Setup a Windows device as the Synergy server using a DPI scaling factor greater than 100%
  2. Connect any client, which can be Windows, Mac OS X or Linux (this bug is dependant on the server)
  3. Move the mouse cursor towards the client to switch the focus

Expected: Mouse should be able to move freely on the client as normal

Actual: On focus on the client the mouse immediately gets placed in the bottom right hand corner of the client screen and becomes stuck, unable to move.

Versions and operating systems:

Tested with the following setup:

Windows 8.1 with 200% scaling (Server)

Ubuntu 14.04 normal DPI (Client)

Windows 8.1 normal DPI (Client)

Temporary workarounds:

Best workaround:

Disable Desktop Scaling for all users on the synergys.exe.

To do this, go to the installer directory of Synergy, this is usually:

C:\Program Files\Synergy or C:\Program Files (x86)\Synergy

Locate synergys.exe, right click on the executable and click properties. Select the compatibility tab and click "Change settings for all users". Tick the Disable scaling on high DPI settings" tick box and apply the settings. Restart the synergys.exe via the GUI or via services.msc.

This should give you normal functionality back without the mouse sticking in the corner, noticeable side affects of this workaround appear to be the mouse speed being faster on the client.

Credit to Christian Liebscher for finding this workaround.

Other workarounds:

Disable Desktop Scaling i.e. switch to 100%. (Note: this will be not be possible on high resolution devices, because the UI will be tiny)

Spaces out clients displays and disable automatic switching. Use user defined keystrokes. See http://superuser.com/a/771618 for more info.

Do not configure a Windows device that is using DPI scaling as the server, designate an alternative device as the server and connect as a client.

Similar bugs:

None.

Additional comments:

This problem initially wasn't present but as occurred more recently. It is likely that an update via Windows Update has broken this or an API change related to DPI is the cause.

@nbolton
Copy link
Member Author

nbolton commented Oct 13, 2014

  • Author: James White
  • Date: 2014-07-25 09:47:56

Seems to be related when Desktop scaling is in use. Users report that disabling desktop scaling i.e. set back to 100%%, everything works fine. If however desktop scaling is in use i.e. 125%%, 150%% etc, the problems occur.

Unfortunately, desktop scaling cannot be disabled for HiDPI devices because the desktop would be tiny.

@nbolton
Copy link
Member Author

nbolton commented Oct 13, 2014

  • Author: Maurice Gilden
  • Date: 2014-07-28 15:01:38

I have this problem on Windows 7 (server, HDPI) + Windows 8.0 (client) as well with 1.4.17, or at least I think I do. When the mouse switches to the other PC it sometimes works and other times I completely lose my mouse (can't move it on either PC) and I have to press Ctrl+Alt+Del to get it back.

@nbolton
Copy link
Member Author

nbolton commented Oct 13, 2014

  • Author: Nate Bross
  • Date: 2014-08-01 21:50:30

I am having this same issue. I have confirmed that disabling desktop scaling fixes the problem. I am using a Surface Pro 2 as the server with Windows 8.1 Update 1.

@nbolton
Copy link
Member Author

nbolton commented Oct 13, 2014

  • Author: Nate Bross
  • Date: 2014-08-01 21:58:34

The display scaling appears to not be a factor when it is acting as a client. I was able to switch the SP2 as a "client" and was able to control it with another machine.

@nbolton
Copy link
Member Author

nbolton commented Oct 13, 2014

  • Author: James White
  • Date: 2014-08-05 14:54:06

Updated the original issue information after it appears it doesn't really matter if the device in question is high resolution or not. If a Windows device that uses DPI scaling is configured as the server then the problem will occur.

Also added a couple of workarounds since posting.

@nbolton
Copy link
Member Author

nbolton commented Oct 13, 2014

  • Author: Christian Liebscher
  • Date: 2014-08-09 20:12:32

I also ran into this problem today. Maybe the following information helps.
My setup consists of a Windows 8.1 Server with 150%% DPI and Linux Mint as Client (no scaling).
Unfortunally the only feasible workaround - number two - does not work for me. I added spacing and hotkeys to switch manually between my screens. The Windows site behaves normally with that change. Before control just jumped to the linux mint screen as soon as the client connected, and the mouse pointer frooze. Now this happens only after using the hotkeys.

In both cases I see lots of "DEBUG: SetCursorPos did not work; using fakeMouseMove instead" on the server and the mouse is completely stuck in place.

@nbolton
Copy link
Member Author

nbolton commented Oct 13, 2014

  • Author: Christian Liebscher
  • Date: 2014-08-10 19:24:24

After thinking about it some more, I found a working workaround.

Note: my windows installation is in german, so my translations are probably way off!

  • go to the synergy install folder
  • right click on synergys.exe -> Properties
  • go to the tab: compatibility
  • "Change Settings for all users" (synergys seems to run as a different user)
  • enable the checkbox for "Deactivate scaling for high DPI value" (the one above run as admin)
  • OK -> Done here
  • (re)start your synergy server via the gui

The mouse on the client is a bit faster than on the server, but at least it works now. You can even switch between the screens automatically.

For the devs:
I looked at the source code, in particular where the DEBUG message gets printed. It seems GetCursorPos does not work as you would expect on a server with DPI scaling.
In the comments on MSDN Reference on GetCursorPos someone suggested to have a look at GetPhysicalCursorPos and the dpiaware settings in the applications manifest.

I would try that myself, but I don't have a clue how to build synergy on windows. The explanations in your wiki Synergy Wiki Compiling are a bit short for someone who has no strong background in developing on windows. What exactly do I have to do on Windows x64, without buying a licence for visual studio? Is there an express edition that works for x64? Maybe someone could extend that wiki page.

BTW: building on linux was easy, but the code in question is windows specific ;-)

@nbolton
Copy link
Member Author

nbolton commented Oct 13, 2014

  • Author: James White
  • Date: 2014-08-10 19:37:08

Good catch there Christian, I tried this setting a while ago, but didn't think to use the change settings for all users option, not realising Synergy runs under a different user.

Confirmed this is solid workaround for any Windows 7/8/8/1 device using DPI scaling configured as the server. I'll add it to the original issue post.

@valentinpy
Copy link

I've been able to solve the problem by changing compatibility mode for synergy.exe AND synergys.exe (server process) to "Deactivate scaling for hiDPI" and "run as Windows 7" and by setting those options for "all users"

(Tested on Windows 8.1 pro, DPI Scaling 200%)

@sancheza
Copy link

Thanks for the suggestion. I hadn't used synergy in months because of this exact issue. This fixed it finally!

@mabott
Copy link

mabott commented Dec 4, 2014

Deactivating desktop scaling works, but is super tiny on this 1440p display.

For some reason on my Windows 7 box I'm unable to select the checkbox "Deactivate scaling..." on synergys.exe. The checkbox itself is greyed out whether I'm changing the setting for all users, or for just me. I was able to change it for all users on synergy.exe, but that had no effect on a similar 'overlap' issue I'm getting.

I found a different workaround in Windows 7 and am trying it on to see if I can deal with it. Control Panel->Appearance and Personalization->Display, click Set Custom text size (DPI) on the left sidebar, then check the "Use Windows XP style DPI scaling". Logout and login makes it all work great.

Unfortunately things that don't work well with Windows XP style DPI scaling look tiny. Steam is one of them.

@the-wes the-wes added the bug There is an error or the program doesn't work properly label Dec 15, 2014
@the-wes the-wes added this to the Soon milestone Dec 15, 2014
@the-wes the-wes modified the milestones: Next, Soon Dec 23, 2014
@PtrDr
Copy link

PtrDr commented Dec 31, 2014

I recently reported this issue to Wes at Synergy support. I add it here, in case it can help anyone else who understand coding and such-like. I am not sure that I have the super-high resolution display discussed in this thread, but I did follow the suggestions to disable the high DPI settings on the synergys.exe file. This has taken car of the first of the two problems mentioned below. A big plus already!
The second problem continues. Since it appeared suddenly, it may have to do with a program that I had just installed, although I cannot be sure. I am planning to do some significant restructuring of the system drive, so if I find anything out, I will report it here.

This is the report I submitted to the Synergy Support:

Hi Synergetics:

Recent problem suddenly appeared, and I cannot find why. Upgrading to Version 151 has not solved the problem. Both computers are running Windows 7, 64 bit. All was working working properly until recently...

There are two issues:

  1. The mouse can only enter the client screen near the bottom left of the Server monitor. (Client is to the left of server). It can re-enter the server screen anywhere along the right edge of the client screen, as usual. If I try to go over to the client screen anywhere on the left of the server screen, the mouse appears to "bounce" off the edge of the screen and comes to rest a few inches from the edge of the server screen. The log shows the mouse as entering the client then returning almost immediately. Once I have successfully moved into the client screen, all works as it should, including returning as usual --- except when--->>
  2. Except when there are large windows open on the server screen. In order to be able to enter from the server to the client, I usually have to close or minimize the windows on the server computer. If I do not, the mouse apparently enters the client screen, but then disappears. The windows all go transparent, and some kinds of activity seems to happen, sometimes. But the mouse is lost from view, and I cannot get it back to the server screen. The only way I can recover is to use the Ctrl-Alt-Del keys: the mouse reappears on the server window, I click on Cancel button and the server screen comes back, with the mouse in normal functional mode. In order to user Synergy again, though, I have to use the client's own mouse, open Synergy, click on Stop then click on Start, and I can now use Synergy, as above.

Any additional thoughts would be welcome.

Peter

Hi Synergetics:

Recent problem suddenly appeared, and I cannot find why. Upgrading to Version 151 has not solved the problem. Both computers are running Windows 7, 64 bit. All was working working properly until recently...

There are two issues:

  1. The mouse can only enter the client screen near the bottom left of the Server monitor. (Client is to the left of server). It can re-enter the server screen anywhere along the right edge of the client screen, as usual. If I try to go over to the client screen anywhere on the left of the server screen, the mouse appears to "bounce" off the edge of the screen and come to rest a few inches from the edge of the server screen. The log shows the mouse as entering the client then returning almost immediately. Once I have successfully moved into the client screen, all works as it should, including returning as usual ---
    except when--->>
  2. Except when there are large windows open on the server screen. In order to be able to enter from the server to the client, I usually have to close or minimize the windows on the server computer. If I do not, the mouse apparently enters the client screen, but then disappears. The windows all go transparent, and some kinds of activity happens, sometimes. But the mouse is lost from view, and I cannot get it back to the server screen. The only way I can recover is to use the Ctrl-Alt-Del keys : the mouse reappears on the server window, I click on Cancel button and the server screen comes back, with the mouse in normal functional mode. In order to user Synergy again, though, I have to use the cleint's own mouse, open Synergy, click on Stop then click on Start, and I can now user Synergy, as above.

@the-wes
Copy link
Contributor

the-wes commented Jan 1, 2015

I think similar issues happen with other OSes as server as well.

@keeran
Copy link

keeran commented Jan 11, 2015

Having the same issue and unable to disable display scaling on synergys.exe (option is disabled).

@fuzzzerd
Copy link

I see the workaround, but the bug is closed. Is there a planned fix for this or is the workaround posted above the long-term fix?

@PtrDr
Copy link

PtrDr commented Jan 20, 2015

Hi fuzzerd: I don't know if the Synergy people are working on this, but I recently added the workaround suggested by mabott to the other settings with the synergys.exe file:

"Control Panel->Appearance and Personalization->Display, click Set Custom text size (DPI) on the left sidebar, then check the "Use Windows XP style DPI scaling". "

That, with the other settings I previously reported, gets Synergy back to "normal" .The problem with the open windows of certain programs seems to have gone away. Of course, that is just my own particular set-up, and may be of no use to others. I still do not know what provoked it in the first place as I had not touched those settings for a long time. I hope that Synergy support gurus are still trying to find the root of the problem.

@PtrDr
Copy link

PtrDr commented Jan 21, 2015

Oops! I spoke too soon.

While it is true that Synergy works now as expected, the change to the Win XP DPI scaling wreaks havoc on a number of programs -- in particular by shrinking down the type in the programs to an unreadable small font size. So I have unchecked that setting again, so that I can see what I am doing. I do not really have the time to mess around with the font settings in half-a-dozen programs that I use frequently...

I hope that this bug is not "closed" but actively being pursued.

Peter

@fuzzzerd
Copy link

This is exactly the issue; it works fine if you disable DPI scaling for the entire operating system, but on devices with high dpi that is not a solution, because as you mention sizes of screen elements are too small to see.

I have not yet tested out the settings specifically on the DPI settings for the synergy service; but even still that seems like a poor solution to a problem. Some how mouse without borders doesn't have this issue. While that's a separate topic, it seems like there has to be a way to fix this inside the synergy service.

@the-wes
Copy link
Contributor

the-wes commented Feb 2, 2015

PtrDr - I am not sure where you're seeing this bug is closed, it is very open and high priority for Synergy.

fuzzzerd - Of course, the workarounds are not in any way intended to be the "fix" for the issue. It's just to get us by until we can find a good permanent solution.

@PtrDr
Copy link

PtrDr commented Feb 3, 2015

the-wes: Thanks for the clarification. I see a Closed button beside "Cursor jumps down and to the right #4016" on Jan 1. Maybe that refers to a different, but related topic, that perhaps has been rolled into this one? Anyway, i am very glad that someone much smarter than I am is working on it :) Best luck to those toiling away at it.

@nbolton nbolton modified the milestone: Next Mar 5, 2015
@nlyan
Copy link
Contributor

nlyan commented Sep 12, 2016

Reopening. Related issues that need attention that seem to related to this : #5590 and #5186

@WhiskeyBravo
Copy link

Just diagnosed and found this issue using Sierra (client) + Win10 (server) on a new laptop (150% HiDPI recommended). Both client and server running 1.8.3 stable with OS appropriate builds.

@nlyan
Copy link
Contributor

nlyan commented Oct 5, 2016

Could anyone experiencing DPI scaling related issues on Windows 10 please try this build and let us know if there any changes in behaviour?

http://symless.com/nightly?filter=1.8.4-rc1-e6a3caa

@WhiskeyBravo
Copy link

This build appears to fix the issue. After upgrading to the nightly, my previous compatibility settings to disable DPI scaling were still applied so I removed them. After installing the nightly, removing compat settings, and then rebooting it is working well. I did not upgrade the client (MacOS Sierra).
I took screenshots of the existing setup to confirm config.
capture2
capture1

@dvv47
Copy link

dvv47 commented Oct 5, 2016

This updates fixes movement rigth and down. But now speed on client computer too high.
My main monitor have 250% scaling and client 100%
And looks like on client speed must be in 2.5 times slower

@nlyan
Copy link
Contributor

nlyan commented Oct 5, 2016

@WhiskeyBravo thanks for the feedback. we just disabled DPI scaling at source in this build.

@dvv47 thanks

@nlyan
Copy link
Contributor

nlyan commented Oct 6, 2016

@dvv47 Could you try this build?

http://symless.com/nightly?filter=b112617

It'll be there as soon as the buildbot is done. Would be much appreciated.

@dvv47
Copy link

dvv47 commented Oct 6, 2016

@nlyan Thanks, with build 112617 all works as expected.
With mouse and touchpad.

@nlyan nlyan added this to the v1.8.4-stable milestone Oct 6, 2016
@nlyan nlyan closed this as completed Oct 6, 2016
@PtrDr
Copy link

PtrDr commented Oct 6, 2016

I noticed that in the discussion people were referring to Win 10. Does it apply to Win 10 Home as well as Pro and other types of Win variations? And the recent W10 upgrades? Is it also compatible with Win 7?

@nlyan
Copy link
Contributor

nlyan commented Oct 7, 2016

@PtrDr as far as I am able to determine this was caused by the changes in behaviour with respect to DPI scaling across Windows versions 8, 8.1 and 10. Windows 10 now has DPI scaling factors for each screen independently. Windows Edition (Home vs Pro) won't make a difference.

@PtrDr
Copy link

PtrDr commented Oct 7, 2016

@nylan: Thanks for the reply. I originally ran across this problem with 2 computers running Win7. The two monitors were exactly the same. I did report the problem and efforts were made at the time to resolve the issue. Eventually had to abandon Synergy as it was having a serious impact on my daily work. . Do you (or any others who have been involved with this issue) know if the most recent build has solved it for Win 7 also?

@nlyan
Copy link
Contributor

nlyan commented Oct 7, 2016

@PtrDr

I don't know for sure, all I can suggest is you try Synergy again :)

https://symless.com/nightly?filter=1.8.4-rc3

xhou-wavefin pushed a commit that referenced this issue Oct 25, 2016
xhou-wavefin pushed a commit that referenced this issue Oct 25, 2016
xhou-wavefin pushed a commit that referenced this issue Oct 25, 2016
@giammin
Copy link

giammin commented Apr 27, 2017

this problem came up again on 1.8.8

@jongrant
Copy link

This bug is back in Windows 10 r1709. The fix that eventually worked for me was to remove the "Run in compatibility mode for: Windows 7" setting on synergys.exe. Unfortunately the configuration tool forces this setting back on any time you open it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug There is an error or the program doesn't work properly
Projects
None yet
Development

No branches or pull requests