I am trying to set up sunshine to capture using the wlr method and do it headlessly. no dummy plug, no monitor. Supposedly this is possible, but I’m having trouble.
first I create the user in fedora and give them the permissions needed. I set up setd and create the service file for systemd to fire a sway instance. I edit sway config for that user to include the virtual display output by including this line:
output HEADLESS-1 { pos 0,0 mode 3840x2160@60hz }
That should make a virtual monitor that wayland can render to and sunshine can capture the framebuffer from sway with.
Sway launches fine, sunshine see the wayland instance, but it sees no monitor attached so it has nothing in it can capture from.
I cannot use swaymsg from SSH since its not part of that wayland session so it cant access it and pass commands to it. it just complains about socket errors. So I dont know what I’m supposed to do to make this headlessly run.


Okay here’s what I stumbled through.
This is on a fedora server machine with an intel ARC B580. I intentionally chose fedora because my fedora skills are ass and I wanted to improve them so…
output HEADLESS-1 { pos 0,0 mode 3840x2160@60hz } exec swaymsg create_output HEADLESS-1 default_border none default_floating_border nonecapture = wlr encoder = vaapi[Unit] Description=Sway Wayland compositor Documentation=man:sway(5) After=pipewire.socket wireplumber.service Wants=pipewire.socket wireplumber.service [Service] ExecStart=/usr/bin/sway Restart=on-failure RestartSec=2 Environment=XDG_SESSION_TYPE=wayland Environment=LIBSEAT_BACKEND=seatd Environment=XDG_CURRENT_DESKTOP=sway [Install] WantedBy=default.target[Unit] After=sway.service Requires=sway.service [Service] Environment=WAYLAND_DISPLAY=wayland-1 Environment=XDG_SESSION_TYPE=wayland [Install] WantedBy=default.targetsh -c "swaymsg output HEADLESS-1 pos 0 0 res \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz\""and if you want an undo command set it to "sh -cswaymsg output HEADLESS-1 pos 0 0 res 3840x2160@60Hz"There, you now have a headless, resolution-matching, zero-copy, lightweight sunshine install and you didn’t need any dummy plugs, connected monitors, EDID injection, etc.
There are likely things I missed but this is what I’ve got so far.
Also, if you are using an intel ARC GPU, you might want to run through fwupd as there are issues with these cards that the windows installer resolves during driver install that we cant run on linux that way, so we can tell linux to do that step for us with fwupd.