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

Sunshine (git master) fails to detect display and encoder on nvidia + wayland #2838

Closed
2 tasks done
rubin55 opened this issue Jul 12, 2024 · 10 comments
Closed
2 tasks done
Labels

Comments

@rubin55
Copy link

rubin55 commented Jul 12, 2024

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 latest beta/pre-release?

This issue is present in the latest pre-release

Describe the Bug

My hardware: NVIDIA 4090, Viewsonic VX1655-4K-OLED, Dell UP3218k
My software: Linux 6.9.9, Gnome + Wayland, NVIDIA drivers 555.28.02

Sunshine compiled from master git branch. Verified working on Xorg on the same hardware + software.

When I go to the UI, to Configuration, I see the following detected display information (I noticed that the logs do not show detected display information which I found curious):

Info: Detecting displays
              Info: Detected display: DVI-D-0 (id: 0) connected: false
              Info: Detected display: HDMI-0 (id: 1) connected: true
              Info: Detected display: DP-0 (id: 2) connected: true
              Info: Detected display: DP-1 (id: 3) connected: false
              Info: Detected display: DVI-D-1 (id: 4) connected: false

DP-0 is (probably) the Dell UP3218k, HDMI-0 is the Viewsonic 4k. It doesn't seem to make a difference if I set these display id's in the config file, I keep getting the same message:

Unable to find display or encoder during startup.

Expected Behavior

I expect Sunshine to work using wayland on my setup, just as it does using Xorg.

Additional Context

I do have Sunshine working on a laptop with Wayland, but it's not a 4K monitor and it doesn't have multiple displays. Maybe that matters.

Host Operating System

Linux

Operating System Version

6.9.9

Architecture

64 bit

Sunshine commit or version

f3a164e

Package

other (self built)

GPU Type

Nvidia

GPU Model

4090

GPU Driver/Mesa Version

555.28.02

Capture Method

NvFBC (Linux)

Config

resolutions = [
    1280x720,
    1920x1080,
    1920x1200,
    2256x1504,
    2880x1920,
    3840x2160,
    7680x4320
]
fps = [30,60]
origin_web_ui_allowed = pc
output_name = 1
channels = 2
capture = nvfbc
encoder = nvenc
nv_preset = default
nvenc_preset = 7

Apps

No response

Relevant log output

[nv_preset] -- [default]
[encoder] -- [nvenc]
[capture] -- [nvfbc]
[channels] -- [2]
[output_name] -- [1]
[origin_web_ui_allowed] -- [pc]
[nvenc_preset] -- [7]
[fps] -- [[30,60]]
[resolutions] -- [[
    1280x720,
    1920x1080,
    1920x1200,
    2256x1504,
    2880x1920,
    3840x2160,
    7680x4320
]]
Warning: Unrecognized configurable option [nv_preset]
[2024:07:12:20:43:14]: Info: Sunshine version: 0.0.0
[2024:07:12:20:43:14]: Info: System tray created
[2024:07:12:20:43:14]: Error: Failed to create session:
[2024:07:12:20:43:14]: Error: Unable to initialize capture method
[2024:07:12:20:43:14]: Error: Platform failed to initialize
[2024:07:12:20:43:14]: Info: Trying encoder [nvenc]

(sunshine:40658): Gtk-CRITICAL **: 20:43:14.399: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
[2024:07:12:20:43:14]: Info: Encoder [nvenc] failed
[2024:07:12:20:43:14]: Error: Couldn't find any working encoder matching [nvenc]
[2024:07:12:20:43:14]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:07:12:20:43:14]: Info: Trying encoder [vaapi]
[2024:07:12:20:43:15]: Info: Encoder [vaapi] failed
[2024:07:12:20:43:15]: Info: Trying encoder [software]
[2024:07:12:20:43:15]: Info: Encoder [software] failed
[2024:07:12:20:43:15]: Fatal: Unable to find display or encoder during startup.
[2024:07:12:20:43:15]: Fatal: Please ensure your manually chosen GPU and monitor are connected and powered on.
[2024:07:12:20:43:15]: Error: Video failed to find working encoder
[2024:07:12:20:43:15]: Error: Failed to create client: Daemon not running
[2024:07:12:20:43:15]: Info: Configuration UI available at [https://localhost:47990]
@rubin55
Copy link
Author

rubin55 commented Jul 12, 2024

I just re-checked with latest commit on master (f3a164e), just to be sure, but same thing happens. Let me know if I can do something to maybe get more relevant log output.

@rubin55
Copy link
Author

rubin55 commented Jul 12, 2024

I noted that #1631 is similar error-wise, but @cgutman indicates that it's likely another issue and a new issue should be filed.

@ReenigneArcher
Copy link
Member

Please share cmake and build logs

@rubin55
Copy link
Author

rubin55 commented Jul 12, 2024

I collected the stdout/err in build-output.log, got .ninja.log from the Cmake build_dir.
build-output.log
ninja.log

Is this helpful?

@ReenigneArcher
Copy link
Member

Yes, although I don't see anything obvious that would cause the issue.

@gschintgen
Copy link
Contributor

When I go to the UI, to Configuration, I see the following detected display information (I noticed that the logs do not show detected display information which I found curious):

Info: Detecting displays
              Info: Detected display: DVI-D-0 (id: 0) connected: false
              Info: Detected display: HDMI-0 (id: 1) connected: true
              Info: Detected display: DP-0 (id: 2) connected: true
              Info: Detected display: DP-1 (id: 3) connected: false
              Info: Detected display: DVI-D-1 (id: 4) connected: false

This is an explanatory example output only. My system shows the exact same text in the WebUI. The wording in the UI is quite misleading. (I also mistook it for actually detected displays.)

@rubin55
Copy link
Author

rubin55 commented Jul 15, 2024

@ReenigneArcher is there a way I can get more logging? I tried min_log_level = debug but it didn't give me significantly more information about why Sunshine seems to be unable to initialize the encoders and/or displays. When I run in X11 mode, sunshine works as expected, fwiw.

@rubin55
Copy link
Author

rubin55 commented Jul 18, 2024

Update: I think it is due to NvFBC being X11 only. Once I removed nvfbc from my config, sunshine correctly picks up the display. Source: https://github.com/LizardByte/Sunshine/discussions/2060

@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!

@rubin55
Copy link
Author

rubin55 commented Oct 21, 2024

I think this issue can be closed because currently, NVIDIA has no support yet for FBC with Wayland. I did see it mentioned on a recent presentation of development work by NVIDIA, but I don't think it's generally available yet (might be wrong).

@rubin55 rubin55 closed this as completed Oct 21, 2024
@ReenigneArcher ReenigneArcher closed this as not planned Won't fix, can't repro, duplicate, stale Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants