Bug 448537 - Mouse pointer disappears on desktop Zoom in the X11 session
Summary: Mouse pointer disappears on desktop Zoom in the X11 session
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 5.24.0
Platform: Archlinux Linux
: HI normal (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 448036 449837 449880 450438 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-15 17:13 UTC by Omar Helali
Modified: 2022-10-13 13:35 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26
vlad.zahorodnii: Wayland-
vlad.zahorodnii: X11+


Attachments
attachment-3153-0.html (1.57 KB, text/html)
2022-01-20 21:45 UTC, Omar Helali
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Omar Helali 2022-01-15 17:13:44 UTC
Just installed Plasma 5.23.90 to try it but since the first run, the mouse pointer disappears once you Zoom in then Out, and you just need (if lucky) track the hover effects on buttons or links to locate or right click it untill you logout et login again. The clicks and behaviour works as expected even if the cursor is invisible. Alse tried to change cursor theme and provoked Desktop Effects reset, but nothing brings my pointer back except logout. My setup is running X11 on Nvidia. Everything is latest to testing versions and unstable kde repo.
This is the first bug I try to report so please, if something is missing, don't be rude :)

STEPS TO REPRODUCE
1. Activate Desktop Effects Zoom IN
2. Zoom Out
3. Mouse pointer disappears
4. Zoom In again and it will reappear
Comment 1 Sebastian Kuźlak 2022-01-18 15:01:28 UTC
confirm
Comment 2 Nate Graham 2022-01-20 21:43:17 UTC
Cannot confirm in the Wayland session; works for me.
Comment 3 Omar Helali 2022-01-20 21:45:56 UTC
Created attachment 145680 [details]
attachment-3153-0.html

Bug only on x11, works normal on Wayland

On Thu, 20 Jan 2022, 22:43 Nate Graham, <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=448537
>
> Nate Graham <nate@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |nate@kde.org
>           Component|general                     |effects-various
>             Summary|Mouse pointer disappears on |Mouse pointer disappears
> on
>                    |desktop Zoom                |desktop Zoom in the X11
>                    |                            |session
>
> --- Comment #2 from Nate Graham <nate@kde.org> ---
> Cannot confirm in the Wayland session; works for me.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 4 Omar Helali 2022-01-20 21:47:45 UTC
It bugs only on X11, works normally in Wayland
Comment 5 Sebastian Kuźlak 2022-01-20 21:53:11 UTC
Didn't test it on wayland since if i remember correctly 5.25 removed eglstreams so on my gtx660 i wont be able to run wayland. X11. I can reproduce it 95% of the time. Need to restart with kwin_x11 --replace to get rid of it.
Comment 6 Omar Helali 2022-01-20 21:57:52 UTC
I confirm that this bug does not exist on the Wayland session running on Arch / Nvidia (GF750Ti no egl) - Wayland running great by the way. Just switching to X11 makes the bug reappear
Comment 7 Sebastian Kuźlak 2022-01-20 22:34:48 UTC
Well, i tried now running wayland but kwin_wayland crashes.
Comment 8 Omar Helali 2022-01-20 22:46:35 UTC
(In reply to Sebastian Kuźlak from comment #7)
> Well, i tried now running wayland but kwin_wayland crashes.

just in case .. nvidia-drm ... modeset ... :)
Comment 9 Sebastian Kuźlak 2022-01-20 22:52:42 UTC
I set correctly way back.  Didn't change a thing since then. It used to work. Now it doesn't.

❯ sudo lsmod | grep nvidia
nvidia_uvm           2551808  0
nvidia_drm             73728  6
nvidia_modeset       1204224  12 nvidia_drm
nvidia              35401728  595 nvidia_uvm,nvidia_modeset
Comment 10 Iyán Méndez Veiga 2022-02-01 17:18:01 UTC
I can confirm and replicate this issue as well. Also, the "workaround", although the mouse only comes to me while I keep some level of zooming. I also notice one weird thing. If you are sharing your screen (tried with Zoom and Teams), the mouse can still be seen by people even though it disappears from the screen locally.

Operating System: Arch Linux
KDE Plasma Version: 5.23.90
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.4-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-4790K CPU @ 4.00GHz
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1070/PCIe/SSE2
Comment 11 Iyán Méndez Veiga 2022-02-01 17:19:18 UTC
Sorry, forgot to mention that I can confirm both with nvidia-470 and nvidia-495.
Comment 12 Omar Helali 2022-02-08 17:29:46 UTC
bug can still be reproduced in the new plasma 5.24 on X11, on Wayland works ok
Comment 13 Vlad Zahorodnii 2022-02-09 10:54:56 UTC
*** Bug 449837 has been marked as a duplicate of this bug. ***
Comment 14 Behzad A 2022-02-09 19:23:31 UTC
*** Bug 449880 has been marked as a duplicate of this bug. ***
Comment 15 Behzad A 2022-02-09 19:26:04 UTC
*** Bug 449880 has been marked as a duplicate of this bug. ***
Comment 16 Bug Janitor Service 2022-02-09 19:54:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1987
Comment 17 Vlad Zahorodnii 2022-02-10 07:21:56 UTC
Git commit 0ad239a92de6ae859e892db6debafac2e3daefb5 by Vlad Zahorodnii.
Committed on 10/02/2022 at 07:07.
Pushed by vladz into branch 'master'.

Fix mouse pointer disappearing after using zoom effect on X11

Currently, the Cursors::currentCursorChanged signal is wired to the
updateCursor() function which calls xcb_xfixes_hide_cursor() or
xcb_xfixes_show_cursor() depending if the cursor is hidden. However, the
currentCursorChanged signal can be emitted if the cursor changed, e.g. a
new pixmap attached, or its visibility status changes.

The zoom effect hides the pointer, but when user hovers ui elements, it
will most likely change and result in more than one xcb_xfixes_hide_cursor()
calls.

It appears like xcb_xfixes_hide_cursor() is implemented as a reference
counter, i.e. if xcb_xfixes_hide_cursor() is called two times, then you
must call xcb_xfixes_show_cursor() two times as well.

This change adds a dedicated signal to indicate whether the cursor is
hidden to avoid calling xcb_xfixes_hide_cursor() multiple times while
the screen is scaled.

M  +1    -0    src/backends/drm/drm_output.cpp
M  +1    -2    src/backends/x11/standalone/x11_platform.cpp
M  +2    -2    src/cursor.cpp
M  +1    -0    src/cursor.h

https://invent.kde.org/plasma/kwin/commit/0ad239a92de6ae859e892db6debafac2e3daefb5
Comment 18 Vlad Zahorodnii 2022-02-10 07:22:59 UTC
Git commit 43caf2539357a1f9d5b2668a8eff151517377a7e by Vlad Zahorodnii.
Committed on 10/02/2022 at 07:22.
Pushed by vladz into branch 'Plasma/5.24'.

Fix mouse pointer disappearing after using zoom effect on X11

Currently, the Cursors::currentCursorChanged signal is wired to the
updateCursor() function which calls xcb_xfixes_hide_cursor() or
xcb_xfixes_show_cursor() depending if the cursor is hidden. However, the
currentCursorChanged signal can be emitted if the cursor changed, e.g. a
new pixmap attached, or its visibility status changes.

The zoom effect hides the pointer, but when user hovers ui elements, it
will most likely change and result in more than one xcb_xfixes_hide_cursor()
calls.

It appears like xcb_xfixes_hide_cursor() is implemented as a reference
counter, i.e. if xcb_xfixes_hide_cursor() is called two times, then you
must call xcb_xfixes_show_cursor() two times as well.

This change adds a dedicated signal to indicate whether the cursor is
hidden to avoid calling xcb_xfixes_hide_cursor() multiple times while
the screen is scaled.


(cherry picked from commit 0ad239a92de6ae859e892db6debafac2e3daefb5)

M  +1    -0    src/backends/drm/drm_output.cpp
M  +1    -2    src/backends/x11/standalone/x11_platform.cpp
M  +2    -2    src/cursor.cpp
M  +1    -0    src/cursor.h

https://invent.kde.org/plasma/kwin/commit/43caf2539357a1f9d5b2668a8eff151517377a7e
Comment 19 ratijas 2022-02-12 08:13:42 UTC
*** Bug 448036 has been marked as a duplicate of this bug. ***
Comment 20 Abdullah Alharbi 2022-02-13 20:41:27 UTC
Hello, guys i'm sorry but does this fix released or yet ?
Comment 21 Nate Graham 2022-02-18 19:21:02 UTC
*** Bug 450438 has been marked as a duplicate of this bug. ***
Comment 22 Nate Graham 2022-02-18 19:21:39 UTC
Got another report from a user with 5.24.1 (Bug 450438), so it seems like this may not be fully fixed yet. Re-opening.
Comment 23 Omar Helali 2022-10-13 08:29:35 UTC
This problem did has not occured a xhile ago, think it should be closed