Enabling Hardware Decoding for Videos - oh-nyoo/steam-deck-advance GitHub Wiki
Introduction
When watching videos or live streams on your Steam Deck, using the Deck's hardware decoders will allow you to save CPU cycles and decrease your battery usage. However, browsers and other programs on the Deck may not use hardware decoding by default. This guide serves to demonstrate how to configure common programs to use the Video Acceleration API (VA-API) decoder on the Steam Deck.
Most of the information in this guide can also be parsed from https://wiki.archlinux.org/title/Hardware_video_acceleration
Firefox Flatpak
As of Steam OS 3.3, all installations should have been migrated to the Flatpak version of Firefox.
- In your address bar, type
about:config
to access the configuration page. - Search for the preference
gfx.webrender.all
and set it totrue
- Search for the preference
media.ffmpeg.vaapi.enabled
and set it totrue
Chromium-based Browsers (BROKEN DON'T USE)
-
Note: These instructions will not affect
Google Chrome
within Game Mode. Currently there is a bug in XWayland that causes a stutter, so using VA-API on theGoogle Chrome
for Game Mode is not recommended. https://bugs.archlinux.org/task/67035 -
These instructions should work for all chromium-based browsers installed from
Discover
, such as Google Chrome, Chromium, Edge, etc. However this was tested with Ungoogled-Chromium.
Unlike Firefox where you modify the config, you must invoke Chromium with specific command line arguments. To make it easier to run Chromium with these arguments, create a custom Desktop file.
-
Copy the original desktop file from your browser into your local directory. Replace
com.github.Eloston.UngoogledChromium
with whatever browser you are using.cp /var/lib/flatpak/exports/share/applications/com.github.Eloston.UngoogledChromium.desktop ~/.local/share/applications/
-
Edit the file that you copied:
#Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/chromium --file-forwarding com.github.Eloston.UngoogledChromium @@u %U @@ Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --env=LIBVA_DRIVER_NAME=radeonsi --command=/app/bin/chromium --file-forwarding com.github.Eloston.UngoogledChromium @@u %U @@ --ignore-gpu-blocklist --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder,UseSkiaRenderer --use-gl=egl
MPV (Flatpak)
MPV is a video player, not a browser. However you can use it to play youtube videos as well. This is the best way to watch videos while using the least amount of resources.
- Install
mpv
using theDiscover
store - Create a file named
mpv.conf
in the/home/deck/.var/app/io.mpv.Mpv/config/mpv/
directory - Copy and paste the following into the file:
vo=gpu hwdec=auto