Extra frozen / stuck mouse cursor after auto screen lock / sleep

Bug #1875528 reported by Joel Lisenby
48
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Mutter
Unknown
Unknown
mutter (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Expected:

After my computer had gone to sleep and I log in I should see only a single active mouse cursor.

What happened instead:

After my computer had gone to sleep and I logged in I noticed a second frozen/stuck mouse cursor was on screen and was rendered in one place over any active application windows.

====

I recently upgraded to 20.04 from 19.10 but the same issue was occurring in 19.10 as well.

Logging out completely then logging back in again removed the extra frozen cursor.

====

lsb_release -rd
Description: Ubuntu 20.04 LTS
Release: 20.04

apt-cache policy mutter
mutter:
  Installed: 3.36.1-3ubuntu3
  Candidate: 3.36.1-3ubuntu3
  Version table:
 *** 3.36.1-3ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: mutter 3.36.1-3ubuntu3
ProcVersionSignature: Ubuntu 5.4.0-26.30-generic 5.4.30
Uname: Linux 5.4.0-26-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Mon Apr 27 19:53:03 2020
InstallationDate: Installed on 2019-03-09 (415 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: mutter
UpgradeStatus: Upgraded to focal on 2020-04-28 (0 days ago)

Revision history for this message
Joel Lisenby (sven-svenagen) wrote :
affects: ubuntu → mutter (Ubuntu)
tags: added: cursor
Changed in mutter (Ubuntu):
status: New → Confirmed
Revision history for this message
Piotr Gajdowski (p-a-gajdowski) wrote :

Experiencing same problem, in most cases displays that go into sleep modus (or you turn them off and on again) don't remove themselves from the display driver.
But some displays gets removed form the gpu(or xorg, i don't know) display driver and the re-added.
So basically this happens when you displays are re-arranging cause you added or removed a display (either manually or automatically by the display itself).

This problem is viewable in multi-monitor setup, where 1 monitor is programmed to detach himself from the gpu when going to sleep or off, and the other(s) are just turning the screen black, but stay connected to the gpu.

When you turn off you (problem) display, you actually see linux re-arranging windows/applications on the screen(s) that don't detach themselves from the gpu.
Seeing this happen, I came to this conclusion, that some display detach themselves from the gpu when going to sleep, and therefore linux thinks a display is being removed and re-arranges everything.

During this re-arrangement process a duplicate cursor is created and becomes frozen, a new cursor is created and becomes your primary cursor that behaves normally.

possible fix for this is linux resetting all cursors in xorg/gpu driver when completing such re-arrangement process.

I have zero understanding of xorg or gpu driver programming, but i do know that xorg is programmed to be able to have multiple cursors.
So my suspicion is with xorg programming.

I hope this gets fixed, It's really annoying, when you are working and have tons of apps open, you are required to log out and restart your workspace, which can be a hasle and time consuming.

Revision history for this message
Joel Lisenby (sven-svenagen) wrote :

With the latest updates installed for Ubuntu 20.04 I am no longer seeing this double mouse cursor issue after two sleeps in a row. Will report back if the issue returns.

Revision history for this message
samuelbailey (samuelbailey) wrote :

I'm having the same issue - dead cursor appears after machine has gone to sleep when I have multiple monitors connected. I'm on Ubuntu 20.04 and use Wayland, on an AMD GPU. I have updated everything with apt to the most recent version and the issue is still occurring for me.

Revision history for this message
Syver Stensholt (7rst1) wrote :

I'm also having this issue, even with the latest Ubuntu 20.04. I tried taking a screenshot of it with Spectacle, but when it asked me to draw rectangular region both my screens blacked out and came back every second. This removed the extra cursor too, which is weird and might suggest the two issues being related. I've also had problems with fullscreening both YouTube and Netflix. Could it all be related to fractional scaling? (I'm a noob, pure speculation)

Revision history for this message
Greg Williams (greg2lapa) wrote :

@Syver Stensholt,

I don't think it's possible to screenshot it. The screenshot does not capture the cursor even though it's there when the screenshot is taken.

When I notice the 2nd fixed mouse cursor icon, if I reboot the machine, it goes away. But then at some point the 2nd fixed mouse cursor will appear again.

Revision history for this message
Joel Lisenby (sven-svenagen) wrote :

Issue did return for me. You can always take a picture of the screen with your phone if screenshot does not capture the cursor. I did take a picture of it happening in 19.10 as well (attached)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. Though just a reminder: 19.10 has now passed end-of-life.

https://wiki.ubuntu.com/Releases

Revision history for this message
Joel Lisenby (sven-svenagen) wrote :

Yes I'm on 20.04 now and the issue produces the exact same result seen in the photograph when it goes to sleep. This bug is the only reason I can't use ubuntu daily currently.

Revision history for this message
area256 (andre-area256) wrote :

I'm also seeing this problem with 20.04.1 with all the latest patches. I have an AMD GPU (Vega 64), and dual monitors (5k2k and 4k, with display scaling 125%). Interestingly the extra cursor shows up larger than my normal cursor, and doesn't show up in screen shots like the normal cursor.

Revision history for this message
Bob Bobbart (bobbobbart) wrote :

I am also having this issue on a brand new laptop (Ryzen 5 4500), however the dead mouse pointer is there from a fresh reboot. It is left over from the login screen and remains there once the system has logged in. If I logout, the 'dead' mouse becomes the only one on the login screen, yet loging back in causes it to freeze while a second pointer becomes active.

Very strange behaviour!

Revision history for this message
Sean Sweeney (ssween828) wrote :

To address the two other commenters who mentioned fractional scaling - that's definitely the cause of the extra mouse cursor in my case. If I set the display scaling back to 100%, the extra cursor goes away and stays away between reboots and logout/login cycles. Upon setting it back to 125%, the second cursor initially remains gone, but returns when I reboot the machine or log out and then back in.

I'm also on 20.04, on a Thinkpad A485, Ryzen 7 Pro 2700U w/ Radeon Vega gfx.

Revision history for this message
Joel Lisenby (sven-svenagen) wrote :

Just to confirm my monitor is set to 100% scaling and I still get the duplicate cursor after wake from sleep. 20.04.1 here with latest updates still has the issue.

Revision history for this message
Syver Stensholt (7rst1) wrote :

Seems like everyone having a AMD GPU is the common denominator.

Revision history for this message
Yannick (moravit) wrote :

I have the same problem. Using Wayland with an AMD R580, dual monitor and fractional scaling set to 200%.

Revision history for this message
John in SF (jsoulsby) wrote :

This extra cursor frozen on screen issue exists in 20.10 Groovy Gorilla. (Just installed 20.10 on Lenovo T14 AMD and have a few issues to research.)

Actual behavior:
- Fractional scaling is on (actually needed to make laptop screen readable).
- Extra cursor frozen on screen.

Expected:
- Fractional scaling on should not cause an extra dead cursor on screen.

Remedy:
- Turning off fractional scaling makes the dead cursor go away.

If this should be reported elsewhere, let me know.

Revision history for this message
Afro (amilan-inlogic) wrote :

John in SF, I can confirm behavior. When I enable fractional scaling i have extra frozen pointer on desktop. When I disable it, extra pointer is gone.

tags: added: groovy
Revision history for this message
arvind das (dass-arvind) wrote :

The guy here has posted a solution which worked for me.
https://dev.to/akarsh77/does-your-laptop-touch-pad-becomes-unresponsive-or-gets-stuck-in-ubuntu-or-ubuntu-based-systems-1npm

Open the terminal and type these commands
sudo modprobe -r psmouse
sudo modprobe psmouse

this will free the mouse from frozen state. :)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes that's a common workaround with touchpads. Although as I understand it, this bug is about there being too many cursors. The fact that one of them is frozen is not a problem in itself.

If you have an actual problem with a frozen cursor making the system unusable then please open a new bug.

Revision history for this message
Syver Stensholt (7rst1) wrote :

I'm not having this issue anymore, and I didn't really pay attention to the issue in the meanwhile, but I think it disappeared when I switched from Ubuntu 20.10 to Pop OS 20.10.I don't know if that's useful at all, but looks like the issue is vanilla Ubuntu only.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oh, for some reason I thought this was bug 1873052. It should probably be marked as a duplicate of that one. That one indeed won't occur in PopOS because it's related to X11 fractional scaling, which is an Ubuntu-only feature.

tags: added: xrandr-scaling
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.