You are not logged in.
Hey,
since about two months ago, the mouse and touchpad have been incredibly laggy on new kernel versions (both linux and linux-zen) on my ThinkPad T14s Gen 4 AMD. The LTS kernel works fine for the time being, but at this point I'm kind of afraid every time I update my system that it will break as well. At home, I use my ThinkPad with an eGPU (RX 6900XT), which doesn't have the same issue - mouse works perfectly fine even on new kernels, which leads me to believe that the issue is likely related to the integrated Radeon 780M GPU.
When I run OBS, it disables the hardware cursor, which improves things somewhat, but it is far worse than the LTS kernel, even if I compare it to the LTS kernel also running OBS.
What could be causing this? What can I do to get this resolved?
Thanks so much for your help.
Last edited by oschl (2025-01-17 11:11:48)
Offline
linux 6.12?
Have you tried to downgrade to the last 6.11 kernel?
Is it only "mouse and trackpad"? Videos play fine?
How's the CPU load? (run "top" and wiggle around your rodent like crazy)
Does the eGPU come with a whole dock and notably external power supply?
What desktop environment/compositor/display server is this?
Offline
linux 6.12?
Have you tried to downgrade to the last 6.11 kernel?Is it only "mouse and trackpad"? Videos play fine?
How's the CPU load? (run "top" and wiggle around your rodent like crazy)
Does the eGPU come with a whole dock and notably external power supply?
What desktop environment/compositor/display server is this?
I definitely should've included some of this info in my original post, sorry.
1) I tested kernel 6.11.9 and the issue is not present, so it indeed seems to only be a 6.12 issue.
2) When I move my mouse like crazy, the CPU usage of gnome-shell jumps up to about 15 % from 0.3 %. This however happens even on kernels that don't have this issue, so I assume it's fine.
3) Yes, it's a GPU in a dock with its own power supply (TH3P4G3).
4) I am running GNOME 47/Mutter on Wayland.
Thanks!
Offline
Yes, it's a GPU in a dock with its own power supply (TH3P4G3).
Do you have a dumb charger that you can use for external power supply to see whether it's more related to that than the eGPU?
I am running GNOME 47/Mutter on Wayland.
… and test not gnome on X11 (other environments) eg. openbox or weston.
Also
Is it only "mouse and trackpad"? Videos play fine?
Offline
Do you have a dumb charger that you can use for external power supply to see whether it's more related to that than the eGPU?
Yes, I have tested this and it has no effect. Changing power modes also doesn't have any effect on anything.
… and test not gnome on X11 (other environments) eg. openbox or weston.
I tried running i3 and Sway. Sway has the same issue as GNOME Wayland, i3 works fine, so the issue seems to only affect Wayland.
Is it only "mouse and trackpad"? Videos play fine?
Sorry, missed this. Videos play completely fine, it really seems that it's just the mouse that is affected.
Offline
Does https://wiki.archlinux.org/title/Sway#No_visible_cursor help w/ sway (this will not work w/ gnome)
Is this a single output?
https://wiki.archlinux.org/title/VRR capable?
Do you also use an external monitor w/ the eGPU and your dock?
Offline
Does https://wiki.archlinux.org/title/Sway#No_visible_cursor help w/ sway (this will not work w/ gnome)
This seems to have no effect at all in Sway, which makes me wonder if I'm setting the variable correctly? I just export it in a tty and then run sway from it, that should work, right...?
As I said before, when I launch OBS in GNOME, that definitely disables the hardware cursor. It becomes smoother (not laggy) but less responsive.
Is this a single output?
https://wiki.archlinux.org/title/VRR capable?
Yes, it's just the laptop's built-in display. It is VRR capable. I tried enabling VRR, disabling it, even completely disabling the experimental GNOME VRR option, but none had any effect on the laggy mouse movement.
Do you also use an external monitor w/ the eGPU and your dock?
Yes, I have two external monitors which I use exclusively with the eGPU. I can't do it at the moment but I'll try to dig up an HDMI cable and plug it into one of these monitors directly tomorrow to see if the mouse is also laggy on external displays.
Thanks again for all your help diagnosing this, I really appreciate it.
Offline
I just export it in a tty and then run sway from it, that should work, right...?
grep -zi cursor /proc/$(pidof sway)/environ
I tried enabling VRR, disabling it
In the compositor or the UEFI?
Offline
Sorry for taking a while to get back to you.
grep -zi cursor /proc/$(pidof sway)/environ
This prints out
WLR_NO_HARDWARE_CURSORS=1
so I guess the variable is set correctly. There really isn't any noticable difference though.
In the compositor or the UEFI?
In the compositor. The laptop does not have an option to turn off VRR in UEFI... or is there some way to do it?
As I planned I tested external displays and discovered something interesting: one of my external monitors is VRR capable and the other is not. The VRR capable one also had the same laggy mouse issue, but my second monitor, which does not have VRR support, appeared perfectly normal. So I believe you might be on the right track and this issue could be VRR related. VRR appears to work perfectly well when running through the eGPU, though.
Offline
Try to "adaptive_sync=false" and "vblank_mode=0", you can also use ~/.drirc
<device>
<application name="Default">
<option name="vblank_mode" value="0"/>
<option name="adaptive_sync" value="false"/>
</application>
</device>
vblank_mode=0 completely disables vsync, so relegate that to a subsequent test
Last edited by seth (2024-12-31 08:46:43)
Offline
Hey, really sorry for taking so long to reply, I am in the middle of my exam period and I just lost track of this.
Try to "adaptive_sync=false" and "vblank_mode=0", you can also use ~/.drirc
I tried both of these options and they don't seem to have an effect. I never used the .drirc file so I might be doing this incorrectly, I just added what you sent to it, first with just adaptive_sync set to false and then also vblank_mode set to 0, but none of these seemed to make any noticeable difference after reboot.
Offline
Wrt "added", what does the file currently look like?
Offline
The file currently just has what you sent, so:
<device>
<application name="Default">
<option name="adaptive_sync" value="false"/>
<option name="vblank_mode" value="0"/>
</application>
</device>
Exactly this.
Offline
Technically this belongs into <driconf>…</driconf> tags, not sure whether dri will go w/o but eg. "glxgears" would reflect vblank_mode=0 by running at some 1000 fps
Offline
I changed the file to be:
<driconf>
<device>
<application name="Default">
<option name="vblank_mode" value="0"/>
</application>
</device>
</driconf>
Then I ran glxgears and this is the output I get:
36550 frames in 5.0 seconds = 7309.865 FPS
33529 frames in 5.0 seconds = 6705.754 FPS
35640 frames in 5.0 seconds = 7127.940 FPS
36388 frames in 5.0 seconds = 7277.383 FPS
35300 frames in 5.0 seconds = 7059.942 FPS
Mouse movement seems just as messed up as before, though.
Offline
Okay, I decided to look around the internet to see if any new information popped up on this and I actually managed to solve the issue. It's apparently a known issue with the AMD driver: https://bbs.archlinux.org/viewtopic.php?id=301280
I set a kernel parameter:
amdgpu.dcdebugmask=0x10
...and now everything seems to be working fine. I have no idea if this comes with any side effects or anything, but I'm writing this from the latest linux 6.12.9-arch1-1 and everything is smooth. Thanks again for your effort in helping me diagnose this!
Offline
That's the panel self-refresh, "mouse laggy" is a bit weird as symptom for that, but you should undo the other adjustments.
Offline
Yes, I removed .drirc. I am not the only person experiencing a laggy mouse because of this: https://bbs.archlinux.org/viewtopic.php?id=302050
Offline