Bug 451232

Summary: Broken font rendering for certain UI elements on Wayland
Product: [Frameworks and Libraries] frameworks-qqc2-desktop-style Reporter: Tobias G. <kde-bugzilla.oink169>
Component: generalAssignee: Marco Martin <notmart>
Status: REPORTED ---    
Severity: normal CC: ahiemstra, gudvinr+kde, kde, m.lincetto, nate, noahadvs
Priority: NOR Keywords: wayland-only
Version First Reported In: 5.92.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: bad font rendering example
Window Rules - System Settings
display settings
screen real estate
single monitor
single monitor (wayland)
display kcm

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.
Comment 9 gudvinr+kde 2025-02-19 06:49:26 UTC
Created attachment 178565 [details]
display settings

Unfortunately, not fixed.

If it's caused by something else, sorry for reopening.
Feel free to direct wherever is right.

But symptoms are exactly the same.

Operating System: Arch Linux 
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX Vega M GL Graphics
Comment 10 Nate Graham 2025-02-19 21:16:49 UTC
Darn. What scale factor(s) are you using for your screen(s)?
Comment 11 gudvinr+kde 2025-02-20 14:11:29 UTC
Created attachment 178634 [details]
screen real estate

(In reply to Nate Graham from comment #10)
> Darn. What scale factor(s) are you using for your screen(s)?

Here's my topology. Left is 125%, right 100%.
Comment 12 Nate Graham 2025-02-26 18:49:49 UTC
Can you reproduce it with only a single screen set to 125% scale? Or does it only happen when you've got multiple screens and one of them has a fractional scale factor?
Comment 13 gudvinr+kde 2025-03-01 16:00:15 UTC
Created attachment 179006 [details]
single monitor

(In reply to Nate Graham from comment #12)
> Can you reproduce it with only a single screen set to 125% scale? Or does it
> only happen when you've got multiple screens and one of them has a
> fractional scale factor?

Both. Easiest way to reproduce for me is to open QML app (I use display settings KCM here) and slowly resize window.
And it does this while you resize. When you stop resizing, artifacts persist.
Comment 14 gudvinr+kde 2025-03-01 16:04:11 UTC
Created attachment 179007 [details]
single monitor (wayland)

Sorry, last one was on X11. But it's the same on wayland with both single and dual monitor setup.
Comment 15 gudvinr+kde 2025-06-20 11:04:30 UTC
Created attachment 182416 [details]
display kcm

Still an issue

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.4.0
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Graphics Platform: Wayland
Comment 16 Nate Graham 2025-06-24 17:24:42 UTC
*** Bug 505999 has been marked as a duplicate of this bug. ***