Bug 412088 - Xwayland apps become blurry after I enable fractional display scaling
Summary: Xwayland apps become blurry after I enable fractional display scaling
Status: RESOLVED DUPLICATE of bug 389191
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.18.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL: https://gitlab.freedesktop.org/xorg/x...
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2019-09-19 22:02 UTC by Patrick Silva
Modified: 2020-10-11 03:26 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2019-09-19 22:02:55 UTC
STEPS TO REPRODUCE
1. start Wayland session
2. search for "display confguration" KCM in the apps launcher and open it
3. set display scale factor (I use 1.2)
4. click 'Apply" button
5. open any Xwayland app (Firefox, gimp, inkscape, for example)

OBSERVED RESULT
the app looks blurry

EXPECTED RESULT
the app looks crisp

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.16.90
KDE Frameworks Version: 5.62.0
Qt Version: 5.13.1
Comment 1 Roman Gilg 2019-09-20 09:10:37 UTC
Did you use a scale factor of 1 before? Since it's only in XWayland apps I assume it's the old general problem of XWayland not having High DPI support at the moment.
Comment 2 Patrick Silva 2019-09-20 11:25:30 UTC
(In reply to Roman Gilg from comment #1)
> Did you use a scale factor of 1 before? 
Yes. I never changed scale factor on Wayland before Plasma 5.17 beta.

Window decorations of apps running natively on Wayland are blurry too - see bug 412089
Comment 3 humufr 2019-09-20 20:07:33 UTC
I am sorry if I do not understand but I tried to have the same applications open on Gnome Wayland and so using also Xwayland and the problem is not there. 
Is it desktop dependent Xwayland behavior?
Comment 4 humufr 2019-09-22 21:04:32 UTC
My mistake I am answering myself related to Gnome. There are no fractional display for this WM.
Comment 5 humufr 2019-09-22 21:15:03 UTC
But the problem with plasma and wayland is that even for a non fractional display (in theory) the problem is there. I am suspecting that the scaling is **always** rational (2x should not) and so we have this bug with Xwayland for every single scale. It means using plasma wayland with any application using Xwayland means a very degraded situation.
Comment 6 Roman Gilg 2019-10-01 15:28:04 UTC
(In reply to humufr from comment #3)
> I am sorry if I do not understand but I tried to have the same applications
> open on Gnome Wayland and so using also Xwayland and the problem is not
> there. 
> Is it desktop dependent Xwayland behavior?

Yes, GNOME currently uses an alternative concept of outputs with XWayland which allows sharp images for HiDPI aware X11 clients.

The downside is that in a multi-DPI setup (that means you have a 4K display with scaling value 2 and a FHD display with scaling value 1 for example) windows are way too large or small on one of the displays or snap in size when moving from one to the other display.

Because of that GNOME thought in the past to also move to the concept we in KWin (and FWIW wlroots use), but they didn't yet, probably because they prioritized HiDPI aware X11 clients to not become blurry.

Still it's sub-optimal in both cases. An alternative solution idea would be max-factor rescaling, what I proposed some time ago:
https://gitlab.freedesktop.org/xorg/xserver/merge_requests/111
Comment 7 humufr 2019-10-22 20:56:54 UTC
I understand but as it is plasma-wayland is not usable at all (I do not want to have headache at the end of the day). Thanks to look at that problem.
Comment 8 Claudius Ellsel 2020-08-10 11:38:25 UTC
(In reply to Roman Gilg from comment #1)
> Did you use a scale factor of 1 before? Since it's only in XWayland apps I
> assume it's the old general problem of XWayland not having High DPI support
> at the moment.

Do you imply that it should also be blurry with a scale factor of 1?

I can reproduce this issue with a scale factor set (1.25), but on scale factor 1 everything looks perfectly crisp (testing with Firefox).
Comment 9 Nate Graham 2020-09-10 02:44:54 UTC
Looks like there's nothing we can really do here on the KDE side yet/at all. Let's follow up upstream, at https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/111 (or https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/432). Once one of those is merged, we can figure out what we'll need to do in KWin or KScreen, if anything.
Comment 10 Nate Graham 2020-10-11 03:26:48 UTC

*** This bug has been marked as a duplicate of bug 389191 ***