Bug 492432 - Different fractional Global Scaling per monitor makes it impossible to view content at 100% zoom
Summary: Different fractional Global Scaling per monitor makes it impossible to view c...
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: xwayland (show other bugs)
Version: 6.1.4
Platform: NixOS Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-31 00:45 UTC by m1vri31c
Modified: 2024-11-08 02:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description m1vri31c 2024-08-31 00:45:40 UTC
SUMMARY
For certain graphics applications, it is important to be able to see a 1:1 pixel perfect view of content, usually by setting the zoom level to 100%. When fractional global scaling is used, 100% zoom no longer represents pixels dot to dot. 

I don't know how fractional scaling is implemented, but an acceptable workaround in my opinion would be to be able to bypass global scaling for certain applications or windows, ideally with the ability to then override it with their own scaling setting, with the user warned that fractional scaling has this issue and to choose integers for graphics apps.
There are ways to adjust the scaling of certain applications (env QT_SCALE_FACTOR=[x], env QT_AUTO_SCREEN_SCALE_FACTOR=[x]) but this does not actually fix the problem – the zoom on most apps is still affected in the same way by the global scaling. These also can't neatly get you back to 100% scaling since it multiplies with the global scaling, and it causes the UI to break on some applications (presumably due to scaling twice).

STEPS TO REPRODUCE
1. Set global scaling to a fraction such as 150%, 120% etc.
2. Open a graphics application such as Krita, Gwenview, DaVinci Resolve etc.
3.  Set zoom on an image or viewer to 100%

OBSERVED RESULT
Image displays at incorrect size

EXPECTED RESULT
Image displays pixels dot to dot at 100% zoom no matter your global scaling.

SOFTWARE/OS VERSIONS
Operating System: NixOS 24.11
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.8.9 (64-bit)
Graphics Platform: Wayland
Comment 1 Nate Graham 2024-09-04 03:13:33 UTC
Being able to turn off scaling on a per-app basis would mean that the UI of those apps wouldn't match the size of the UI of all the scaled apps, defeating the entire purpose of using scaling.

Ultimately the solution here is for individual apps to opt only their own image views out of the scaling system, which they can do. I would recommend opening individual bug reports for apps that should implement such features.
Comment 2 m1vri31c 2024-09-05 04:08:21 UTC
Sorry, it looks like the issue only occurs when a different scaling value is set for different monitors. If all monitors share the same Global Scaling value, or seemingly if they are integer multiples of each other (e.g. 120% and 240%), most graphics apps will display 100% zoom correctly.
Comment 3 David Edmundson 2024-09-14 21:57:56 UTC
This is working as designed and any changes are out of scope due to additional challenges involved.
Comment 4 m1vri31c 2024-11-08 02:43:30 UTC
I just wanted to update that I found two apps that are able to scale correctly with different saling per monitor: Ungoogled Chromium Wayland (presumably any chromium), and MPV player. Presumably there are more. 

Definitely not a Plasma issue, just a ubiquitous app issue, including KDE apps.
Comment 5 m1vri31c 2024-11-08 02:43:58 UTC
(In reply to m1vri31c from comment #4)
> I just wanted to update that I found two apps that are able to scale
> correctly with different saling per monitor: Ungoogled Chromium Wayland
> (presumably any chromium), and MPV player. Presumably there are more. 
> 
> Definitely not a Plasma issue, just a ubiquitous app issue, including KDE
> apps.

or it is a Qt issue.