Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

GPU usage spikes to 100 when decoding video in Wayland (not in X11) #829

Open
yareku-1 opened this issue Jul 27, 2024 · 0 comments
Open

Comments

@yareku-1
Copy link

yareku-1 commented Jul 27, 2024

When HW-accelerated decoding video is performed using VA-API on a Radeon 680M in Wayland, GPU usage keeps spiking to 100 % increasing power draw etc.

These spikes only occur during HW-accelerated decoding and are independent of available GPU resources (DPM set to low/GPU frequency capped at 200 MHz behaves the same as no cap at 2200 MHz - only power consumption increases accordingly as the spikes can now use more GPU), DE/WM used, codec, resolution, energy performance policy, AMD p-state settings, adaptive sync, refresh rate etc. As soon as VA-API playback ends, the spikes also disappear.

Example compared to X11 when playing a VP9 video:

  • Chromium-based browsers, vlc and most other apps have avg GPU usage comparable to X11 but there are short spikes to 100 increasing total power consumption by 2 W (at low DPM) or up to 5 W when uncapped.
  • Firefox-based browsers spike all the time increasing the avg GPU load six-fold with a 5 W consumption increase even at 200 MHz.

Reported HW decoder usage percentage is roughly the same in X11 and Wayland.

vainfo: VA-API version: 1.21 (libva 2.22.0)
vainfo: Driver version: Mesa Gallium driver 24.1.4-arch1.2 for AMD Radeon 680M (radeonsi, rembrandt, LLVM 18.1.8, DRM 3.57, 6.10.1-arch1-1)
vainfo: Supported profile and entrypoints
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

The issue also occurred on kernel 6.9 and with earlier mesa drivers.

Thank you very much for your help!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant