Bug 451232 - Broken font rendering in wayland
Summary: Broken font rendering in wayland
Status: RESOLVED FIXED
Alias: None
Product: frameworks-qqc2-desktop-style
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.92.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2022-03-07 12:03 UTC by Tobias G.
Modified: 2024-08-20 20:55 UTC (History)
5 users (show)

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


Attachments
bad font rendering example (145.06 KB, image/png)
2022-03-07 12:03 UTC, Tobias G.
Details
Window Rules - System Settings (35.95 KB, image/png)
2022-05-05 00:05 UTC, gudvinr+kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias G. 2022-03-07 12:03:24 UTC
Created attachment 147344 [details]
bad font rendering example

SUMMARY

Hey there,
I recently switched from x11 to wayland. I have two displays, one turned by 90° (Display 1), one oriented normally (Display 0).
Display 0 is set to 100% scale, Display 1 to 125% scale.
In some places, like the system settings window, fonts are broken (see attachment), which really makes it hard to read it.
Ironically, it's especially bad in the font settings of plasma :D
I own an nvidia graphics card with proprietary drivers.


STEPS TO REPRODUCE
1.  switch to wayland
2.  set two displays to different scale factors
3. try to read text

OBSERVED RESULT
Font is partly unreadable

EXPECTED RESULT
font looks clear as water

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.24.2
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.16.11-2-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-6700K CPU @ 4.00GHz
Memory: 23.4 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1080/PCIe/SSE2

ADDITIONAL INFORMATION
I wasn't sure which component's fault it is, so I just put it in the general category, sorry
Comment 1 Nate Graham 2022-03-22 15:34:10 UTC
Does it go away if you restart the affected app?

Does it affect QtWidgets apps like Dolphin?
Comment 2 Tobias G. 2022-03-22 23:12:15 UTC
(In reply to Nate Graham from comment #1)
> Does it go away if you restart the affected app?
> 
> Does it affect QtWidgets apps like Dolphin?

Unfortunately, it doesn't go away after restarting the app and it doesn't happen with Dolphin.
Comment 3 Nate Graham 2022-03-23 15:51:30 UTC
And it doesn't happen with anything in Plasma itself, right? Like text in Kickoff of the Task Manager or icons on the desktop?
Comment 4 Tobias G. 2022-03-23 22:46:07 UTC
(In reply to Nate Graham from comment #3)
> And it doesn't happen with anything in Plasma itself, right? Like text in
> Kickoff of the Task Manager or icons on the desktop?

No, neither in kickoff, icons on the desktop nor in the task manager in the panel.
Comment 5 Nate Graham 2022-03-31 18:46:31 UTC
Ok, that means that the problem is limited to software using qqc2-desktop-style, or QtQuick style for apps. That style uses graphics from the QtWidgets style. So the issue is either in KStyleItem which gets the image, or else deeper in the stack and related to the GPU rendering.

Cannot reproduce with 125% scale on Wayland using an Intel HD 620 GPU. May be NVIDIA-related.
Comment 6 gudvinr+kde 2022-05-05 00:05:02 UTC
Created attachment 148566 [details]
Window Rules - System Settings

I am getting this issue on AMD GPU but only with one screen.
I have one primary (2160p@130% + 1440p@100%) and when I use settings on second screen I'm getting artifacts.
Comment 7 Tobias G. 2022-11-06 21:47:50 UTC
Hey there,

I tested a few things and I noticed that all my text looks broken, when I disable font smoothing (disabling anti-aliasing).
Might it be that it's not applied everywhere for some reason on my system?
Comment 8 Nate Graham 2024-08-20 20:55:38 UTC
This should definitely be fixed in Plasma 6. I haven't been able to reproduce it in a long time.