After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771056 - login-screen leaves a leftover cursor after login in multi-monitor setup
login-screen leaves a leftover cursor after login in multi-monitor setup
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
mutter-maint
: 778185 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-09-08 12:58 UTC by Kamil Páral
Modified: 2017-02-07 04:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
MetaCursorRendererNative: Always force set hw cursor the first time (1.39 KB, patch)
2017-01-11 01:37 UTC, Jonas Ådahl
none Details | Review
MetaCursorRendererNative: Always force set hw cursor the first time (4.40 KB, patch)
2017-02-06 10:47 UTC, Jonas Ådahl
committed Details | Review

Description Kamil Páral 2016-09-08 12:58:29 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*+
Comment 1 Jonas Hahnfeld 2016-11-01 18:46:49 UTC
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.
Comment 2 Alexandre Franke 2016-11-24 21:25:47 UTC
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.
Comment 3 Alexandre Franke 2016-11-25 08:51:40 UTC
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.
Comment 4 Kamil Páral 2016-11-25 09:07:20 UTC
(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).
Comment 5 Alexandre Franke 2016-12-03 10:41:24 UTC
(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.
Comment 6 Anthony Foiani 2017-01-10 07:19:45 UTC
"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)
Comment 7 Jonas Ådahl 2017-01-11 01:37:31 UTC
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.
Comment 8 Anthony Foiani 2017-01-11 05:19:26 UTC
Confirming that building mutter 3.22.2-3 + patch in comment #7 resolved my issue (described in comment #6).

Thanks, Jonas!
Comment 9 Rui Matos 2017-01-11 14:18:46 UTC
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.
Comment 10 Rui Matos 2017-02-05 19:45:19 UTC
*** Bug 778185 has been marked as a duplicate of this bug. ***
Comment 11 Jonas Ådahl 2017-02-06 10:47:26 UTC
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.
Comment 12 Rui Matos 2017-02-06 12:56:23 UTC
Review of attachment 345024 [details] [review]:

lgtm, also for the stable branch
Comment 13 Jonas Ådahl 2017-02-07 03:11:18 UTC
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
Comment 14 Anthony Foiani 2017-02-07 04:14:34 UTC
W00t, thank you very much, all!