200% scaling on wayland touchpad feels laggy on X1 Carbon 9th

Bug #2022369 reported by David Zollikofer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libinput
Fix Released
Unknown
Ubuntu
Fix Released
Undecided
Unassigned

Bug Description

I have an X1 carbon 9th gen with a 4k screen where I use 200% scaling. Unfortunately, the touchpad feels laggy and imprecise when trying to hit click targets.

Switching to X11 helps as well as the flat acceleration profile in gnome tweaks.
I feel like this is related to how gnome or libinput upscale mouse movement.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: gnome-shell 42.5-0ubuntu1
ProcVersionSignature: Ubuntu 5.19.0-42.43~22.04.1-generic 5.19.17
Uname: Linux 5.19.0-42-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Fri Jun 2 16:57:16 2023
DisplayManager: gdm3
InstallationDate: Installed on 2023-05-15 (18 days ago)
InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223)
RelatedPackageVersions: mutter-common 42.5-0ubuntu1
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

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

Thanks for the bug report. I would usually recommend trying MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 to fix this but your logs seem to suggest that mode is already active.

Please:

1. Try disabling these extensions in case they're having some effect:

   '<email address hidden>',
   '<email address hidden>',
   '<email address hidden>',
   '<email address hidden>'

2. Try a USB mouse and confirm there is no such lag.

3. Report your findings to libinput at: https://gitlab.freedesktop.org/libinput/libinput/-/issues

affects: gnome-shell (Ubuntu) → mutter (Ubuntu)
summary: - 200% scaling on wayland touchpad feels laggy
+ 200% scaling on wayland touchpad feels laggy on X1 Carbon 9th
Changed in libinput (Ubuntu):
status: New → Incomplete
Changed in mutter (Ubuntu):
status: New → Incomplete
Revision history for this message
David Zollikofer (davidrzs) wrote :

This is very subjective and I could be wrong. Upon disabling the extensions the lag was still present. With a USB mouse the lag is not present or at least not as noticable.

Interestingly if I switch to 1080p the issue dissapears.

I think that subjectively the default mouse acceleration for 4k with 200% scaling should behave the same as 1080p with 100% scaling which is not the case (though this might be debatable / there might be good reasons why this is not the case).

Will report this upstream.

no longer affects: mutter (Ubuntu)
Changed in libinput (Ubuntu):
status: Incomplete → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

I wonder if libinput is incorrectly scaling up the size of the hysteresis dead zone it uses to ignore finger/sensor jitter. It really should only be scaling up the movement velocity. The hysteresis size shouldn't be scaled because it is in touchpad sensor units, not pixels.

Revision history for this message
David Zollikofer (davidrzs) wrote :
Changed in libinput:
status: Unknown → New
Revision history for this message
David Zollikofer (davidrzs) wrote :

I can confirm that using Kubuntu with Wayland as well as X11 session the issue is not present. Hence, I believe this is a Gnome / Mutter issue.

Revision history for this message
David Zollikofer (davidrzs) wrote :

Trying to pinpoint where the problem can be I found that the problem is not present in fedora with the exact same set up. I think there is something in Mutter or Gnome that is different in Ubuntu that let's this bug appear.
Using Fedora fixes the issue for me but I thought I'd post it here for future reference.

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

What version of libinput/mutter is in the Fedora setup where the bug is not present? Did you check that Fedora is using Wayland too?

Changed in libinput:
status: New → Fix Released
Revision history for this message
David Zollikofer (davidrzs) wrote :

Yes runs on wayland.
Libinput 1.23.0
Mutter 44.2
It is hard to actually objectively judge this as stutter/lag is very subjective. Though Fedora feels a lot less fluid (i.e. the cursor doesn't seem to lag a few frames).

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

Ubuntu 23.04 is roughly equivalent to that Fedora release so please try 23.04:
https://ubuntu.com/download/desktop

Cursor stutter is a compositor bug we will fix in updates soon: bug 2023766

Fluidity of rendering other than the cursor should be better in Ubuntu because only Ubuntu uses triple buffering on the entire screen.

Revision history for this message
David Zollikofer (davidrzs) wrote (last edit ):

Tested the 23.04 Wayland session and can confirm that it is better! Feel free to close the bug as this will be fixed with updates / future releases. Thanks for the professional bug handling.

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

Fix Released in unknown package :)

no longer affects: mutter (Ubuntu)
affects: libinput (Ubuntu) → ubuntu
Changed in ubuntu:
status: New → Fix Released
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.