Thanks to visit codestin.com
Credit goes to github.com

Skip to content

HiDPI issue with multiple screen on Windows #668

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

Open
gabriele-v opened this issue Jun 15, 2021 · 32 comments
Open

HiDPI issue with multiple screen on Windows #668

gabriele-v opened this issue Jun 15, 2021 · 32 comments
Labels

Comments

@gabriele-v
Copy link

Describe the bug
I have a 15" laptop with 4K screen (200% scaling) with an external 27" 4K screen (150% scaling).
When I capture a rectangular area (tried on both monitors), if both screens are on, the image is zoomed and it's impossible to capture properly.
If I disconnect the external screen and use only the laptop one, everything is working properly.

To Reproduce
Steps to reproduce the behavior:

  1. Capture rectangular area

Expected behavior
It should behave in the same way as when only laptop screen is used

Screenshots
Difficult to grab, anyway it's like all the window is zoomed.

Desktop (please complete the following information):

  • OS: Windows 10 Pro 20H2
  • ksnip version 1.9.0 and 1.9.1-continuous
@gabriele-v gabriele-v added the bug label Jun 15, 2021
@DamirPorobic
Copy link
Member

Hello, you're probably facing this known issue #276.

Out of curiosity, do you get the same issue when both have 200% scaling?

@stethos
Copy link

stethos commented Jun 15, 2021

I might have a similar issue. This is that last build which works fine for me: Version: 1.8.0, Build: 1578-d84ec1a

Also on Win 10 20H2 and just tested 1.9.1-continous.

Screen 2 is the 4K one operating 150%, the other screens just are at 100% scaling.

screen

@gabriele-v
Copy link
Author

Hello, you're probably facing this known issue #276.

Out of curiosity, do you get the same issue when both have 200% scaling?

Yes, both at 200% I still have the issue.
Let me try with 1.8.0 as suggested above

@DamirPorobic
Copy link
Member

If it's working with 1.8.0 it might a different issue because that one is older.

@gabriele-v
Copy link
Author

I confirm the same, 1.8.0 is the last one working. Then 1.8.1, 1.8.2, 1.9.0 and continuous are broken

@gabriele-v
Copy link
Author

gabriele-v commented Jun 15, 2021

Maybe related to this? 7036cdd

@DamirPorobic
Copy link
Member

@gabriele-v Would be strange if that change had an impact on dual monitor setups but not on single monitor setups.

@gabriele-v
Copy link
Author

If you could provide me a 1.9.0 Windows build without that settings, I'll give a try.
Or anyway I'm at your disposal for any test

@stethos
Copy link

stethos commented Jun 16, 2021

I confirm the same, 1.8.0 is the last one working. Then 1.8.1, 1.8.2, 1.9.0 and continuous are broken

At least you see the same that 1.8.0 is working for you as well.

@damir: I'm also at your disposal for any test

@DamirPorobic
Copy link
Member

I'll try to look into this this week.

@DamirPorobic DamirPorobic self-assigned this Jun 16, 2021
@DamirPorobic
Copy link
Member

@gabriele-v the issue is indeed ben triggered by the AA_EnableHighDpiScaling option. I'm looking for a fix.

@DamirPorobic DamirPorobic changed the title DPI issue with multiple screen on Windows HiDPI issue with multiple screen on Windows Jun 27, 2021
@DamirPorobic
Copy link
Member

I have pushed a fix that should resolve the issue.

@stethos
Copy link

stethos commented Jun 28, 2021

Fix works for me, tx so much - good job!

@gabriele-v
Copy link
Author

If this https://github.com/ksnip/ksnip/releases/tag/continuous should contain the fix, unfortunately it's not working for me

@DamirPorobic
Copy link
Member

What arrangement of monitors are you using?

@gabriele-v
Copy link
Author

15" laptop with 4K screen (200% scaling) with an external 27" 4K screen (150% scaling)

@DamirPorobic
Copy link
Member

What are positions of those monitors and which one is main?

@DamirPorobic
Copy link
Member

Nevermind, I can reproduce with scaling on both monitors. Will look into it again.

@DamirPorobic DamirPorobic reopened this Jun 29, 2021
@gabriele-v
Copy link
Author

What are positions of those monitors and which one is main?

15" (main) bottom , 27" (secondary) vertically above

@DamirPorobic
Copy link
Member

This is indeed an ugly behavior from Qt side. The Widgets behave differently when one or multiple screens have scaling so I have added two hacks that might fix them (though I'm not sure about anything anymore in regards to HiDPI and Qt). It might be that your use case requires a third hack, multiple scaled screens ordered vertically. Though you can, just for testing, try to order your screens horizontally but keep the screen scaling and see if that is working at least. I'll have a look into the vertical screens think in next couple of days, I'm done for today.

@gabriele-v
Copy link
Author

FYI with latest continuous build I have the same issue also with only laptop 4K screen at 200%.
Thanks

@DamirPorobic
Copy link
Member

@gabriele-v I've pushed another fix, can you give it another try? The CI needs ~20min to build the package.

@DamirPorobic
Copy link
Member

@gabriele-v can you please test latest continuous build?

@gabriele-v
Copy link
Author

Tested 1.10.0-continuous build 1-0be25a5

Still not working even on only one 4K screen with 200%

@stethos
Copy link

stethos commented Nov 22, 2021

Still works for me, ksnip-log.txt reports (if it helps):
Screen Count: 4; Resolution: x=-1920 y=0 w=8040 h=2407
´Version seems to be higher compared to gabriele-v one: 1.10.0 1-76e65c7

@DamirPorobic
Copy link
Member

Really puzzling what Windows is doing. I have another user with a similar issue just happening when one screen is turned off, same setup, same binaries, he has the issue and I cannot reproduce it.

@ihipop
Copy link

ihipop commented Nov 30, 2021

Maybe related? flameshot-org/flameshot#1386 (comment)

But spectacle works well, which also use QT

@DamirPorobic
Copy link
Member

DamirPorobic commented Nov 30, 2021

@ihipop Yeah, could be same issue, we have a similar issue on Linux #276
Problem is that I cannot reproduce this on my machine. If you issue is Linux related maybe better to switch to the other issue and provide Distro info so I can try to reproduce.

Spectacle is different, it's closely coupled with kWin and it gets it's screenshots from there, not by utilizing Qt like we do. We cannot do that as we run in cross platform environments.

@DamirPorobic
Copy link
Member

@gabriele-v is for you the image still incorrectly scaled or just incorrectly positioned? If it's just the position, you can now configure an offset for the snipping area positioning, Options > Settings > ImageGrabber > SnippingArea, if you want to give it a try.

@DamirPorobic DamirPorobic removed their assignment Mar 15, 2023
@vincenzocaselli
Copy link

Hi,
I am using Linux Mint 22 (Cinnamon), no HiDPI, but have 3 monitors all set to 125% fractional scaling.
I got the similar big problems in capturing rectangular areas, with version 1.10.1.
Reading messages in this issue, I tried version 1.8.0 and this version has no the above problems!
Hope this can help in resolving the problem in next versions.
Available to provide details if helpful.
Thank you

@viharm
Copy link

viharm commented Aug 23, 2024

How do you install a specific version?

@vincenzocaselli
Copy link

vincenzocaselli commented Aug 23, 2024

How do you install a specific version?

E.g.
you want to install 1.8.0 => go to https://github.com/ksnip/ksnip/releases/tag/v1.8.0 and download the package depending on your distro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants