[2025-09-22 03:54:46.056]: Info: Sunshine version: v2025.628.4510
[2025-09-22 03:54:46.056]: Info: Package Publisher: LizardByte
[2025-09-22 03:54:46.056]: Info: Publisher Website: https://app.lizardbyte.dev
[2025-09-22 03:54:46.056]: Info: Get support: https://app.lizardbyte.dev/support

● sunshine.service - Sunshine (Moonlight host) [system]
     Loaded: loaded (/etc/systemd/system/sunshine.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2025-09-21 22:36:52 UTC; 5h 17min ago
   Main PID: 60924 (sunshine)
      Tasks: 28 (limit: 19039)
     Memory: 106.1M
        CPU: 48min 45.000s
     CGroup: /system.slice/sunshine.service
             └─60924 /usr/bin/sunshine

Sep 21 22:38:08 vb515d0a1-ab6b-4861-a966-be85be7e9f7c sunshine[60924]: [2025-09-21 22:38:08.391]: Error: Couldn't get cursor from XFixesGetCursorImage
Sep 21 22:38:08 vb515d0a1-ab6b-4861-a966-be85be7e9f7c sunshine[60924]: [2025-09-21 22:38:08.408]: Error: Couldn't get cursor from XFixesGetCursorImage
Sep 21 22:38:08 vb515d0a1-ab6b-4861-a966-be85be7e9f7c sunshine[60924]: [2025-09-21 22:38:08.425]: Error: Couldn't get cursor from XFixesGetCursorImage
Sep 21 22:38:08 vb515d0a1-ab6b-4861-a966-be85be7e9f7c sunshine[60924]: [2025-09-21 22:38:08.442]: Error: Couldn't get cursor from XFixesGetCursorImage
Sep 21 22:38:08 vb515d0a1-ab6b-4861-a966-be85be7e9f7c sunshine[60924]: [2025-09-21 22:38:08.458]: Error: Couldn't get cursor from XFixesGetCursorImage
Sep 21 22:38:08 vb515d0a1-ab6b-4861-a966-be85be7e9f7c sunshine[60924]: [2025-09-21 22:38:08.475]: Error: Couldn't get cursor from XFixesGetCursorImage
Sep 22 02:11:04 vb515d0a1-ab6b-4861-a966-be85be7e9f7c sunshine[60924]: [2025-09-22 02:11:04.796]: Error: Couldn't get cursor from XFixesGetCursorImage
Sep 22 02:11:04 vb515d0a1-ab6b-4861-a966-be85be7e9f7c sunshine[60924]: [2025-09-22 02:11:04.810]: Error: Couldn't get cursor from XFixesGetCursorImage
Sep 22 02:11:04 vb515d0a1-ab6b-4861-a966-be85be7e9f7c sunshine[60924]: [2025-09-22 02:11:04.827]: Error: Couldn't get cursor from XFixesGetCursorImage
Sep 22 02:11:04 vb515d0a1-ab6b-4861-a966-be85be7e9f7c sunshine[60924]: [2025-09-22 02:11:04.844]: Error: Couldn't get cursor from XFixesGetCursorImage

# /etc/systemd/system/sunshine.service
[Unit]
Description=Sunshine (Moonlight host) [system]
After=lightdm.service graphical.target nvidia-persistenced.service
Wants=lightdm.service

[Service]
Type=simple
User=gamer
Group=gamer
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/gamer/.Xauthority
Environment=XDG_RUNTIME_DIR=/run/user/1000
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
PermissionsStartOnly=true

# Copy LightDM cookie to gamer's home so Sunshine (running as gamer) can read it
ExecStartPre=/bin/sh -lc 'if [ -r /var/run/lightdm/root/:0 ]; then install -m600 -o gamer -g gamer /var/run/lightdm/root/:0 /home/gamer/.Xauthority; fi'

# Wait up to 60s for X to accept that cookie (note the && exit 0 is OUTSIDE su)
ExecStartPre=/bin/sh -lc 'for i in $(seq 1 60); do su -s /bin/sh -c "DISPLAY=:0 XAUTHORITY=/home/gamer/.Xauthority xset q >/dev/null 2>&1" gamer && exit 0; sleep 1; done; echo "X not ready"; exit 1'

ExecStart=/usr/bin/sunshine
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target
