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 763159 - Mouse cursor disappears when moved on top of Shell UI
Mouse cursor disappears when moved on top of Shell UI
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.18.x
Other Linux
: Normal major
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 746594 763532 763632 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-03-06 02:16 UTC by Buck Shockley
Modified: 2017-09-24 14:39 UTC
See Also:
GNOME target: 3.20
GNOME version: 3.17/3.18


Attachments
monitors.xml file (1016 bytes, text/xml)
2016-03-06 21:47 UTC, Buck Shockley
  Details
wayland-pointer: Drop a phony signal disconnect (1.46 KB, patch)
2016-03-07 19:16 UTC, Rui Matos
committed Details | Review
Revert "cursor-renderer: do not update cursor if it is out of monitor" (2.20 KB, patch)
2016-03-07 19:16 UTC, Rui Matos
committed Details | Review
Handle meta_screen_get_monitor_for_point() returning NULL (1.90 KB, patch)
2016-03-07 19:23 UTC, Rui Matos
committed Details | Review
[gnome-3-18] wayland-pointer: Drop a phony signal disconnect (1.26 KB, patch)
2016-03-09 12:14 UTC, Debarshi Ray
none Details | Review

Description Buck Shockley 2016-03-06 02:16:27 UTC
In Gnome Shell 3.18.4, the mouse cursor will disappear if moved over any part of the shell, including the top panel, Favorites bar, or any part of the overlay.

Version: gnome-shell 3.18.4-1
Distro: Arch Linux
Comment 1 Rui Matos 2016-03-06 16:17:34 UTC
Can you provide steps to reproduce this? Did it start happening after a recent update?
Comment 2 Buck Shockley 2016-03-06 16:26:53 UTC
(In reply to Rui Matos from comment #1)
> Can you provide steps to reproduce this? Did it start happening after a
> recent update?

This started happening after updating to gnome-shell 3.18.4. To reproduce it, all I have to do is just move my mouse out of a window to the top panel or Favorites Bar, or lock the screen with GDM. The cursor will only appear if it's in a window or on the desktop.

Also, if it's somehow related, Nvidia driver version is 361.28-2.
Comment 3 Rui Matos 2016-03-06 16:46:43 UTC
(In reply to Ed Shockley from comment #2)
> This started happening after updating to gnome-shell 3.18.4. To reproduce

From which version? Was mutter updated too and which versions? Can you install the previous versions of just these packages and re-verify?
Comment 4 Buck Shockley 2016-03-06 16:58:53 UTC
(In reply to Rui Matos from comment #3)
> (In reply to Ed Shockley from comment #2)
> > This started happening after updating to gnome-shell 3.18.4. To reproduce
> 
> From which version? Was mutter updated too and which versions? Can you
> install the previous versions of just these packages and re-verify?

Gnome-shell and gnome-shell-extensions were updated from 3.18.3 to 3.18.4. Mutter was also updated to 3.18.3 from 3.18.2.

I downgraded the three packages then restarted gnome-shell and the issue did not occur. I then upgraded them again and the bug occurred again.
Comment 5 Rui Matos 2016-03-06 17:44:00 UTC
(In reply to Ed Shockley from comment #4)
> Gnome-shell and gnome-shell-extensions were updated from 3.18.3 to 3.18.4.
> Mutter was also updated to 3.18.3 from 3.18.2.

Do you use extensions? Which ones? Can you try without extensions?

> I downgraded the three packages then restarted gnome-shell and the issue did
> not occur. I then upgraded them again and the bug occurred again.

That's odd as I don't see anything that could have caused this going in between those versions. And indeed I can't reproduce the issue locally.
Comment 6 Buck Shockley 2016-03-06 17:53:16 UTC
(In reply to Rui Matos from comment #5)
> (In reply to Ed Shockley from comment #4)
> 
> Do you use extensions? Which ones? Can you try without extensions?


I just disabled all of my extensions and restarted gnome-shell. Did not resolve the issue. Are there any more system specs that could help? Do you want an output from neofetch?
Comment 7 kerryliu123 2016-03-06 21:17:17 UTC
I also have this issue, and after some trouble shooting, I have pinpointed the issue to having multiple monitors.  Deleting monitor.xml & monitor.xml~ from the .config in the home directory will reset the current monitor configuration, but after rebooting, the cursor will reappear.  Rearranging my monitors in settings will cause the cursor to disappear again on the next reboot.
Comment 8 Buck Shockley 2016-03-06 21:46:58 UTC
(In reply to kerryliu123 from comment #7)
> I also have this issue, and after some trouble shooting, I have pinpointed
> the issue to having multiple monitors.  Deleting monitor.xml & monitor.xml~
> from the .config in the home directory will reset the current monitor
> configuration, but after rebooting, the cursor will reappear.  Rearranging
> my monitors in settings will cause the cursor to disappear again on the next
> reboot.

This seems to be the problem. Deleting monitor.xml and restarting gnome-shell will fix the issue, but after restoring it and restarting again, the problem persists.

Does this help, Rui? I've added my current monitor.xml for reference.
Comment 9 Buck Shockley 2016-03-06 21:47:33 UTC
Created attachment 323214 [details]
monitors.xml file
Comment 10 Buck Shockley 2016-03-07 02:01:21 UTC
I talked to /u/SomeGenericUsername on reddit, he thinks it has something to do with this commit:

https://git.gnome.org/browse/mutter/commit/?h=gnome-3-18&id=58d2bd05815a8917460ec7231a1e50ed8cedf19f
Comment 11 Denys Vitali 2016-03-07 13:23:31 UTC
Downgraded mutter to 3.18.2-1 from 3.18.3-1 and solved the problem:
```
dvitali ~/Downloads sudo pacman -U mutter-3.18.2-1-x86_64.pkg.tar.xz 
loading packages...
warning: downgrading package mutter (3.18.3-1 => 3.18.2-1)
resolving dependencies...
looking for conflicting packages...

Packages (1) mutter-3.18.2-1

Total Installed Size:  5,09 MiB
Net Upgrade Size:      0,00 MiB

:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) downgrading mutter                           [######################] 100%
```
Comment 12 Rui Matos 2016-03-07 19:16:17 UTC
Created attachment 323316 [details] [review]
wayland-pointer: Drop a phony signal disconnect

cursor_sprite_prepare_at() is never connected to a MetaCursorTracker
signal.

--
This is just a drive-by cleanup
Comment 13 Rui Matos 2016-03-07 19:16:26 UTC
Created attachment 323317 [details] [review]
Revert "cursor-renderer: do not update cursor if it is out of monitor"

On the X11 backend we don't track the pointer position in
priv->current_x/y which remain set to zero. That means we never set
the clutter stage cursor if point 0,0 isn't covered by any monitor
since we return early.

Commit 4bebc5e5fa8aade8a96c769bf2365abe0948f6ce introduced this to
avoid crashing on the prepare-at handlers when the cursor position
doesn't fall inside any monitor area but we can handle that higher up
in the stack.
Comment 14 Rui Matos 2016-03-07 19:23:56 UTC
Created attachment 323318 [details] [review]
Handle meta_screen_get_monitor_for_point() returning NULL

MetaCursorSprite's prepare-at signal can legitimately hand us
coordinates that fall outside of any monitor. In that case, the
sprite's scale doesn't matter since the cursor won't be shown anyway
so we can skip setting it.

--
This is the simplest fix for the original crash in bug 756698.

We could perhaps re-work it so that we don't need the prepare-at
signal in the first place but I couldn't come up with anything that
I'd be happy with. The main issue is that only the higher layers know
how to set a sprite's scale and OTOH, only the cursor renderer knows
when a new scale might be required. Jonas?
Comment 15 Debarshi Ray 2016-03-09 12:14:07 UTC
Created attachment 323503 [details] [review]
[gnome-3-18] wayland-pointer: Drop a phony signal disconnect

It needed some manual adjustment to apply against gnome-3-18.
Comment 16 Debarshi Ray 2016-03-09 12:14:41 UTC
I can confirm that it fixes the bug for me on GNOME 3.18.x / Fedora 23.
Comment 17 Jonas Ådahl 2016-03-10 00:54:23 UTC
Review of attachment 323316 [details] [review]:

Right, we we connect the object so it should clean up by itself.
Comment 18 Jonas Ådahl 2016-03-10 01:02:14 UTC
Review of attachment 323317 [details] [review]:

Originally I didn't want to do it this way, since we'd be knowingly prepare a cursor with a state that could not be prepared. But since we don't know this state then running as a X11 CM I guess we need let the callees handle it.

I also think you should squash this and the next patch into one, so that if anyone who end up bisecting pass this fix will not accidentally hit the crash this patch re-introduces.
Comment 19 Jonas Ådahl 2016-03-10 01:04:30 UTC
Review of attachment 323317 [details] [review]:

Originally I didn't want to do it this way, since we'd be knowingly prepare a cursor with a state that could not be prepared. But since we don't know this state then running as a X11 CM I guess we need let the callees handle it.

I also think you should squash this and the next patch into one, so that if anyone who end up bisecting pass this fix will not accidentally hit the crash this patch re-introduces.
Comment 20 Jonas Ådahl 2016-03-10 01:04:39 UTC
Review of attachment 323317 [details] [review]:

Originally I didn't want to do it this way, since we'd be knowingly prepare a cursor with a state that could not be prepared. But since we don't know this state then running as a X11 CM I guess we need let the callees handle it.

I also think you should squash this and the next patch into one, so that if anyone who end up bisecting pass this fix will not accidentally hit the crash this patch re-introduces.
Comment 21 Jonas Ådahl 2016-03-10 01:07:21 UTC
Sorry for the multiple comments, the BZ review system was playing tricks on me.
Comment 22 Rui Matos 2016-03-10 15:16:00 UTC
Attachment 323316 [details] pushed as c380f2e - wayland-pointer: Drop a phony signal disconnect
Attachment 323318 [details] pushed as 8b801aa - Handle meta_screen_get_monitor_for_point() returning NULL

Squashed the patches
Comment 23 Rui Matos 2016-03-12 14:24:16 UTC
*** Bug 763532 has been marked as a duplicate of this bug. ***
Comment 24 Rui Matos 2016-03-14 17:57:22 UTC
*** Bug 763632 has been marked as a duplicate of this bug. ***
Comment 25 André Klapper 2017-09-24 14:39:56 UTC
*** Bug 746594 has been marked as a duplicate of this bug. ***