-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot stream headless/virtual monitors created by evdi on X11 #943
Comments
I second this as an issue. I created a virtual monitor with xrandr as follows:
Sunshine server gives me the same error during initialization, then exits.
EDIT: To add more detail. I am using libx264, and the host system is ARM based (Acer Spin 513 running Cadmium OS). The distro is Ubuntu 22.04 with Linux kernel 6.0. The Linux kernel and Sunshine were both compiled by me. |
I was unable to reproduce the issue using evdi because the kernel module fails to load on my kernel. But I tested with a display actually plugged in, and can now confirm that Sunshine will stream the secondary monitor with CRTC, which means I need something like a dummy plug to get it to work. Interestingly enough, the xrandr method didn't ever extend my desktop in KDE Plasma, so I think this method is just outdated. Unplugging the display naturally bugs out the video stream and crashes Sunshine, which makes sense. However, attempting to force that disconnected display port to be active using xrandr does not allow it to be streamed via Sunshine (because of the lack of CRTC). I think this issue can stay focused on evdi as the xrandr method is fundamentally broken. |
@chaserhkj Pull requests are encouraged for issues like this one. Since you've stated you have a proof of concept that fixes this issue, can you submit the pull request and reference this issue? |
This issue is stale because it has been open for 90 days with no activity. Comment or remove the stale label, otherwise this will be closed in 10 days. |
This issue was closed because it has been stalled for 10 days with no activity. |
Is there an existing issue for this?
Is your issue described in the documentation?
Is your issue present in the nightly release?
Describe the Bug
On my setup, I have created a headless/virtual monitor using the evdi driver solely for steaming purposes. (As suggested in this post)
After config the virtual monitor
DVI-I-1-1
, I got:I can capture the virtual monitor using any other capturing mechanism. But in sunshine after setting
output_name = 3
I got:(Full log attached at the end)
Expected Behavior
Sunshine starts normally and opening app
Desktop
in a client would show the desktop from the virtual monitor.Additional Context
The core cause of this bug here is that such a virtual monitor in X11 is shown as
disconnected
but still mapped to part of the screen (i.e. has associatedcrtc
).In sunshine when we are enumerating the monitors through X11 here and here, we are checking if the monitors are connected, thus a mapped but disconnected virtual monitor will not be enumerated.
I would suggest change the test lines mentioned above from
out_info && out_info->connection == RR_Connected
toout_info && out_info->crtc
, checking if the monitor is mapped rather than check the connection status.I have personally tried the suggested change and it would work on my setup. However I do feel such change will have implications on other X11grab housekeeping code in the context thus feel refrained from doing a PR directly. Please let me know if you guys feel this discussion makes more sense in a form of PR.
Host Operating System
Linux
Operating System Version
Arch Linux rolling
Architecture
64 bit
Sunshine commit or version
0.18.2
Package
Linux - AUR
GPU Type
Nvidia
GPU Model
GeForce RTX 2070
GPU Driver/Mesa Version
525.89.02
Capture Method (Linux Only)
X11
Relevant log output
The text was updated successfully, but these errors were encountered: