In Gamemode, Sunshine server can't find any encoders.

I'm struggling to capture game mode with Sunshine to stream to my phone/tv. (steamlink tv app was discontinued) The app/service runs in gamemode on boot but when trying to connect it comes up with the aforementioned error. Any tips on how to expose the gpu or even cpu as an encoder while under gamemode? it works fine in desktop mode. This is my .service file, any advice is greatly appreciated.
Description=Sunshine self-hosted game stream host for Moonlight.
After=graphical-session.target

[Service]
ExecStart=flatpak run --command=dev.lizardbyte.app.Sunshine.sh dev.lizardbyte.app.Sunshine
Restart=on-failure
RestartSec=5s
#Flatpak Only
#ExecStop=flatpak kill --command=dev.lizardbyte.app.Sunshine

[Install]
WantedBy=graphical-session.target
Description=Sunshine self-hosted game stream host for Moonlight.
After=graphical-session.target

[Service]
ExecStart=flatpak run --command=dev.lizardbyte.app.Sunshine.sh dev.lizardbyte.app.Sunshine
Restart=on-failure
RestartSec=5s
#Flatpak Only
#ExecStop=flatpak kill --command=dev.lizardbyte.app.Sunshine

[Install]
WantedBy=graphical-session.target
1 Reply
BearFOX
BearFOX12mo ago
I recently added the after= line because some users on the github issues for the app said it made it work for them. On the docs it says to run sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine)) - that doesn't work but if i swap out $(readlink... for the path of my executable, it then says cannot set (read-only filesystem). I did try this with the appimage and the command did run, but it didn't make encoders or KMS capture available under Wayland. Am I missing something simple? Even on the sunshine discord a lot of people are having similar issues on various linux distros. So I'm gonna mark this as solved as it doesn't look specific to Bazzite imo.
Want results from more Discord servers?
Add your server