X11 fractional scaling causes two cursors after login (usually with amdgpu)

Bug #1873052 reported by Håvar on 2020-04-15
302
This bug affects 61 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned
Focal
Undecided
Unassigned
mutter (Ubuntu)
Medium
Marco Trevisan (Treviño)
Focal
Undecided
Marco Trevisan (Treviño)
xorg-server (Ubuntu)
Medium
Marco Trevisan (Treviño)
Focal
Undecided
Marco Trevisan (Treviño)

Bug Description

Showing two cursors after login to ubuntu-desktop.

One cursor moves and is scaled, and one is stationary mid screen and not scaled.

The moving cursor does not appear on screenshots, making it difficult to upload a screenshot.

Previously reported:
https://gitlab.gnome.org/GNOME/mutter/issues/904
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1827428

Package: mutter 3.36.1-3ubuntu1

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gnome-shell 3.36.1-4ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-21.25-generic 5.4.27
Uname: Linux 5.4.0-21-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.11-0ubuntu26
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Wed Apr 15 20:06:53 2020
DisplayManager: gdm3
RelatedPackageVersions: mutter-common 3.36.1-3ubuntu1
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to focal on 2020-03-31 (15 days ago)

Håvar (havar) wrote :
description: updated
Daniel van Vugt (vanvugt) wrote :

Does the problem still happen if you choose 'Ubuntu on Wayland' from the login screen? I am wondering if it is unique to the Xrandr scaling feature.

See also https://gitlab.gnome.org/GNOME/mutter/-/issues/1108

affects: gnome-shell (Ubuntu) → mutter (Ubuntu)
Changed in mutter (Ubuntu):
status: New → Incomplete
Håvar (havar) wrote :

@Daniel: The problem cursor did not appear when using 'Ubuntu on Wayland'.

Changed in mutter (Ubuntu):
status: Incomplete → New
tags: added: xrandr-scaling
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mutter (Ubuntu):
status: New → Confirmed
Changed in mutter:
status: Unknown → Fix Released
Håvar (havar) wrote :

Still does not seem fixed.
Instead of in the middle of the screen, there is another cursor in the down right corner at the moment. Seems like it has been initialized farther down to the right, but still visible on a 4k resolution.

mutter 3.36.1-3ubuntu3

The hotfix of changing to 100% scaling and not accepting the changes still works.

Changed in mutter (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)

This seems to happen when switching user passing from GDM or just doing Ctrl+alt+f1 -> Ctrl+alt+f2 (or yours).

Looks like gdm's mutter cursor stays.

Using gdm running in X11, workarounds the issue, so as workaround editing /etc/gdm3/custom.conf to uncomment `WaylandEnable=false` should fix this.

Changed in mutter (Ubuntu):
status: Confirmed → Triaged
affects: mutter → ubuntu
no longer affects: ubuntu
tags: added: cursor
Changed in mutter (Ubuntu):
importance: Undecided → Medium
Ryan Thompson (rct86) wrote :

For anyone else affected by this bug, I've written a script that toggles the scaling mode back and forth to fix the problem and then restore your desired scaling mode on each monitor.

https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1875404/+attachment/5361667/+files/xrandr-fix.sh

Just set that script to run at login (e.g. by adding it to Startup Applications). Your screen will flicker momentarily on login, since the script is changing resolutions, but then the extra mouse cursor will be gone automatically.

Changed in mutter (Ubuntu):
status: Triaged → In Progress
Changed in xorg-server (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in mutter (Ubuntu):
status: In Progress → Won't Fix
Daniel van Vugt (vanvugt) wrote :

Two more duplicates reported of this bug today. So if "Won't Fix" is the right answer then I think more of us need some time to understand why that is.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Changed in mutter (Ubuntu):
status: Won't Fix → Confirmed
Daniel (danlehmannmuc) wrote :

Confirming that WaylandEnable=false in /etc/gdm3/custom.conf fixes the issue (thanks Marco!)

krul (krul) wrote :

For me work around as described in comment #10 also prevent happening of this issue.

Daniel van Vugt (vanvugt) wrote :

Note there are two related upstream bugs:

https://gitlab.gnome.org/GNOME/mutter/-/issues/1108
https://gitlab.gnome.org/GNOME/mutter/-/issues/1165

But those are only on resume from suspend and not related to fractional scaling.

On a Dell Precision 7510 Laptop (nVidia Quadro M2000M) running Ubuntu 18.04 , Marco's workaround in #7, Ctrl+alt+f1 -> Ctrl+alt+f2, works for me. I think I'd prefer to wait for Wayland to be fixed rather than disable it in /etc/gdm3/custom.conf, though.

summary: - GNOME 3.36 Lands Scaled/Transformed Hardware Cursors Support and keeps
- another not scaled cursor mid screen
+ Showing two cursors after login when fractional scaling is enabled

Hey guys, for me when i disable wayland via /etc/gdm3/custom.conf i get a bug where some programs dont display their content, in my example chrome, shell also freezes. I have to enable wayland for everything to work properly. please see below video

https://youtu.be/3llDcLBWLmg

Daniel van Vugt (vanvugt) wrote :

Looks like we might have confused at least two different issues.

For systems using the 'amdgpu' kernel driver, supposedly a fix is coming in kernels 5.9.0, 5.8.13 & 5.4.69.

Changed in linux (Ubuntu):
status: New → Fix Committed
summary: - Showing two cursors after login when fractional scaling is enabled
+ Showing two cursors after login

Responding to comment #15:

The 5.8.13 upstream stable update was included in the ubuntu linux kernel version 5.8.0-21.22 in groovy. The 5.4 kernel update including 5.4.69 has not been released yet.

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released

Which is the tracking issue for the required focal (20.04) kernel update to fix this bug?

Daniel van Vugt (vanvugt) wrote :

Eduard,

For 'amdgpu' that's also this bug. I will add a tag to request a focal fix for that kernel issue. The fix should come from upstream kernel 5.4.69.

tags: added: rls-ff-incoming

For anyone who might be interested, since in my case this problem is caused by fractional scaling, in my Ubuntu 20.04 (and then also 20.10) installation I was able to "automatically fix" it every login by using this very small program I developed: https://github.com/mind-overflow/gnome-fs-duplicate-cursor-fix

Changed in gnome-shell (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in gnome-shell (Ubuntu Focal):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in mutter (Ubuntu Focal):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in xorg-server (Ubuntu Focal):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu Focal):
status: New → Confirmed
Changed in linux (Ubuntu Focal):
status: New → Confirmed
Changed in mutter (Ubuntu Focal):
status: New → Confirmed
Changed in xorg-server (Ubuntu Focal):
status: New → Confirmed
tags: added: groovy
Carlos Pita (carlosjosepita) wrote :

Happens to me in up to date GG using amdgpu for xorg session with fractional scaling. The mouse pointer in gdm gets stuck at the beginning of the session.

Carlos Pita (carlosjosepita) wrote :

Marco's workaround in #7 works for me.

The bug's still present, but the fix in #7 works for me too.

"as workaround editing /etc/gdm3/custom.conf to uncomment `WaylandEnable=false` should fix this"

tags: added: amdgpu
Iain Lane (laney) on 2021-02-16
tags: removed: rls-ff-incoming

Got the same with Radeon RX 580 Series on Ubuntu 20.04.2 LTS

Fix in #7 works for me.

summary: - Showing two cursors after login
+ Showing two cursors after login (usually with amdgpu)
summary: - Showing two cursors after login (usually with amdgpu)
+ X11 fractional scaling causes two cursors after login (usually with
+ amdgpu)
Citroella (citroella) on 2021-05-04
Changed in cinnamon-desktop (Ubuntu):
status: New → Confirmed
Changed in cinnamon-desktop (Ubuntu Focal):
status: New → Confirmed
no longer affects: cinnamon-desktop (Ubuntu)
no longer affects: cinnamon (Ubuntu)
Citroella (citroella) wrote :

Cinnamon desktop

no longer affects: cinnamon (Ubuntu Focal)
no longer affects: cinnamon-desktop (Ubuntu Focal)
Daniel van Vugt (vanvugt) wrote :

We don't need to list the desktop environments affected here because the issue is lower level than that...

no longer affects: gnome-shell (Ubuntu)
no longer affects: gnome-shell (Ubuntu Focal)
no longer affects: cinnamon (Ubuntu)
To post a comment you must log in.