Not detecting monitor CRTC
Is there an existing issue for this?
- [X] I have searched the existing issues
Is your issue described in the documentation?
- [X] I have read the documentation
Is your issue present in the nightly release?
- [X] This issue is present in the nightly release
Describe the Bug
I have a 3 monitor setup on a Linux X11 machine, and when I try to stream, it says it can't get the requested display info (in the console), and defaults to the whole X11 display.
I've tried a lot of different troubleshooting, but the problem definitely lies in the condition if (result->crtc) which for some reason ends up false for all monitors, even though the monitors definitely do have crtc (as in, they all have a size and offset).
I had a look around at how some other codebases do it, and for example Firefox uses the function XRRGetMonitors to get monitor info, rather than any of the crtc stuff. I tried modifying the code to use XRRGetMonitors, however it kept segfaulting for no obvious reason when I tried referencing those functions, and after a bunch of debugging I just gave up. Instead, I hardcoded monitor numbers to their correct offsets for my local setup.
Anyway, I'm running Arch Linux. However, I didn't have this issue back when I ran Manjaro. Let me know if there's any other diagnostics I could provide.
Expected Behavior
No response
Additional Context
No response
Host Operating System
Linux
Operating System Version
Arch Linux x86_64 kernel 6.5.5-arch1-1
Architecture
64 bit
Sunshine commit or version
0.20.0
Package
Linux - AUR (Third Party)
GPU Type
Nvidia
GPU Model
RTX 3090
GPU Driver/Mesa Version
535.113.01
Capture Method (Linux Only)
X11
Config
output_name = 1
Apps
No response
Relevant log output
Info: Screencasting with X11
Info: Configuring selected monitor (1) to stream
Warning: Couldn't get requested display info, defaulting to recording entire virtual desktop
Same issue here on RTX 3080 with nvidia-drivers 525.125.06-2 on debian.
[2023:11:13:19:56:25]: Info: Detecting monitors
[2023:11:13:19:56:26]: Info: Detected monitor 0: DP-0, connected: false
[2023:11:13:19:56:26]: Info: Detected monitor 1: DP-1, connected: false
[2023:11:13:19:56:26]: Info: Detected monitor 2: HDMI-0, connected: true
[2023:11:13:19:56:26]: Info: Detected monitor 3: DP-2, connected: true
[2023:11:13:19:56:26]: Info: Detected monitor 4: DP-3, connected: false
[2023:11:13:19:56:26]: Info: Detected monitor 5: HDMI-1, connected: false
[2023:11:13:19:56:26]: Info: Detected monitor 6: DP-4, connected: true
[2023:11:13:19:56:26]: Info: Detected monitor 7: DP-5, connected: false
[2023:11:13:19:56:26]: Info: Screencasting with X11
[2023:11:13:19:56:26]: Info: Configuring selected monitor (2) to stream
[2023:11:13:19:56:26]: Warning: Couldn't get requested display info, defaulting to recording entire virtual desktop
Hi, I was having the same issue on Fedora using version 0.21.0.
When I set the monitor as 0 in the web ui, Warning: Couldn't get requested display info, defaulting to recording entire virtual desktop goes away. It does not make sense because monitor 0 appears as disconnected too in my logs.
Maybe this helps someone. (I think it's related to this https://github.com/LizardByte/Sunshine/issues/221)
It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!
Currently I have a custom .patch for hardcoding my monitor positions inside the code, which I apply to sunshine when including it in my nixos config. However, it seems like others have the same problem, so it would be nice to fix this.
however it kept segfaulting for no obvious reason when I tried referencing those functions
@arduano do you have those changes saved somewhere? I'll be making changes on an unrelated issue, in another platform even, but I may touch things that can impact here too, so if my changes avoid your segfault I, maybe, may be able to help out.
Nah, but they were pretty simple iirc, there's a list of xrr functions imported at the top and I tried adding the XRRGetMonitors in a way that seemed to match the way other functions were imported. But no matter how I tried doing it, it segfaulted. Some sort of linker issue I assume
It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!
Yep I still get it, and I still rely on my manual git patch to fix it (and compile it myself), tried it without the git patch and it gave all the same issues.
I've noticed there's also DRM based capture, but that errors too so I turned it off in compiler flags