You are not logged in.
Issue summary
When VA-API is used to play accelerated video in Wayland on a Radeon 680M with the AMDGPU driver, GPU utilisation increases several times compared to X11 (or Windows). This includes frequent spikes to maximum utilisation.
Example
LibreWolf VP-9 4K YouTube video on X11 results in 4-5 % average GPU utilisation with spikes to 10-15 %. There are no freezes and power draw is comparable to "optimised" Windows.
Playing the same video in Wayland results in 30-40 % average GPU utilisation with frequent spikes to 100 %. There are occasional freezes in video playback and APU power draw increases by at least 5-7 W (significantly impacting the overall discharge rate).
Similar behaviour is seen in other apps (e. g. VLC) or when other HW-accelerated codecs are used regardless of whether the laptop is plugged in or on battery. My DE is Plasma.
Attempted remedies
Using XWayland results in average GPU usage only slightly higher than X11 (5+ % for LibreFox), but there are still spikes to maximum, which are less frequent than on X11. APU power draw increase is 2-3 W and freezes in playback are rare.
Other measures such as modification of DPM level in AMDGPU (low, high and auto all result in the same spikes), replacing TLP with the default power-profile-daemon, various LibreWolf flags etc. have no effect on the above.
Question
Is anybody aware of a solution that would address the above behaviour in native Wayland? As a wide-gamut display user, I would very much prefer using it over X11 and using XWayland is only a partial workaround.
I suspect the root cause are the spikes to maximum since their frequency is correlated with the increase in power draw and playback freezes.
Thank you!
Last edited by yareku (2024-07-26 03:42:59)
Offline
After some more testing, the issue can be summarised as "VA-API decoding causes GPU usage spikes to 100 in Wayland".
- I have tried Sway to rule out this being a Plasma issue - GPU spikes to 100 were still there.
- Spikes to 100 occur regardless of GPU max frequency (200 or 2200 MHz makes no difference - lower maximum GPU frequency only mitigates the negative power draw impact).
- Firefox-based browsers using Wayland are an outlier with almost constant spikes to 100 and a very high GPU usage increase . The patched Chromium from Arch repo is more in line with VLC and other apps with less frequent spikes to 100, which do not increase report average GPU usage much but still result in a 10-15 % higher power draw (and worse thermals) over X11 where the spikes do not occur.
Any ideas how to troubleshoot this further will be highly appreciated.
Offline
Hi, you can open a issue over here, the open ones don't mention anything in that direction.
Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...
Offline
A probably related issue on the amdgpu bug tracker: https://gitlab.freedesktop.org/drm/amd/-/issues/3195
Offline
Thanks a lot both, I have reported this on libva and returned to the AMD GPU bug tracker.
As for the latter, the suggestions relate to limiting (max possible) GPU usage (e.g. DPM), which seems to rather limit the impact of the GPU usage spikes. I have not yet tried the VCN patch (to be included in 6.11) due to issues with fully applying it to the current kernel.
What puzzles me is that the GPU spikes only occur in Wayland with the HW decoder usage being the same in both X11 (would it be a driver issue then?).
I will update this after testing the VCN patch or other developments.
Offline