Bug 385920

Summary: [Wayland] With "resolution dependent" size, cursor is huge when hovering over Plasma desktop
Product: [Plasma] plasmashell Reporter: Dennis Schridde <heri+kde>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED FIXED    
Severity: normal CC: aspotashev, bastianholst, bojescu.mihai, brianaberts, bugseforuns, bugzilla-kde, fabio96.ck, hujq, jgrulich, johannes.pointner, jreznik, ken20001, klaussemmler, l.jirkovsky, leszek.lesner, mahen, meven29, michal.dybczak, nate, notuxius, olivier, oss+kde+bugzilla, plasma-bugs, postix, sebastien.guerin.news, sergei.chernikov, silvio.frischi, simone.tolotti, subdiff
Priority: NOR Keywords: wayland
Version: 5.18.0Flags: nate: Wayland+
Target Milestone: 1.0   
Platform: unspecified   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=413783
Latest Commit: Version Fixed In: 5.19
Sentry Crash Report:
Attachments: Big cursor while on desktop
Big cursor while inside a window
WAYLAND_DEBUG=1 konsole &>konsole.log

Description Dennis Schridde 2017-10-18 18:07:50 UTC
The mouse cursor is huge, when I hover it over the Plasma desktop. It becomes normal sized when hovering it over Firefox or window decorations (KWin).

# xrandr says:
Screen 0: minimum 320 x 200, current 2560 x 1080, maximum 8192 x 8192
XWAYLAND0 connected 2560x1080+0+0 (normal left inverted right x axis y axis) 800mm x 340mm
   2560x1080     59.98*+

The monitor is a LG 29UM67-P: http://www.lg.com/us/monitors/lg-29UM67-P-ultrawide-led-monitor
Comment 1 Dennis Schridde 2017-10-18 18:50:12 UTC
Wayland: 1.14.0
Wayland protocols: 1.11
KDE Frameworks: 5.39.0
Plasma: 5.11.1
KDE Apps: 17.08.2
Mesa: 17.2.2
Linux: 4.13.5 (Gentoo)

eglinfo: https://bugs.kde.org/attachment.cgi?id=108441
glxinfo: https://bugs.kde.org/attachment.cgi?id=108442
Comment 2 Dennis Schridde 2017-10-18 19:13:01 UTC
Qt: 5.9.2
Comment 3 Alexander Mentyu 2017-11-21 09:28:40 UTC
related/duplicate? - https://bugs.kde.org/show_bug.cgi?id=376245
Comment 4 Dennis Schridde 2017-11-21 17:39:27 UTC
(In reply to Alexander Mentyu from comment #3)
> related/duplicate? - bug #376245

Maybe, but the reporter of that bug appears to refer to an X11 setup, while I see this using Wayland only. When I switch to X11 (i.e. "Plasma" instead of "Plasma (Wayland)"), the problem does not appear. Additionally, I also see the small cursor for other/X11 applications, not only for KWin. At the very least we should copy over some information from this report to the other.
Comment 5 Lukas Jirkovsky 2017-11-22 21:11:38 UTC
I have the same problem on Arch Linux:

Plasma: 5.11.3
KDE Frameworks 5.40
Wayland 1.14
Qt: 5.9.3

However, I think the problem may not be in Plasma but in Qt. The reason is that anything running XWayland (eg. firefox) or GTK3 has correct cursor size. The cursor also has the correct size when hovering over window decorations as mentioned in the original report. All Qt5-based apps (eg. kwrite, clementine...) have huge cursor size.
Comment 6 Lukas Jirkovsky 2017-11-22 21:19:39 UTC
I forgot to mention that it happens only with Wayland, X11 is not affected.
Comment 7 Mihai Bojescu 2018-01-04 20:15:42 UTC
Created attachment 109675 [details]
Big cursor while on desktop
Comment 8 Mihai Bojescu 2018-01-04 20:16:35 UTC
Created attachment 109676 [details]
Big cursor while inside a window
Comment 9 Mihai Bojescu 2018-01-04 20:21:18 UTC
I'm also affected on plasma desktop version 5.11.5-1 (on Arch Linux). Added screenshots as examples.
Comment 10 Patrick Silva 2018-01-04 20:46:30 UTC
this bug is not happening on my neon dev unstable.
But I also can confirm it on Arch Linux, plasma 5.11.5.
Comment 11 Mahendra Tallur 2018-01-05 00:07:03 UTC
It occurs on Neon (stable - non LTS). Plasma 5.11.5.
Also sometimes the mouse cursor gets stuck in an incorrect state (for instance, is show as a resizing cursor even when the mouse has left the edge of a window).
Comment 12 Dennis Schridde 2018-01-05 04:18:21 UTC
(In reply to Mahendra Tallur from comment #11)
> Also sometimes the mouse cursor gets stuck in an incorrect state (for
> instance, is show as a resizing cursor even when the mouse has left the edge
> of a window).

This might not be Wayland related, as I also see this on X11 with certain applications (e.g. Firefox).  In any case I believe this should be tracked as a separate bug.
Comment 13 Mahendra Tallur 2018-01-05 08:54:50 UTC
> This might not be Wayland related, as I also see this on X11 with certain
> applications (e.g. Firefox).  In any case I believe this should be tracked
> as a separate bug.

OK ! In my case it only occurs under the Wayland session, though. It happens constantly in Dolphin / Wayland for instance.
Comment 14 Patrick Silva 2018-01-17 15:05:37 UTC
Same bug in plasma 5.12 beta, Arch Linux.
Cursor is bigger when I hover any native Wayland software (except its window decoration).
Xwayland softwares are not affected.
Comment 15 Patrick Silva 2018-01-18 21:13:04 UTC
*** Bug 389178 has been marked as a duplicate of this bug. ***
Comment 16 Fabio 2018-01-20 20:40:05 UTC
(In reply to Dr. Chapatin from comment #14)
> Same bug in plasma 5.12 beta, Arch Linux.
> Cursor is bigger when I hover any native Wayland software (except its window
> decoration).
> Xwayland softwares are not affected.

Same thing happening to me on the same system (latest Arch with Plasma 5.11.95).
Setting the breeze cursor to 24 instead of "resolution dependent" in systemsettings fixed it.
Comment 17 Patrick Silva 2018-02-08 21:19:30 UTC
(In reply to Dr. Chapatin from comment #14)
> Cursor is bigger when I hover any native Wayland software (except its window
> decoration).
> Xwayland softwares are not affected.

on neon dev unstable only breeze and breeze snow cursor themes are affected.
I have capitaine and obsidian themes installed from kde store. When I use any of them, cursor size is always the same under Wayland even if size is "resolution dependent".
Comment 18 Jaroslav Reznik 2018-02-26 14:36:57 UTC
(In reply to Dennis Schridde from comment #12)
> (In reply to Mahendra Tallur from comment #11)
> > Also sometimes the mouse cursor gets stuck in an incorrect state (for
> > instance, is show as a resizing cursor even when the mouse has left the edge
> > of a window).
> 
> This might not be Wayland related, as I also see this on X11 with certain
> applications (e.g. Firefox).  In any case I believe this should be tracked
> as a separate bug.

Initially I've seen this only in Wayland session but after playing with additional cursor themes, it indeed looks like it's not Wayland specific (or just caused by changing settings under Wayland session?) but for me it looks like some caching issue. 

Breeze first used under X11 - ok under X11, I'm seeing this behavior under Wayland. Adwaita theme first used under Wayland - I can now see the same behavior under X11. I can try it with clean account and with and without 2560x1440 external display connected.
Comment 19 Roman Gilg 2018-06-13 07:21:52 UTC
Might be fixed with https://phabricator.kde.org/D13267
Comment 20 Sebastian Hirsch 2018-09-14 20:50:24 UTC
This is still an issue in Plasma 5.13.90. I have tested it with KDE Neon Dev Unstable. The cursor is way too big and only on window decorations normally sized.
Comment 21 Leszek Lesner 2018-11-07 13:51:20 UTC
Tested with 5.14.3 still an issue there.
Comment 22 Simone 2019-01-02 20:15:10 UTC
Still an issue on:
plasma-workspace-5.14.4-1.fc29
Comment 23 Patrick Silva 2019-01-02 20:32:43 UTC
Already reported in Qt bug tracker.
https://bugreports.qt.io/browse/QTBUG-67579

comment from a Qt dev...

Hi, sadly there isn't an official way to configure cursor size on Wayland (yet). Most toolkits, including Qt, use the de-facto environment variable XCURSOR_SIZE. Could you please check what it's set to on your system, and upload the output of a Qt application when run with WAYLAND_DEBUG=1?

There is a proposal on the wayland-devel mailing list to add a protocol for configuring cursor themes (and size) called xcursor-configuration. There's a WIP patch for Qt here: https://codereview.qt-project.org/#/c/247935/ Note that we can't merge it until the protocol has been merged into the wayland-protocols repository, and kwin would also need to add support for it.
Comment 24 Simone 2019-07-13 09:33:07 UTC
Created attachment 121490 [details]
WAYLAND_DEBUG=1 konsole &>konsole.log
Comment 25 Simone 2019-07-13 09:33:57 UTC
I can confirm the same issue on plasma-workspace-5.15.5-1.fc30

The workaround is to set a fixed cursor size in KDE system settings (24px in my case). If I leave it as default 'dependent on resolution' the cursor is really huge.

I don't have XCURSOR_SIZE set in my env.

If I run the app with XCURSOR_SIZE=24 it works as expected.

The cursor is displayed at correct size on window decorations and GTK/Xwayland apps.

Debug info in konsole.log attachment
Comment 26 Nate Graham 2019-10-27 17:16:12 UTC

*** This bug has been marked as a duplicate of bug 407749 ***
Comment 27 Nate Graham 2019-11-14 21:21:04 UTC
*** Bug 389178 has been marked as a duplicate of this bug. ***
Comment 28 Eugene 2020-01-15 15:26:43 UTC
Is there any updates? Hello! Still NOT fixed in:

Plasma KDE 5.17.5
Frameworks KDE: 5.66.0
Qt: 5.12.4
Comment 29 Patrick Silva 2020-02-15 13:59:18 UTC
*** Bug 417690 has been marked as a duplicate of this bug. ***
Comment 30 MichaƂ Dybczak 2020-02-15 18:10:13 UTC
I can confirm that this bug is still present in Plasma 5.18.0.
Comment 31 Nate Graham 2020-02-25 19:30:15 UTC
*** Bug 412004 has been marked as a duplicate of this bug. ***
Comment 32 Benjamin Port 2020-04-17 12:46:27 UTC
Git commit a68554d39c5c64cc1572cfd486064d06e6fc850a by Benjamin Port.
Committed on 17/04/2020 at 12:45.
Pushed by bport into branch 'master'.

[Cursors] Remove Resolution Dependant option

Summary:
This option don't work as expected for years on X, and current wayland protocol don't allow to have a proper size for all application (each framework came with this own solution for this option, that mean we will not have same cursor size on different application)

We set default size as 24
Related: bug 413783

Reviewers: #plasma, meven, davidedmundson, ngraham

Reviewed By: ngraham

Subscribers: ngraham, plasma-devel, kde-doc-english

Tags: #plasma, #documentation

Maniphest Tasks: T12040

Differential Revision: https://phabricator.kde.org/D28652

M  +1    -1    doc/kcontrol/cursortheme/index.docbook
M  +1    -0    kcms/cursortheme/CMakeLists.txt
M  +1    -1    kcms/cursortheme/cursorthemesettings.kcfg
A  +10   -0    kcms/cursortheme/delete_cursor_old_default_size.pl
A  +8    -0    kcms/cursortheme/delete_cursor_old_default_size.upd
M  +1    -8    kcms/cursortheme/kcmcursortheme.cpp
M  +1    -1    kcms/krdb/krdb.cpp
M  +1    -1    kcms/lookandfeel/kcm.cpp
M  +4    -14   kcms/mouse/backends/x11/x11_backend.cpp

https://commits.kde.org/plasma-desktop/a68554d39c5c64cc1572cfd486064d06e6fc850a