-
First connect whatever display you want to use Moonlight on. I'll be using a 65" Roku TV. I connected it to my laptop running Fedora and after my system detected it I use
for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; doneto find which directory has the EDID file for me it'sHDMI-A-1 -
Copy that edid file to your home directory
cp /sys/class/drm/card0-HDMI-A-1/edid ~/. Now get that edid file over to your Bazzite (streaming machine). I used LocalSend to transfer it. -
Create a directory to store this new edid file
sudo mkdir -p /usr/local/lib/firmwarethen place the file in theresudo mv ./edid.bin /usr/local/lib/firmware/ -
Add this new edid to your kernel args
sudo rpm-ostree kargs --append-if-missing="firmware_class.path=/usr/local/lib/firmware drm.edid_firmware=HDMI-A-1:edid.bin video=HDMI-A-1:e" -
Reboot
systemctl reboot. After you log back into Bazzite open up your Display Configuration window (right-click on desktop) and notice you have an additional display set your virtual display to Mirror/Replica your primary. -
Configure Sunshine so we force all our games to use the virtual display instead of our primary when using Moonlight. Open a terminal and run
kscreen-doctor -o | grep Output:look for your virtual screen id. In my case it'sHDMI-A-1. -
Right-click Sunshine icon in your tray and select "Open Sunshine" go to Configuration page. Once there click on the General tab and click + Add to put a "Do" and a "Undo Command".
-
For your "Do" command you want to disable your primary display(s) and only enable your virtual display (this will force games to launch on the correct screen with correct resolution). In your "Undo" command you want to do the opposite (i.e. disable your Virtual Display and enable your primary display(s)). Below are my Do and Undo commands:
Do:
/usr/bin/kscreen-doctor output.DP-2.disable && /usr/bin/kscreen-doctor output.HDMI-A-1.enable
Undo (make sure you re-enable your Virtual Display as well):
/usr/bin/kscreen-doctor output.DP-2.enable
- Test on Moonlight to verify everything works as expected.
(citation: https://www.reddit.com/r/linux_gaming/comments/199ylqz/streaming_with_sunshine_from_virtual_screens/)
Thanks, im a total noob, i removed the edid from kargs as i was mostly chatgpting my way into these issues but i still havent found a reliable solution. basically i want to stream my bazzite pc using sunshine to my steamdeck and to my tv. Tried both your guide with edid and with a dummy plug but in both cases my pc gets a blank screen after reboot and i have to either remove the dummy plug from the hdmi port or switch port from hdmi to bypass gaming mode and only after that my hdmi shows the desktop. maybe mirroring would do it im not sure..