GNOME Bugzilla – Bug 771056
login-screen leaves a leftover cursor after login in multi-monitor setup
Last modified: 2017-02-07 04:14:34 UTC
I have two screens, the right one is primary. When I log it to the wayland session, both screen display a mouse cursor in the center. Only the cursor on the right screen moves. When I move the cursor to the left screen, the cursor on the left screen disappears. This is just a cosmetic issue, I haven't seen any negative consequences. Quite interestingly, I can't make a screenshot with both cursors. If I create a screenshot, only the right one (the real one) is present in the picture (but I still see both on my screens). gnome-session-wayland-session-3.21.90-1.fc25.x86_64 gnome-shell-3.21.90.1-1.fc25.x86_64 libwayland-client-1.11.92-1.fc25.x86_64 libwayland-cursor-1.11.92-1.fc25.x86_64 libwayland-server-1.11.92-1.fc25.x86_64 mesa-libwayland-egl-12.0.2-1.fc25.x86_64 mutter-3.21.90-3.fc25.x86_64 xorg-x11-server-Xwayland-1.18.4-5.fc25.x86_64 $ xrandr Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192 XWAYLAND0 connected 1920x1080+1920+0 510mm x 290mm 1920x1080 59.96*+ XWAYLAND1 connected 1920x1080+0+0 310mm x 170mm 1920x1080 59.96*+
I can confirm this on ArchLinux with GNOME 3.22.1. In my scenario, GDM shows the login on my laptop's screen. After login, my external monitor will become the primary screen and the cursor jumps there. The cursor on the secondary screen will go away as described above.
Happens here two. Primary screen is rotated 90° (portrait) and has a cursor in the middle of it, but without the rotation. gdm wasn't rotated.
As a workaround, you can toggle rotation twice to make it "refresh" the display and the cursor is gone. It looks like the extra cursor is a leftover from the greeter.
(In reply to Alexandre Franke from comment #3) > It looks like the extra cursor is a leftover from the greeter. That matches my experience. Even with 3 screens, I see the extra cursor just on one of them - the very screen that was showing the greeeter (login screen).
(In reply to Alexandre Franke from comment #3) > It looks like the extra cursor is a leftover from the greeter. Confirmed as moving the cursor on the greeter somewhere else before login in leaves it at that new place. I use that as a workaround now, moving the cursor in the bottom right corner of my rightmost screen to minimize the impact.
"Me too!" I just upgraded from Fedora 24 to Fedora 25, and am using Wayland for the first time. When I start a session with my monitor already rotated (using Settings -> Displays), there is an "unrotated" mouse pointer left on my screen, which no longer moves; a new "rotated" mouse pointer moves instead. http://scrye.com/~tkil/fedora/two-mouse-cursors.jpg I can use the workaround in comment #3, although it's worth pointing out that you don't even have to accept the new rotation -- just rotate back to regular landscape, then "revert settings" to recover portrait mode -- extra cursor goes away. $ sudo dnf list clutter mutter clutter.x86_64 1.26.0-1.fc25 mutter.x86_64 3.22.2-3.fc25 Any other packages that I should query for versions? $ uname -a Linux hum 4.8.15-300.fc25.x86_64 #1 SMP Thu Dec 15 23:10:23 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux $ lspci | grep -i vga 01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)
Created attachment 343273 [details] [review] MetaCursorRendererNative: Always force set hw cursor the first time The initial state of the hardware cursor is not known, so always force update it the first time we update the cursor.
Confirming that building mutter 3.22.2-3 + patch in comment #7 resolved my issue (described in comment #6). Thanks, Jonas!
Review of attachment 343273 [details] [review]: I like having a variable like this but now I think we should remove meta_cursor_renderer_native_force_update() and instead have a meta_cursor_renderer_native_invalidate() to re-use it instead of having the same functionality done in two different ways. Basically we need to force set the hw cursor on initialization, on monitor changes and vt switches. And I wonder if we should do it around suspend too just to be safe.
*** Bug 778185 has been marked as a duplicate of this bug. ***
Created attachment 345024 [details] [review] MetaCursorRendererNative: Always force set hw cursor the first time The initial state of the hardware cursor is not known, so always force update it the first time we update the cursor. Do this by changing the 'force' flag of update_hw_cursor() to an 'invalidated' hw cursor state.
Review of attachment 345024 [details] [review]: lgtm, also for the stable branch
Comment on attachment 345024 [details] [review] MetaCursorRendererNative: Always force set hw cursor the first time Attachment 345024 [details] pushed as 8ccbd36 - MetaCursorRendererNative: Always force set hw cursor the first time
W00t, thank you very much, all!