- Download an official release of sunshine with
.AppImageextension on your Steam Deck. https://github.com/LizardByte/Sunshine/releases/tag/latest - Move it to the home directory .local folder:
mkdir -p ~/.local/sunshine/ && mv ~/Downloads/sunshine.AppImage ~/.local/sunshine/ - Add root user to the audio group:
sudo usermod -aG audio root - Execute the following to put the systemd unit file to autorun sunshine upon Steam Deck startup:
sudo tee /etc/systemd/system/sunshine.service << 'EOF'
[Unit]
StartLimitBurst=4
[Service]
User=root
Group=root
Environment=LD_LIBRARY_PATH=/usr/lib
Environment=PULSE_SERVER=unix:/run/user/1000/pulse/native
Environment=XDG_RUNTIME_DIR=/run/user/1000
ExecStart=/home/deck/.local/sunshine/sunshine.AppImage
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
EOF- Update systemd unit files db and enable unit file:
sudo systemctl daemon-reload && sudo systemctl enable sunshine.service --now - Check if everything is correct and the service is running by:
sudo systemctl status sunshine.service - Access sunshine's webui:
https://localhost:47990(or if have another device on the lan access webui by the steam deck's lan ip)
Note:
Audio on steam deck won't be working when streaming to a client but would return to normal when a client disconnects.
It's maybe possible to run a systemd service as a default deck user, however it requires to give CAP_SYS_ADMIN to the binary, but giving that permission would make it impossible to ovveride LD_LIBRARY_PATH due to security implications.
And it's needed to be overriden due to an issue when libva tries to load drivers not from Steam Deck's default /usr/lib/dri but /usr/x86_64_gnu/lib. It might be worth to unlock the read-only filesystem and link those to this path, but I don't think its worth enough the hassle. When tried LIBVA_DRIVERS_PATH is ignored for whatever reason.