explaingit

characterecho-sean/cachyos-headless-sunshine

Analysis updated 2026-05-18

1PythonAudience · developerComplexity · 5/5Setup · hard

TLDR

A setup script that turns a headless Linux PC into a game-streaming box using Sunshine and gamescope, with native-resolution HDR streaming to Moonlight clients.

Mindmap

mindmap
  root((headless-sunshine))
    What it does
      Headless game streaming
      Native resolution HDR
      Synthetic EDID
      Autostart on boot
    Tech stack
      Sunshine
      gamescope
      Steam
      NVIDIA
    Use cases
      Phone or tablet streaming
      HDR calibration
      Shader pre-caching
    Audience
      Linux gamers
      Homelab builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Turn a GPU-equipped Linux PC into a headless game-streaming server with no monitor attached.

USE CASE 2

Stream games at a phone or tablet's native resolution with HDR support via Moonlight.

USE CASE 3

Calibrate HDR inverse tone-mapping against a real display using an in-Steam calibration tool.

What is it built with?

PythonSunshinegamescopeSteamNVIDIA

How does it compare?

characterecho-sean/cachyos-headless-sunshine0xustaz/streamgatea-bissell/unleash-lite
Stars111
LanguagePythonPythonPython
Setup difficultyhardhardhard
Complexity5/54/54/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires an NVIDIA GPU, CachyOS or another Arch-based distro, and boot-level configuration of the display connector.

License terms are not stated in the README.

In plain English

cachyos-headless-sunshine is a setup script for turning a Linux gaming PC into a headless game-streaming box, meaning it runs with no monitor, keyboard, or mouse ever attached. It combines Sunshine, a game-streaming host, with gamescope, a display compositor, so that a phone, tablet, or TV running the Moonlight streaming app receives a stream at its own native resolution, with HDR support. It was built and tested on CachyOS, an Arch-based Linux distribution, with an NVIDIA RTX 4090 and a Samsung Galaxy Tab S9 Ultra as the streaming client, but the author expects it to work on other Arch-based distributions, GPUs, and resolutions as well. The core problem it solves is that a generic HDMI dummy plug only reports a handful of standard resolutions, not your actual device's native resolution, which normally forces either a blurry fallback resolution or manual reconfiguration after every reboot. The script builds a synthetic display identity file that declares your device's real resolution and HDR capability, loaded at boot so the system always treats the display as connected, with no physical plug required. If that approach does not work on a given setup, it can fall back to patching a real HDMI dummy plug's own display data instead. On top of that, it installs and configures gamescope as a headless compositor pinned to your resolution and refresh rate, with inverse tone mapping enabled so standard-range game content is properly converted for an HDR display instead of looking dark and wrong. It wires up Sunshine's screen capture to read directly from the graphics driver rather than depending on a specific compositor protocol, and sets everything to start automatically on boot through an autologin console, launching gamescope, Sunshine, and Steam Big Picture together. Extra touches include a performance overlay you can toggle mid-stream, an interactive HDR calibration tool that installs as its own entry in your Steam library so you can tune brightness against your real display, faster shader pre-caching so newly installed games stutter less on first launch, and a workaround that clones the virtual controller Sunshine creates so certain games that fail to detect it can still be played. Because a stray button press could otherwise suspend a headless machine with no way to wake it, the installer also disables the system's suspend option.

Copy-paste prompts

Prompt 1
Explain how to generate a synthetic EDID file that reports a custom display resolution and HDR capability.
Prompt 2
How do I configure gamescope to run headless with DRM backend and inverse tone mapping enabled?
Prompt 3
Write a systemd autologin setup that launches a compositor and game launcher automatically on boot.
Prompt 4
Design a controller-clone workaround for games that fail to detect a virtual gamepad device.

Frequently asked questions

What is cachyos-headless-sunshine?

A setup script that turns a headless Linux PC into a game-streaming box using Sunshine and gamescope, with native-resolution HDR streaming to Moonlight clients.

What language is cachyos-headless-sunshine written in?

Mainly Python. The stack also includes Python, Sunshine, gamescope.

What license does cachyos-headless-sunshine use?

License terms are not stated in the README.

How hard is cachyos-headless-sunshine to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is cachyos-headless-sunshine for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.