[Unit] Description=Headless Wayland compositor for Sunshine Documentation=https://docs.lizardbyte.dev/projects/sunshine/ ConditionHost=mainframe [Service] Type=simple # headless backend: no seat, no input devices, one virtual output. Environment=WLR_BACKENDS=headless Environment=WLR_LIBINPUT_NO_DEVICES=1 # Pin the compositor to the NVIDIA card (card0 = 01:00.0, renderD129), which is # also what sunshine.conf names as its encoder. Without this wlroots picks the # Intel iGPU and every captured frame crosses GPUs. Environment=WLR_DRM_DEVICES=/dev/dri/card0 Environment=XDG_CURRENT_DESKTOP=sway ExecStart=/usr/bin/sway -c %h/.config/sway/headless.conf ExecStopPost=/usr/bin/systemctl --user stop sunshine.service Restart=on-failure RestartSec=5s [Install] WantedBy=default.target