Skip to content
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

Not detecting monitor CRTC #1749

Open
3 tasks done
arduano opened this issue Oct 15, 2023 · 9 comments
Open
3 tasks done

Not detecting monitor CRTC #1749

arduano opened this issue Oct 15, 2023 · 9 comments

Comments

@arduano
Copy link

arduano commented Oct 15, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

Is your issue present in the nightly release?

  • 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
@blastrock
Copy link

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

@ghost
Copy link

ghost commented Dec 29, 2023

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 #221)

@LizardByte-bot
Copy link
Member

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!

@arduano
Copy link
Author

arduano commented Mar 31, 2024

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.

@Hazer
Copy link
Member

Hazer commented May 12, 2024

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.

@arduano
Copy link
Author

arduano commented May 12, 2024

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

@LizardByte-bot
Copy link
Member

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!

@arduano
Copy link
Author

arduano commented Aug 10, 2024

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

@dobbsrx
Copy link

dobbsrx commented Sep 5, 2024

Just recently spun up an instance on EndeavorOS (Arch 6.10.8-arch1-1) and I am having the same issue. If I leave it as blank (0) then I get my top monitor, but if I place any other number I get full x11 showing.

[2024:09:05:17:56:20]: Info: Detecting monitors
[2024:09:05:17:56:20]: Info: Detected monitor 0: HDMI-0, connected: true
[2024:09:05:17:56:20]: Info: Detected monitor 1: DP-0, connected: true
[2024:09:05:17:56:20]: Info: Detected monitor 2: DP-1, connected: false
[2024:09:05:17:56:20]: Info: Detected monitor 3: DP-2, connected: false
[2024:09:05:17:56:20]: Info: Detected monitor 4: DP-3, connected: false
[2024:09:05:17:56:20]: Info: Detected monitor 5: DP-4, connected: true
[2024:09:05:17:56:20]: Info: Detected monitor 6: DP-5, connected: false
[2024:09:05:17:56:21]: Info: Screencasting with X11
[2024:09:05:17:56:21]: Info: Configuring selected monitor (2) to stream
[2024:09:05:17:56:21]: Warning: Couldn't get requested display info, defaulting to recording entire virtual desktop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants