headless zero copy sunshine in fedora!
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.
Poeng Link
I have this setup with Plasma, and it is probably easier to do this at the Linux level. I added this to my kernel command line:
drm.edid_firmware=DP-1:edid/lg-ultra.bin video=DP-1:3840x2160@60eWhere that EDID file I dumped from a spare monitor using a method I got here.
Anyway, it can be tricky to pick the right device, but I can confirm Sunshine sees it and works properly, and it can be managed like a normal monitor.
This approach is probably the most reliable and works with any AMD card at the least.
I think I actually figured it out without the EDID injection, I forgot a line in the sway config. I’ll test it after work today and report back what I have if it works as this method is a cleaner way of getting headless zero copy.
EDIT: okay, posted. feel free to suggest corrections as I’m still learning.
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…..
and if you want an undo command set it to
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.