intel / libva

Libva is an implementation for VA-API (Video Acceleration API)
http://intel.github.io/libva/
Other
662 stars 302 forks source link

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

Open yareku-1 opened 3 months ago

yareku-1 commented 3 months ago

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:

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!