Skip to content

GPU & Sunshine Config

StatusEnabled (set Feb 2026 to fix 30fps idle issue)
Servicenvidia-persistenced
Override/etc/systemd/system/nvidia-persistenced.service.d/override.conf
Verifynvidia-smi -q | grep "Persistence Mode" — should show Enabled
Manual enablesudo nvidia-smi -pm 1

The stock service at /usr/lib/systemd/system/nvidia-persistenced.service has --no-persistence-mode which defeats the purpose. Override removes that flag.


  • Symptom: Sunshine drops to 30fps after not streaming for a while
  • Root cause: Without persistence mode, GPU drops to P8 (low power) when idle, throttling NVENC encoder
  • Fix applied:
    1. Enabled persistence mode (nvidia-smi -pm 1)
    2. Created systemd override to persist across reboots
    3. Disabled DPMS in xorg.conf and via xset -dpms
  • If it recurs: check nvidia-smi for P-state (should not be P8) and persistence mode status

Path/etc/X11/xorg.conf
DisplayHeadless virtual (no physical monitor)
Connected monitorDP-0 (virtual)
DPMSDisabled (Option "DPMS" "false")
DPI96x96
ModeValidationPermissive (AllowNonEdidModes, NoVirtualSizeCheck, etc.)
ResolutionRefreshUse Case
3024x196460HzMacBook Pro 14” native (with notch)
3024x189060HzMacBook Pro 14” native (no notch)
3440x144060HzUltrawide
3840x216060Hz4K
2560x144060Hz1440p
1920x1080120Hz1080p high refresh
1920x108060Hz1080p standard
1600x90060HzLow-res fallback
  • DPMS disabled (both in xorg.conf and at runtime via xset -dpms)
  • Screen saver off (xset s off)
  • Prevents GPU from downclocking when idle

AutologinEnabled (user: zeul)
WaylandDisabled (X11 only for NVIDIA KMS capture)
Config/etc/gdm3/custom.conf

Typesystemd user service (sunshine.service)
Auto-startOn graphical session
Override~/.config/systemd/user/sunshine.service.d/override.conf
RestartRestart=always, RestartSec=5
nvenc_preset = 1
nvenc_twopass = disabled
fec_percentage = 10
origin_web_ui_allowed = wan
qp = 10
Script~/set-resolution.sh
TriggerSunshine prep-cmd on stream start
Env varsSUNSHINE_CLIENT_WIDTH / SUNSHINE_CLIENT_HEIGHT
Methodnvidia-settings -a CurrentMetaMode
Log/tmp/sunshine-res.log

https://localhost:47990 (or via Tailscale IP). Remote access enabled (origin_web_ui_allowed = wan).


Terminal window
# GPU status
nvidia-smi
# Display config
DISPLAY=:0 xrandr
# Sunshine logs
journalctl --user -u sunshine -n 50
# Restart Sunshine
systemctl --user restart sunshine
# DPMS status
DISPLAY=:0 xset q | grep -A3 DPMS