Create a Virtual Screen in KDE for Sunshine Streaming

Create a virtual screen in KDE to use a tablet as a secondary display via Sunshine streaming

In the Wayland environment, KDE cannot implement headless output. On Hyprland or sway, we can easily create virtual screens. However, on KDE, only krfb-virtualmonitor can be used to create virtual displays, and even then, they cannot be detected by Sunshine. Therefore, we can forcefully set the display mode and EDID through kernel parameters so that a virtual display can work properly without using a dummy plug.

Obtain the EDID File

EDID is a metadata format used to describe the characteristics of a display device. We can obtain EDID information from an actual monitor or use some publicly available configuration files.

If you want to directly use the EDID file from an existing monitor:

ls /sys/class/drm/

You will see devices such as card1-eDP-1, card1-HDMI-A-1, each representing an output port. Find the corresponding output port’s EDID file:

cat /sys/class/drm/card1-eDP-1/edid > edid.bin

You can also find more diverse EDID files online

Place the File

sudo mkdir -p /usr/lib/firmware/edid
sudo cp edid.bin /usr/lib/firmware/edid/

Select Output

ls /sys/class/drm/card*
/sys/class/drm/card1:
.            card1-HDMI-A-1  engine  gt_act_freq_mhz    gt_max_freq_mhz  gt_RP1_freq_mhz  power
..           dev             error   gt_boost_freq_mhz  gt_min_freq_mhz  gt_RPn_freq_mhz  subsystem
card1-eDP-1  device          gt      gt_cur_freq_mhz    gt_RP0_freq_mhz  metrics          uevent

/sys/class/drm/card1-eDP-1:
.             ddc     drm_dp_aux0  firmware_node    modes              status     waiting_for_supplier
..            device  edid         i2c-9            physical_location  subsystem
connector_id  dpms    enabled      intel_backlight  power              uevent

/sys/class/drm/card1-HDMI-A-1:
.   connector_id  device  edid     firmware_node  power   subsystem  waiting_for_supplier
..  ddc           dpms    enabled  modes          status  uevent

Select card1-HDMI-A-1 as the output device.

Edit Kernel Parameters

Based on the output device chosen above, edit the kernel parameters.

GRUB

Modify the /etc/default/grub file and add the following to GRUB_CMDLINE_LINUX:

GRUB_CMDLINE_LINUX=“drm.edid_firmware=HDMI-A-1:edid/edid.bin video=HDMI-A-1:1920x1080@120e”

You can specify the resolution and frame rate. The final e in video=HDMI-A-1:1920x1080@120e tells the OS to treat the GPU port as if a display is connected, even if it’s not.

Then regenerate the GRUB configuration:

sudo grub-mkconfig -o /boot/grub/grub.cfg

Reboot, and check the display settings in KDE. You should see a virtual display on HDMI-A-1.

Streaming

Start Sunshine in the terminal, and you should see the following logs:

[2025-07-11 18:31:17.267]: Info: Found display [wayland-0]
[2025-07-11 18:31:17.267]: Info: Found interface: zxdg_output_manager_v1(32) version 3
[2025-07-11 18:31:17.267]: Info: Found interface: zwp_linux_dmabuf_v1(57) version 5
[2025-07-11 18:31:17.267]: Info: Found interface: wl_output(65) version 4
[2025-07-11 18:31:17.267]: Info: Found interface: wl_output(66) version 4
[2025-07-11 18:31:17.267]: Info: Resolution: 1920x1080
[2025-07-11 18:31:17.267]: Info: Resolution: 1920x1080
[2025-07-11 18:31:17.267]: Info: Offset: 1920x0
[2025-07-11 18:31:17.267]: Info: Logical size: 1920x1080
[2025-07-11 18:31:17.267]: Info: Name: eDP-1
[2025-07-11 18:31:17.267]: Info: Found monitor: BOE eDP-1-0x0936
[2025-07-11 18:31:17.267]: Info: Offset: 0x0
[2025-07-11 18:31:17.267]: Info: Logical size: 1920x1080
[2025-07-11 18:31:17.267]: Info: Name: HDMI-A-1
[2025-07-11 18:31:17.267]: Info: Found monitor: AOC HDMI-A-1-28E850
[2025-07-11 18:31:17.267]: Info: -------- Start of KMS monitor list --------
[2025-07-11 18:31:17.267]: Info: Monitor 0 is eDP-1: BOE eDP-1-0x0936
[2025-07-11 18:31:17.267]: Info: Monitor 1 is HDMI-A-1: AOC HDMI-A-1-28E850
[2025-07-11 18:31:17.267]: Info: --------- End of KMS monitor list ---------

[2025-07-11 18:31:17.267]: Info: Monitor 1 is HDMI-A-1: AOC HDMI-A-1-28E850 tells us that Sunshine has detected the virtual display HDMI-A-1, with display number 1. Then open the Sunshine web UI, go to Configuration->Audio/Video->Display number, set it to 1, save the configuration and wait for Sunshine to restart automatically, and streaming should work properly.