pop-os / pop

A project for managing all Pop!_OS sources
https://system76.com/pop
2.44k stars 87 forks source link

Trackpad scrolling lag #2683

Open dannykopping opened 1 year ago

dannykopping commented 1 year ago

Distribution (run cat /etc/os-release):

$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME): N/A

Issue/Bug Description: When the trackpad has been idle for a few seconds, initiating a scroll lags by a few hundred milliseconds - which is quite jarring.

Steps to reproduce (if you know): Use trackpad Wait 10s Attempt to scroll

Expected behavior: Trackpad scrolls smoothly regardless of when it is used.

Other Notes: This is on a brand new Oryx Pro 9 with stock everything.

leviport commented 1 year ago

Interesting, I'll have to look into this on my oryp9. I hadn't noticed anything of the sort, but I usually use an external mouse.

Could you share which graphics mode the machine is in, and whether this lag only happens when the machine is on battery? Also, are any external display plugged in when it happens?

dannykopping commented 1 year ago

The laptop was plugged in, and running in hybrid graphics mode. No external display was connected.

I've switched to NVIDIA graphics now and the problem is no longer present, but this is a problem for me because the battery life is awful on NVIDIA graphics.

leviport commented 1 year ago

Hmm, I'm still having trouble replicating the lag. Does this only happen while you're using the keyboard? I wonder if it's not being induced by Gnome's palm rejection settings. It might be worth disabling that setting to see if it helps (although disabling it might be annoying for other reasons). The easiest way to turn it off is from gnome-tweaks, in Keyboard & Mouse > Touchpad > Disable While Typing.

Oh I thought of another question, since it might be relevant: is your oryp9 a 15" or a 17" model? Mine is a 15", but the 17" has a different touchpad. If you have a 17", I'll go test on that one for a while instead.

dannykopping commented 1 year ago

Thanks @leviport, if I get time today I will try boot back into Hybrid mode and try that.

Does this only happen while you're using the keyboard?

No, in the example above I didn't perform an I/O for 10s, and then tried to scroll.

I'm on the 15".

dannykopping commented 1 year ago

Another datapoint @leviport: I'm experiencing this same lag when viewing a PDF document (not a large one) in Chrome, using NVIDIA graphics.

leviport commented 1 year ago

Maybe it would be a good idea to rule out the OS at this point. Could you try a Pop live disk (or the recovery partition), and maybe even a live disk for another distribution?

I've been using my oryp9 touchpad all week and I still have yet to notice this behavior. Scrolling is instantaneous, no matter the graphics mode I'm in or how long I let it sit before touching it. The only thing that makes it seem slow is when the application I'm scrolling in is loading content, but that sounds unrelated to me. I'll keep trying though.

jamesvrt commented 1 year ago

oryp10 here and I experienced the same thing, no matter the application (tested on Firefox, Spotify, VSCode, Nautilus). Currently running on NVIDIA Graphics.

I solved my problem by switching to integrated graphics, restart, switch to NVIDIA, restart.

Similar findings on this (7 mo old) Reddit post.

jamesvrt commented 1 year ago

Update: after a few hours on NVIDIA mode the same issue came back. Switching to hybrid mode seems to have solved the problem. I'll report back if it doesn't stick this time.

Update 2: Nope, it's back. I suspect in my instance it's relating to the NVIDIA drivers as I don't seem to get the problem on Integrated graphics.

mhagar commented 1 year ago

Just wanted to say that I had this issue too. I'm on a lenovo thinkpad x260, so just integrated graphics.

For the search engines: Switching the refresh rate to 40Hz instead of 60Hz seems to have solved it.

Edit: Nevermind. It did not solve it, I think I was imagining things. This actually solved it: uninstalling libinput touchpad driver and installing synaptics instead. This is technically downgrading but on my machine it seems synaptics works better.

In terminal:

# Check what the touchpad is called
xinput --list

# This lists the touchpad's info
# On my machine it's literally called synaptics touchpad!
# Will show libinput driver
xinput --list-props "SynPS/2 Synaptics TouchPad"

# Install synaptics
sudo apt install xserver-xorg-input-synaptics
sudo apt install xserver-xorg-input-evdev

# Uninstall libinput
sudo apt remove xserver-xorg-input-libinput

# After restarting, this should show synaptics drivers now
xinput --list-props "SynPS/2 Synaptics TouchPad"
jamesvrt commented 10 months ago

Glad you fixed your issue. It didn't work for me, unfortunately. Also, others should note that GNOME doesn't support Synaptics, so while the drivers will work, you won't be able to modify settings using the OS UI.

jamesvrt commented 10 months ago

A workaround for this issue on my Oryx Pro 10 is switching from Xorg (Pop_OS default windowing system) to Wayland. You can follow these steps to do that.