Bug 474738 - XWayland apps look blurry when one of screens has fractional scaling enabled
Summary: XWayland apps look blurry when one of screens has fractional scaling enabled
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.4
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen, usability, wayland
: 477177 489077 491641 493479 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-09-20 14:04 UTC by indx
Modified: 2024-09-23 19:53 UTC (History)
8 users (show)

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


Attachments
VSCode with laptop's montor enabled (146.43 KB, image/png)
2023-09-20 14:05 UTC, indx
Details
VSCode with laptop's montor disabled (95.66 KB, image/png)
2023-09-20 14:06 UTC, indx
Details
screenshor 1 (163.40 KB, image/png)
2023-09-21 16:54 UTC, indx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description indx 2023-09-20 14:04:05 UTC
SUMMARY
XWayland apps look very good, when I use only one monitor (Laptop's built-in monitor, 150% scaling). But when I use my laptop with a second monitor (Laptop's built-in monitor, 150% scaling + MSI (Primary), 100% Scaling) apps still look good on built-in monitor, but they look blurry on a second monitor, compared to what they look like when I disable built-in screen.


STEPS TO REPRODUCE
1. Login to Plasma Wayland session, set laptop's built-in monitor scaling to 150%.
2. Re-login
3. Launch any XWayland app
4. Move it to the second monitor
5. Compare app's fonts with built-in monitor enabled and disabled

OBSERVED RESULT
Apps look blurry on the second monitor


EXPECTED RESULT
Apps look fine on the second monitor

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 23.04
(available in About System)
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 indx 2023-09-20 14:05:52 UTC
Created attachment 161749 [details]
VSCode with laptop's montor enabled
Comment 2 indx 2023-09-20 14:06:17 UTC
Created attachment 161750 [details]
VSCode with laptop's montor disabled
Comment 3 Nate Graham 2023-09-20 18:12:00 UTC
Can't reproduce in Plasma 6.
Comment 4 indx 2023-09-20 19:57:56 UTC
Tried on Neon Unstable with P6. Same bug, still reproducible
Comment 5 Nate Graham 2023-09-20 20:05:25 UTC
In that case I am suspecting a problem in the Hidpi support in the apps themselves. Do the affected apps look better on X11 when you with a fractional global scale?
Comment 6 indx 2023-09-21 09:26:40 UTC
On x11 they look better, but x11 supports only global scale, and I need different scales for different screens
Comment 7 Nate Graham 2023-09-21 15:32:55 UTC
Hmm, Ok, then it's not a problem in the apps' own high DPI support.

Can you open System Settings > Display and Monitor, scroll all the way to the bottom, take a screenshot of the window, and attach it here? Thanks!
Comment 8 indx 2023-09-21 16:54:06 UTC
Created attachment 161782 [details]
screenshor 1
Comment 9 indx 2023-09-21 16:54:16 UTC
(In reply to Nate Graham from comment #7)
> Hmm, Ok, then it's not a problem in the apps' own high DPI support.
> 
> Can you open System Settings > Display and Monitor, scroll all the way to
> the bottom, take a screenshot of the window, and attach it here? Thanks!

Added
Comment 10 indx 2023-09-21 20:23:04 UTC
(In reply to Nate Graham from comment #7)
> Hmm, Ok, then it's not a problem in the apps' own high DPI support.
> 
> Can you open System Settings > Display and Monitor, scroll all the way to
> the bottom, take a screenshot of the window, and attach it here? Thanks!

Apply scaling themselves option gives very good-looking apps on laptop's monitor but slightly blurry on external one
Scaled by the system gives very, very blurry apps on laptop's monitor and good-looking on external
Comment 11 David Edmundson 2023-09-21 22:14:09 UTC
It is expected that mixed scales on Xwayland will involve downscaling on one of the two screens. That's unfeasible to change.

One option that might work for you is to edit .config/kwinrc and set:

[Xwayland]
Scale[$i]=2

combined with `Apply scaling themselves`
It'll be downscaled on both monitors but from a much higher source which should hopefully look not blurry. Same as any GTK apps on those monitors.
Comment 12 Nate Graham 2023-09-21 22:18:27 UTC
Could we improve this by running a separate XWayland instance per screen or per process?
Comment 13 Bug Janitor Service 2023-10-06 03:46:27 UTC Comment hidden (spam)
Comment 14 Bug Janitor Service 2023-10-21 03:45:29 UTC Comment hidden (spam)
Comment 15 Nate Graham 2024-06-25 22:56:57 UTC
*** Bug 477177 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2024-06-25 22:57:00 UTC
*** Bug 489077 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2024-08-13 22:10:49 UTC
*** Bug 491641 has been marked as a duplicate of this bug. ***
Comment 18 Nate Graham 2024-09-23 18:53:34 UTC
*** Bug 493479 has been marked as a duplicate of this bug. ***