steam-for-linux icon indicating copy to clipboard operation
steam-for-linux copied to clipboard

No hardware accelerated decoding when playing a video inside the client

Open effects3d opened this issue 1 year ago • 6 comments

Your system information

  • Steam client version (build number or date): 1759461205

  • Distribution (e.g. Ubuntu): Arch Linux

  • Opted into Steam client beta?: No

  • Have you checked for system updates?: Yes

  • Steam Logs: steam-logs.tar.gz

  • GPU: AMD Radeon RX 6650 XT

Please describe your issue in as much detail as possible:

When playing a video inside the Steam client (e.g. from a game's store page), it should be using hardware decoding when "Enable hardware video decoding, if supported" is enabled. However, according to nvtop, DEC remained at 0% when playing a video, meaning that hardware acceleration wasn't utilized.

~~Is hardware video decoding not supported under Xwayland at the moment?~~

Steps for reproducing this issue:

  1. Open the store page of any game that includes a video inside the Steam client.
  2. Play the video.
  3. Launch nvtop and look for the DEC variable next to MEM. It will only appear once hardware video decoding goes above 0%.

effects3d avatar Oct 04 '25 16:10 effects3d

Hello @effectsbot, please copy the contents of Steam Runtime Diagnostics from Steam (Steam -> Help -> Steam Runtime Diagnostics) and put it in a gist, then include a link to the gist in this issue report.

kisak-valve avatar Oct 04 '25 16:10 kisak-valve

Hello @effectsbot, please copy the contents of Steam Runtime Diagnostics from Steam (Steam -> Help -> Steam Runtime Diagnostics) and put it in a gist, then include a link to the gist in this issue report.

Done. https://gist.github.com/effectsbot/92bb4cc4172927b912b7959d4bfd4b20

effects3d avatar Oct 04 '25 16:10 effects3d

I've tested this with Openbox on Xorg as well and it appears to be suffering from the same issue.

effects3d avatar Oct 13 '25 00:10 effects3d

Reproduced on NVIDIA (RTX 4090, driver 590.48.01, Arch-based, Wayland). Did some profiling to isolate what the two settings actually do.

Store page videos use AV1, decoded in software via dav1d

With both "Enable GPU accelerated rendering in web views" and "Enable hardware video decoding" enabled, pidstat -t shows 15 active dav1d-worker threads (software AV1 decoder) and nvidia-smi dmon reports dec: 0% — the NVDEC hardware decoder is never used.

The two settings do different things

I tested three configurations and monitored per-thread CPU (pidstat), system CPU (mpstat), and GPU utilization (nvidia-smi dmon/pmon):

Metric Both OFF GPU render ON, HW decode OFF Both ON
VizCompositorTh CPU% 97.2% 4.3% 2.9%
Renderer process CPU% 22.3% 22.9% 15.0%
dav1d workers active yes yes yes
nvidia-smi DEC% 0% 0% 0%

"GPU accelerated rendering in web views" is what fixes the performance problem — it moves the compositor from CPU to GPU, eliminating the ~97% CPU bottleneck. "Hardware video decoding" provides a smaller additional CPU reduction but does not actually use hardware decode — dav1d is still doing the work in all cases.

Workaround

@effectsbot — even though hardware video decoding isn't working, enabling both settings is still worth it. "GPU accelerated rendering in web views" alone eliminates the CPU bottleneck that causes the laggy playback (97% → 4% on the compositor thread).

How to verify

# GPU decode engine (dec column should be >0 if NVDEC is used):
nvidia-smi dmon -s u -d 1 -c 15

# Per-thread CPU (look for dav1d-worker threads):
pidstat -p $(pgrep -d',' steamwebhelper) -u -t 1 15

System: NVIDIA RTX 4090, driver 590.48.01 (nvidia-open-dkms), EndeavourOS (Arch), kernel 6.18.9, Wayland/KDE Plasma, Steam build 1769025840.

Note: Debug and comment is AI assisted.

ibrahim1416 avatar Mar 03 '26 03:03 ibrahim1416

I already have both of the aforementioned settings enabled, but I still think it could be better if CEF had the feature flag for hardware accelerated decoding enabled by default.

Chromium/CEF currently only supports hardware accelerated decoding via VA-API, for which Nvidia doesn't have first party support, so those GPUs would have to stick with software decoding until support for the Vulkan Video Decode extensions is merged into Chromium.

There is of course the third party nvidia-vaapi-driver that provides a VA-API implementation based on NVDEC, but support for Chromium remains questionable.

effects3d avatar Mar 03 '26 12:03 effects3d

@kisak-valve same problem here on a different distro, GPU generation and compositor. Steam's built-in browser doesn't use VA-API even though it works on the system. Trailers stutter and freeze every few seconds, and in fullscreen some are nearly a slideshow. The same store page plays smoothly in Firefox on the same machine.

System

  • Fedora 44, kernel 7.2.8, AMD Radeon RX 7800 XT (Navi32), Mesa 26.2.3 (radeonsi / RADV)
  • Steam client build 1788652215, running through XWayland
  • Tested under both MangoWC and Hyprland 0.56.2 with the same result
  • "Enable hardware video decoding, if supported" is on ("H264HWAccel" "1" in ~/.steam/registry.vdf)

VA-API works on the host (vainfo):

Driver version: Mesa Gallium driver 26.2.3 for AMD Radeon RX 7800 XT (radeonsi, navi32, ACO, DRM 3.64, 7.2.8-200.fc44.x86_64)
VAProfileH264High    : VAEntrypointVLD
VAProfileHEVCMain    : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD

Steam's browser reports no decoder (~/.local/share/Steam/logs/webhelper_gpu.txt):

[ GL implementation parts ]: (gl=egl-angle,angle=opengl)
[ Ozone platform ]: x11
[ featureStatus ]:
    [ gpu_compositing ]: enabled
    [ video_decode ]: enabled
[ gpuMemoryBufferInfo ]:
    (every format, including YUV_420_BIPLANAR and P010): Software only
[ videoAcceleratorsInfo ]:
    [ Decoding ]: (null)

The problems list in the same report only disables WebGPU and video encode. Nothing disables video_decode, so decoding isn't blocklisted. Chromium just finds no VA-API decoder.

During playback:

  • The trailer is AV1, decoded on the CPU by dav1d-worker threads using about 1.3 cores in total. No thread gets close to 100%, and the GPU stays about 5–11% busy.
  • The buffer is far ahead of playback, so it isn't network buffering.
  • It looks the same at 144 Hz and 120 Hz, and on two different Wayland compositors.

So decoding isn't CPU-limited, yet frames still freeze. My guess is that the software decode path doesn't hand frames to the GPU efficiently (all buffers are "Software only"), which ruins frame pacing. Firefox on the same system plays the same trailer smoothly.

Saeverix avatar Oct 05 '26 19:10 Saeverix