You are not logged in.

#1 2024-12-26 14:51:39

oschl
Member
Registered: 2023-08-25
Posts: 13

[SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

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

#2 2024-12-27 09:04:48

seth
Member
Registered: 2012-09-03
Posts: 60,807

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

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

#3 2024-12-27 12:17:11

oschl
Member
Registered: 2023-08-25
Posts: 13

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

seth wrote:

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

#4 2024-12-27 15:25:12

seth
Member
Registered: 2012-09-03
Posts: 60,807

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

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

#5 2024-12-28 11:16:55

oschl
Member
Registered: 2023-08-25
Posts: 13

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

seth wrote:

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.

seth wrote:

… 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.

seth wrote:

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

#6 2024-12-28 20:26:54

seth
Member
Registered: 2012-09-03
Posts: 60,807

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

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

#7 2024-12-28 23:02:53

oschl
Member
Registered: 2023-08-25
Posts: 13

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

seth wrote:

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.

seth wrote:

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.

seth wrote:

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

#8 2024-12-29 09:29:13

seth
Member
Registered: 2012-09-03
Posts: 60,807

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

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

#9 2024-12-30 20:41:35

oschl
Member
Registered: 2023-08-25
Posts: 13

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

Sorry for taking a while to get back to you.

seth wrote:
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.

seth wrote:

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

#10 2024-12-31 08:46:22

seth
Member
Registered: 2012-09-03
Posts: 60,807

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

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 wink

Last edited by seth (2024-12-31 08:46:43)

Offline

#11 2025-01-15 22:28:02

oschl
Member
Registered: 2023-08-25
Posts: 13

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

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.

seth wrote:

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

#12 2025-01-16 00:09:01

seth
Member
Registered: 2012-09-03
Posts: 60,807

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

Wrt "added", what does the file currently look like?

Offline

#13 2025-01-16 12:22:18

oschl
Member
Registered: 2023-08-25
Posts: 13

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

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

#14 2025-01-16 17:16:13

seth
Member
Registered: 2012-09-03
Posts: 60,807

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

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

#15 2025-01-16 22:52:03

oschl
Member
Registered: 2023-08-25
Posts: 13

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

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. sad

Offline

#16 2025-01-17 11:10:59

oschl
Member
Registered: 2023-08-25
Posts: 13

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

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

#17 2025-01-17 11:19:01

seth
Member
Registered: 2012-09-03
Posts: 60,807

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

That's the panel self-refresh, "mouse laggy" is a bit weird as symptom for that, but you should undo the other adjustments.

Offline

#18 2025-01-17 11:21:18

oschl
Member
Registered: 2023-08-25
Posts: 13

Re: [SOLVED] Mouse is laggy on new kernel versions (ThinkPad T14s AMD)

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

Board footer

Powered by FluxBB