A monitor-restart service written for Sunshine Linux Hosts!
The great Sunshine game stream application has a critical issue on Linux desktops: When the display sleeps, Sunshine doesn't wake it up and instead errors out (see this GiHub discussion for more information). This makes using Sunshine with Linux-on-the-Desktop a frustrating experience.
Sunrise will monitor the Sunshine log file, watch for monitor-is-missing errors, then wake the monitor.
Sunrise is very configurable, check out the sunrise.cfg.example file for all
of the commented options.
- Build sunrise with
go build(or usebuild-with-docker.bashto build using an ephemeral Docker container) - Move
sunriseto/opt/sunrise/sunrise - Copy
sunrise.cfg.exampleto/etc/sunrise/sunrise.cfg - Edit
/etc/sunrise/sunrise.cfgto your specifications (you'll need to change theSunshineLogPathvariable) - Copy
sunrise.serviceto$HOME/.config/systemd/user/sunrise.service systemctl --user daemon-reloadsystemctl --user enable sunrisesystemctl --user start sunrise
This is working for Debian Trixie + KDE and GNOME Wayland, but I don't have the
time to test every desktop environment out there. If you want, feel free to
add other working "wake monitor" commands in sunrise.cfg.example.