Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

KMS + Headless + Nvidia: `Unknown Monitor connector type [Meta]`

Open peperunas opened this issue 1 year ago • 31 comments

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

Hello!

First of all, thank you for this outstanding project.

The only way I got my headless setup to work is with the X11 capture method, unfortunately. I have been trying to get my headless setup to work with KMS to no avail. I am now trying to get Wayland + KMS working - since it should be an option since 0.22 - and I just got this "new" error:

[2024:03:13:15:42:28]: Error: Unknown Monitor connector type [Meta]: Please report this to the GitHub issue tracker

I am creating a virtual monitor with:

gnome-shell --wayland --headless --virtual-monitor 1280x720 --no-x11 &

Without creating the virtual monitor, sunshine always fails with Error: Unable to initialize capture method.

Modeset is enabled (nvidia-drm.modeset=1).

Expected Behavior

No response

Additional Context

[min_log_level] -- [0]

Host Operating System

Linux

Operating System Version

NixOS 23.11

Architecture

64 bit

Sunshine commit or version

0.22.0

Package

Linux - nixpkgs (Third Party)

GPU Type

Nvidia

GPU Model

RTX 4090

GPU Driver/Mesa Version

535.129.03

Capture Method (Linux Only)

KMS

Config

[min_log_level] -- [0]

Apps

No response

Relevant log output

[sunshine@architect:~]$ WAYLAND_DISPLAY=wayland-0 sunshine
[min_log_level] -- [0]
[2024:03:13:15:42:28]: Info: Sunshine version: 0.22.0
[2024:03:13:15:42:28]: Info: System tray created
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Error: Failed to create session: Unable to open display
[2024:03:13:15:42:28]: Info: Found display [wayland-0]
[2024:03:13:15:42:28]: Debug: Available interface: wl_compositor(1) version 5
[2024:03:13:15:42:28]: Debug: Available interface: wl_eglstream_display(2) version 1
[2024:03:13:15:42:28]: Debug: Available interface: wl_drm(3) version 2
[2024:03:13:15:42:28]: Debug: Available interface: wl_shm(4) version 1
[2024:03:13:15:42:28]: Debug: Available interface: wl_output(5) version 4
[2024:03:13:15:42:28]: Info: Found interface: wl_output(5) version 4
[2024:03:13:15:42:28]: Debug: Available interface: zxdg_output_manager_v1(6) version 3
[2024:03:13:15:42:28]: Info: Found interface: zxdg_output_manager_v1(6) version 3
[2024:03:13:15:42:28]: Debug: Available interface: wl_data_device_manager(7) version 3
[2024:03:13:15:42:28]: Debug: Available interface: zwp_primary_selection_device_manager_v1(8) version 1
[2024:03:13:15:42:28]: Debug: Available interface: wl_subcompositor(9) version 1
[2024:03:13:15:42:28]: Debug: Available interface: xdg_wm_base(10) version 6
[2024:03:13:15:42:28]: Debug: Available interface: gtk_shell1(11) version 5
[2024:03:13:15:42:28]: Debug: Available interface: wp_viewporter(12) version 1
[2024:03:13:15:42:28]: Debug: Available interface: wp_fractional_scale_manager_v1(13) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zwp_pointer_gestures_v1(14) version 3
[2024:03:13:15:42:28]: Debug: Available interface: zwp_tablet_manager_v2(15) version 1
[2024:03:13:15:42:28]: Debug: Available interface: wl_seat(16) version 8
[2024:03:13:15:42:28]: Debug: Available interface: zwp_relative_pointer_manager_v1(17) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zwp_pointer_constraints_v1(18) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zxdg_exporter_v2(19) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zxdg_importer_v2(20) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zxdg_exporter_v1(21) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zxdg_importer_v1(22) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zwp_linux_dmabuf_v1(23) version 4
[2024:03:13:15:42:28]: Debug: Available interface: wp_single_pixel_buffer_manager_v1(24) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zwp_keyboard_shortcuts_inhibit_manager_v1(25) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zwp_text_input_manager_v3(26) version 1
[2024:03:13:15:42:28]: Debug: Available interface: wp_presentation(27) version 1
[2024:03:13:15:42:28]: Debug: Available interface: xdg_activation_v1(28) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zwp_idle_inhibit_manager_v1(29) version 1
[2024:03:13:15:42:28]: Warning: Missing Wayland wire for wlr-export-dmabuf
[2024:03:13:15:42:28]: Debug: Opening render node: /dev/dri/renderD128
[2024:03:13:15:42:28]: Info: Found display [wayland-0]
[2024:03:13:15:42:28]: Info: Found display [wayland-0]
[2024:03:13:15:42:28]: Debug: Available interface: wl_compositor(1) version 5
[2024:03:13:15:42:28]: Debug: Available interface: wl_eglstream_display(2) version 1
[2024:03:13:15:42:28]: Debug: Available interface: wl_drm(3) version 2
[2024:03:13:15:42:28]: Debug: Available interface: wl_shm(4) version 1
[2024:03:13:15:42:28]: Debug: Available interface: wl_output(5) version 4
[2024:03:13:15:42:28]: Info: Found interface: wl_output(5) version 4
[2024:03:13:15:42:28]: Debug: Available interface: zxdg_output_manager_v1(6) version 3
[2024:03:13:15:42:28]: Info: Found interface: zxdg_output_manager_v1(6) version 3
[2024:03:13:15:42:28]: Debug: Available interface: wl_data_device_manager(7) version 3
[2024:03:13:15:42:28]: Debug: Available interface: zwp_primary_selection_device_manager_v1(8) version 1
[2024:03:13:15:42:28]: Debug: Available interface: wl_subcompositor(9) version 1
[2024:03:13:15:42:28]: Debug: Available interface: xdg_wm_base(10) version 6
[2024:03:13:15:42:28]: Debug: Available interface: gtk_shell1(11) version 5
[2024:03:13:15:42:28]: Debug: Available interface: wp_viewporter(12) version 1
[2024:03:13:15:42:28]: Debug: Available interface: wp_fractional_scale_manager_v1(13) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zwp_pointer_gestures_v1(14) version 3
[2024:03:13:15:42:28]: Debug: Available interface: zwp_tablet_manager_v2(15) version 1
[2024:03:13:15:42:28]: Debug: Available interface: wl_seat(16) version 8
[2024:03:13:15:42:28]: Debug: Available interface: zwp_relative_pointer_manager_v1(17) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zwp_pointer_constraints_v1(18) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zxdg_exporter_v2(19) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zxdg_importer_v2(20) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zxdg_exporter_v1(21) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zxdg_importer_v1(22) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zwp_linux_dmabuf_v1(23) version 4
[2024:03:13:15:42:28]: Debug: Available interface: wp_single_pixel_buffer_manager_v1(24) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zwp_keyboard_shortcuts_inhibit_manager_v1(25) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zwp_text_input_manager_v3(26) version 1
[2024:03:13:15:42:28]: Debug: Available interface: wp_presentation(27) version 1
[2024:03:13:15:42:28]: Debug: Available interface: xdg_activation_v1(28) version 1
[2024:03:13:15:42:28]: Debug: Available interface: zwp_idle_inhibit_manager_v1(29) version 1
[2024:03:13:15:42:28]: Info: Resolution: 1280x720
[2024:03:13:15:42:28]: Info: Offset: 0x0
[2024:03:13:15:42:28]: Info: Logical size: 1280x720
[2024:03:13:15:42:28]: Info: Name: Meta-0
[2024:03:13:15:42:28]: Info: Found monitor: MetaVendor
[2024:03:13:15:42:28]: Info: -------- Start of KMS monitor list --------
[2024:03:13:15:42:28]: Error: Unknown Monitor connector type [Meta]: Please report this to the GitHub issue tracker
[2024:03:13:15:42:28]: Verbose: Reduced to name: Meta-0: 1
[2024:03:13:15:42:28]: Info: --------- End of KMS monitor list ---------
[2024:03:13:15:42:28]: Debug: Monitor description
[2024:03:13:15:42:28]: Debug: Resolution: 0x0
[2024:03:13:15:42:28]: Debug: Offset: 0x0
[2024:03:13:15:42:28]: Debug: Desktop resolution: 0x0
[2024:03:13:15:42:28]: Error: Unable to initialize capture method
[2024:03:13:15:42:28]: Error: Platform failed to initialize
[2024:03:13:15:42:28]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:03:13:15:42:28]: Info: Trying encoder [nvenc]

(sunshine:7678): Gtk-CRITICAL **: 15:42:28.529: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
[2024:03:13:15:42:28]: Debug: System tray loop
[2024:03:13:15:42:28]: Info: Encoder [nvenc] failed
[2024:03:13:15:42:28]: Info: Trying encoder [vaapi]
[2024:03:13:15:42:29]: Info: Encoder [vaapi] failed
[2024:03:13:15:42:29]: Info: Trying encoder [software]
[2024:03:13:15:42:29]: Info: Encoder [software] failed
[2024:03:13:15:42:29]: Fatal: Unable to find display or encoder during startup.
[2024:03:13:15:42:29]: Fatal: Please check that a display is connected and powered on.
[2024:03:13:15:42:29]: Error: Video failed to find working encoder

peperunas avatar Mar 13 '24 15:03 peperunas

I also experience this on Hyprland. Creating the headless monitor with hyprctl output create headless and I have the log Unknown Monitor connector type [HEADLESS]: Please report this to the GitHub issue tracker in my KMS Monitor list.

fxzzi avatar Mar 17 '24 14:03 fxzzi

I get the same error on Hyprland - Funny as my 1. setup worked with nvidia and hyprland, some updates happened (dont know which one exactly it was) and now it seems to be borked

itouchdennis avatar Jun 04 '24 10:06 itouchdennis

Installed hyprland and repleaced hyprland-git, headless streaming via sunshine works for me now again.

itouchdennis avatar Jun 04 '24 12:06 itouchdennis

I just want to note that the breaking change seems to originate from https://github.com/hyprwm/Hyprland/commit/4f26ae70fde3b4cd5ad8ef096a7f0cb6c2dc5528

The developers of Hyprland are not interested in fixing this issue as it is their opinion that a different function should be in use as wlr_dmabuf has been apparently superseded.

https://github.com/hyprwm/Hyprland/issues/6623

Will this be able to be resolved within the Sunshine codebase?

martydingo avatar Jun 26 '24 16:06 martydingo

Anyone is free to make a PR.

If you want stability though you should probably use x11. The Wayland protocol they superceded was unstable and the replacement one is also unstable.

ReenigneArcher avatar Jun 26 '24 16:06 ReenigneArcher

I've had linked the wrong issue, and I've corrected it now. Apologies.

So there's no intention to shift to wlr_screencopy_v1?

martydingo avatar Jun 27 '24 12:06 martydingo

I am also in the boat of making heavy use of hyprland's easy to create headless monitor feature, streaming it using Sunshine, so I would also interested in seeing this being updated to using wlr_screencopy_v1 over wlr_export_dmabuf, although I currently lack the proper knowledge to contribute to that change myself Thank you!

In the meantime, for those using nix, rolling back to the previous version gets it back to a working state. You can use Lazamar's tool for getting a previous revision, if you don't use flakes, but you can also just look up the history of commits to the hyprland nix package and just get one that works, as Lazamar's only updates every now and again.

Johny-LPM avatar Jul 03 '24 12:07 Johny-LPM

Same issue here, running headless on NixOS with NVIDIA GPU. Cloudy Pad relies entirely on the ability to use virtual monitor which is seemingly broken now.

If I understand correctly, this Sunshine logs is pointing to the real issue:

[2024:07:06:21:29:14]: Warning: Missing Wayland wire for wlr-export-dmabuf

Causing Sunshine to fallback to capture method non-compatible with virtual display. Is there a possible workaround ?

PierreBeucher avatar Jul 06 '24 21:07 PierreBeucher

Same problem with weaton wayland, chatgpt Said i should try to rebuild with wlr_screencopy, i ll try These days and Tell u output

fr4iser90 avatar Jul 08 '24 04:07 fr4iser90

Did anyone get this back to working without downgrading hyprland version to the last commit where wlroots are available?

itouchdennis avatar Jul 26 '24 13:07 itouchdennis

I also experience this on Hyprland. Creating the headless monitor with hyprctl output create headless and I have the log Unknown Monitor connector type [HEADLESS]: Please report this to the GitHub issue tracker in my KMS Monitor list.

@Fxzzi Have you since found a workaround? This still hasn't been fixed, I've opened an issue.

Kofa1 avatar Aug 04 '24 17:08 Kofa1