Bug 444769 - Wayland display scale inconsistent
Summary: Wayland display scale inconsistent
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.23.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-01 11:28 UTC by Arnaud
Modified: 2021-12-29 13:25 UTC (History)
2 users (show)

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


Attachments
Comparison between firefox, dolphin and plasma panel (248.73 KB, image/png)
2021-11-01 11:28 UTC, Arnaud
Details
Expected behavior on X11 (201.21 KB, image/png)
2021-11-01 11:30 UTC, Arnaud
Details
X-Server info on X11 (155.16 KB, image/png)
2021-11-01 11:39 UTC, Arnaud
Details
X-Server info on Wayland (191.67 KB, image/png)
2021-11-01 11:39 UTC, Arnaud
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arnaud 2021-11-01 11:28:21 UTC
Created attachment 143091 [details]
Comparison between firefox, dolphin and plasma panel

SUMMARY
When using scale factor on Wayland, apps do not scale the same way.

STEPS TO REPRODUCE
1. Start a Wayland session
2. Go to system settings -> Display and monitor -> Display configuration and set the scale to 125% 
3. Restart the session
4. Enjoy the broken scale factor

OBSERVED RESULT
XWayland apps such as Firefox and Thunderbird appear blurry, plasma panels appear way too big, while KDE apps seem fine. See attached screenshot.

EXPECTED RESULT
Scaling should feel the same as on X11.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.23
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.3
Kernel Version: 5.11.0-38-generic (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-7300HQ CPU @ 2.50GHz
Memory: 7,7 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 630
Comment 1 Arnaud 2021-11-01 11:30:28 UTC
Created attachment 143092 [details]
Expected behavior on X11
Comment 2 Arnaud 2021-11-01 11:33:46 UTC
If you open side by side both screenshots, you can clearly see the problem.

Another thing I noticed is on Wayland the screen resolution appears as 1536x864 instead of 1920x1080.
Comment 3 Arnaud 2021-11-01 11:39:05 UTC
Created attachment 143094 [details]
X-Server info on X11
Comment 4 Arnaud 2021-11-01 11:39:40 UTC
Created attachment 143095 [details]
X-Server info on Wayland
Comment 5 Nate Graham 2021-11-01 18:59:18 UTC
The plasma panel and icons being bigger is expected; you asked the system to make everything 25% bigger, so Plasma and Info Center obliged and made stuff 25% bigger. The fact that it *doesn't* do this on X11 is a bug, but one that people have gotten so used to that fixing it seems like a bug! But it is not; it is a feature. :) The fact that pixel-aligned graphics look blurry when scaled up 25% is also expected and pretty much unfixable; If you scale up something that is pixel-aligned by a non-integer amount, it it no longer pixel-aligned, and the result is blurriness if you have a lower resolution screen.

The blurriness in Firefox is for two reasons:
1. it is being run as an XWayland app, and XWayland apps are blurry at any scale above 100%
2. Even if it was run as a native Wayland app, Wayland does not have non-blurry fractional scaling yet. Scaling is only nice and sharp and crisp for native wayland apps if you use 200%, 300%, etc.
Comment 6 Arnaud 2021-12-29 00:06:16 UTC
Thanks for the information! I found how to run Firefox and Thunderbird as native Wayland apps (set env variable MOZ_ENABLE_WAYLAND=1), and everything looks good. I'll just have to avoid XWayland apps then.