Bug 469763 - Some GTK applications have a fuzzy mouse cursor with activated scaling in Wayland
Summary: Some GTK applications have a fuzzy mouse cursor with activated scaling in Way...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.5
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-14 18:51 UTC by Hexagon
Modified: 2025-02-26 00:44 UTC (History)
4 users (show)

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


Attachments
Fuzzy mouse cursor demonstration (910.09 KB, image/png)
2023-05-14 19:04 UTC, Hexagon
Details
Cursor in Plasma 6.2.3 - blurry and too big (80.18 KB, image/png)
2024-11-27 17:09 UTC, Hexagon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hexagon 2023-05-14 18:51:10 UTC
Some (can not say exactly the reason for it) applications (probably all GTK) have a fuzzy looking mouse cursor when using scaling on the system in Wayland. The programs are all running in native Wayland mode (verified with the KWin debug console). I noticed it on some flatpaks installed via Discover, but the problem also happens when I install them via the native package manager (pacman).

STEPS TO REPRODUCE
1. Start a KWin Wayland session and activate scaling on the display (f.e. 200% or 150%)
2. Install one or multiple of problematic GTK programs (f.e. as flatpak):
- Metadata Cleaner: https://flathub.org/apps/fr.romainvigier.MetadataCleaner
- Paper: https://flathub.org/apps/io.posidon.Paper
- Paper Clip: https://flathub.org/apps/io.github.diegoivan.pdf_metadata_editor
Note: Some GTK apps do NOT have this problem like: https://flathub.org/apps/org.gnome.SimpleScan
3. Open the apps and hover with the cursor over them.

OBSERVED RESULT
The mouse cursor has fuzzy low resolution asymmetric edges

EXPECTED RESULT
The mouse cursor should look sharp

SOFTWARE/OS VERSIONS
Linux: 6.3.1-arch2-1 (64-bit)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Comment 1 Hexagon 2023-05-14 19:04:41 UTC
Created attachment 158948 [details]
Fuzzy mouse cursor demonstration

I just added an image where I combined multiple screenshots to demonstrate the low resolution mouse cursor effect
Comment 2 postix 2024-11-27 14:11:43 UTC
Hi! Thank you for your report. Can you still reproduce it with more recent Plasma version? Also, do you see this for both Gtk3 and Gtk4 apps?
Comment 3 Hexagon 2024-11-27 17:09:53 UTC
Created attachment 176171 [details]
Cursor in Plasma 6.2.3 - blurry and too big

Hi, yes. Still happening on Plasma 6.2.3. The problem changed a bit, now the cursor is still blurry but 4 times as big. :)
Can be seen in the attached screenshot.
Comment 4 postix 2024-11-27 17:25:19 UTC
This seems to be an Gnome issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/7031 respectively https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7760

Should be fixed in Gtk 4.16.6 or 4.16.7, which has been tagged 6 respectively 3 days ago.
Comment 5 postix 2024-11-27 17:27:26 UTC
Feel free to re-open, when the issue persists. :)
Comment 6 postix 2024-11-27 17:45:22 UTC
Oh, sorry, those fixed won't be backported to Gtk 4.16 as of https://gitlab.gnome.org/GNOME/gtk/-/issues/7031#note_2234689
Comment 7 postix 2024-11-27 18:34:00 UTC
See also https://bugs.kde.org/show_bug.cgi?id=459161
> Metabug: Inconsistent cursor size on Wayland
Comment 8 godlyavenger 2025-02-25 23:21:15 UTC
I self-compiled and installed gtk4 and the big mouse issue is gone, but the blurry mouse issue persists on apps that use gtk4 such as gnome tweaks. Unknown if this is a GTK issue or something with Plasma.
Comment 9 Zamundaaa 2025-02-26 00:44:23 UTC
GTK doesn't use cursor shape, so it getting cursor rendering wrong is a GTK bug that you may report to GTK. Or wait for cursor shape support to be merged into GTK, which makes KWin do the cursor rendering instead.