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.

  • themoken@startrek.website
    link
    fedilink
    English
    arrow-up
    10
    ·
    7 days ago

    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@60e

    Where 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.

    • muusemuuse@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      4 days ago

      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.