Hi all. I wanted to share a discovery that I worked out with support on this Arch Linux forum thread.
The Problem
When idling for a few seconds (such as reading an article in Chrome and taking my hand off the mouse), and then moving the mouse / pressing a key, there is a couple-of-second delay only affecting some applications (like Chrome and KiCAD). The inputs get queued up during the delay period, then happen all at once.
I’ve seen this behavior virtually since I got the laptop, and simply not troubleshot until now.
The Solution
Any application that uses the dGPU will have this behavior. To make it better, set the following file to have a much larger delay than 5000 ms (the default on my system), such as 500000
:
/sys/bus/pci/devices/{pci-address}/power/autosuspend_delay_ms
For me, the {pci-address}
is 0000:03:00.0
.
System Details
Arch Linux
6.12.3-arch1-1
AMD Radeon™ RX 7700S
1 Like
Same setup but I use the zen kernel and haven’t noticed this issue. Can you reproduce it on that kernel?
I will try that out in a week when I have some time, but there is no doubt it is the cause of my issue. Do you use wayland / swaywm? Anyway either (a) you may not be using the dGPU for these applications, or (b) your WM or something may consistently use the dGPU so much that it never goes to sleep.
At first I was ignoring autosuspend as the culprit, because it usually is seen on the USB input devices, which I confirmed there was no associated udev rule doing this. But in this case it’s set on the dGPU, not the USB devices.
I run plasma, i.e. Wayland. Despite my efforts so far to prevent Brave (based on Chromium as well) from using my dGPU by disabling hardware acceleration in the settings, it continues to consume the 7700s instead of my 780m.
If you want to force apps like Chrome not to use the dGPU, start them with export LIBGL_ALWAYS_SOFTWARE=1
. I tested this and it also fixed my issue, before finding the autosuspend fix.
I would avoid it as a system-wide setting, at least for testing at first, as my compositor fails with errors. But if I set it specific to some applications, it is effective on those applications.
That sounds like what I want, thanks! I just want to strip it from the few applications that incorrectly request it. Currently Brave is the only one doing that, thankfully Librewolf works by default as I want it to.
1 Like