Open gprotta opened 8 months ago
Same here, albeit on X11. Ubuntu 23.10, Kernel 6.8.4, Nvidia Driver 550.67
Tested with the Flatpak and AppImage release: 0.23
A client (Moonlight on Linux and Windows) keeps the connection but only shows a black screen while the logs feature repeated Error: GL: /build/sunshine/src/platform/linux/graphics.cpp:570
.
Was having the same issue, in X11.
ArchLinux 6.6.25-1-lts, Nvidia Driver 550.67
I found a workaround where changing Force a Specific Capture Method
in Advanced
tab in Configuration from the default value of Autodetect (recommended)
to X11
made it work. But this caused the video to be laggy.
What finally worked was installing nvlax patch. The AUR archlinux packet is this, but I don't know what would be the equivalents in Ubuntu and Fedora.
Can confirm that manually setting "X11" instead of the autodetect does make it work. Have to test more on the impact of that but thanks for the tip. Much appreciated.
Currently, either leaving Force a Specific Capture Method (in the Advanced tab) at "Autodetect" or manually setting it to "KMS" causes the black screen issue. KMS would be preferred over the slower/laggy X11 method from what I understand. But, for the Nvidia folks, there's of course another method in reach, once the driver was patched:
Patcher for Nvidia drivers (to get NvFBC working, which should be best in terms of speed and quality for Nvidia users): https://github.com/keylase/nvidia-patch
Update: After having used the above patcher, manually selecting "NvFBC" is possible and working as it should.
Note for Flatpak users: One has to patch the driver AND the flatpak version of the driver. Check the description of the above patcher to see how you can easily patch both instances. You simply execute a script and that one takes care of the rest, including backups. Note: This step has to be repeated after every new driver install/update.
I'm running Wayland. I did the "NvFBC" patch and it didn't work.
1) Did Sunshine work before for you, with Wayland and your Nvidia card, and only caused problems with the 0.23 version?
2) Are you able to got back to X11 for testing and check if the problem is resolved then?
Both questions aim at finding out if a Sunshine version change lead to the issue or if we are looking at generic Wayland-specific problems in conjunction with Nvidia cards.
When on X11: So far, it seems like the "Autodetect" feature causes the actual problem which can be worked around with manually setting it to the desired/working method. "X11" being the safe but also slow and heavy one.
One can expand the available methods by patching the Nvidia driver, which should lead to better performance and less system load once NvFBC is working. "KMS" should be somewhere in between, if one gets it working.
@CPioGH2002 1 - I started using it on version 0.22 and 0.23, and both don't work with wayland, same problem. 2 - Yes, X11 working with manually setting.
Are all of you using hybrid graphics systems with an iGPU and dGPU? I can't reproduce this with a regular single-GPU system with the display physically connected to the Nvidia GPU. Please describe the display topology of your systems (which GPUs are present, which displays are physically connected to which GPUs including internal displays on laptops).
For @gprotta's posted config, I think your issue is this in your config: adapter_name = /dev/dri/card1
. You're explicitly forcing Sunshine to encode on the Nvidia GPU even if it can't import the frame buffer from the Intel GPU (which is often the case due to vendor-specific DRM tiling modifiers).
I'm running Wayland. I did the "NvFBC" patch and it didn't work.
This is expected because Nvidia hasn't added Wayland support to NvFBC. The KMS capture backend is optimal for Nvidia Wayland scenarios.
In my case, using ArchLinux 6.6.25-1-lts and Nvidia Driver 550.67 I am only using one discrete Nvidia GPU on a desktop (not laptop) without any iGPU on the processor. Display is physically connected to the GPU
Very good point regarding the architecture (hybrid vs. single GPU). I myself only run a single GPU on a desktop system with the monitor being attached to it. My iGPU is disabled, so the Nvidia card is the only one being available and active. Still using X11.
As described, once I get rid of the "autodetect" feature and set the capture method manually, everything is working fine.
@CPioGH2002 1 - I started using it on version 0.22 and 0.23, and both don't work with wayland, same problem. 2 - Yes, X11 working with manually setting.
So, seems like the dreaded Nvidia Wayland support/implementation plays a huge role for the problems described. Perhaps try cgutman's recommendation from above and check if the KMS capture method works on Wayland with your config.
A few other questions to try and narrow down the issue:
modeset=1
or NVreg_EnableGpuFirmware
?I tested it just with the laptop screen and it works (iGPU). When I use the HDMI output, only the mouse cursor works, but the screen stays black.
@cgutman Are you using the Nvidia proprietary kernel module or the Nvidia open kernel module? proprietary _Are you passing any nvidia-drm kernel module parameters like modeset=1 or NVregEnableGpuFirmware? none _Can you try to build and run drm_info on your affected system and attach the output here?_ I don't know how to use
Video Card: NVIDIA GeForce RTX 3080 OS: Arch Linux (latest)
paru -Sy
:
extra/nvidia 550.90.07-4
aur/nvidia-patch 550.90.07-1
In Sunshine:
Advanced / Force a Specific Capture Method: Autodetect
Advanced / Force a Specific Encoder: Autodetect
Works as expected:
[2024:06:26:12:39:45]: Info: Found H.264 encoder: h264_nvenc [nvenc]
[2024:06:26:12:39:45]: Info: Found HEVC encoder: hevc_nvenc [nvenc]
[2024:06:26:12:39:45]: Info: Executing [Desktop]
[2024:06:26:12:39:45]: Info: CLIENT CONNECTED
[2024:06:26:12:39:45]: Info: Found [1] outputs
[2024:06:26:12:39:45]: Info: Virtual Desktop: 3840x2160
[2024:06:26:12:39:45]: Info: XrandR: available
[2024:06:26:12:39:45]: Info: -- Output --
[2024:06:26:12:39:45]: Info: Resolution: 3840x2160
[2024:06:26:12:39:45]: Info: Offset: 0x0
[2024:06:26:12:39:45]: Error: Couldn't destroy session handle: Unable to cleanup NvFBC
[2024:06:26:12:39:45]: Info: Screencasting with NvFBC
please fix, @Bubbasm workaround works for now
I'm having this issue on Fedora 41 Workstation, literally the only distro with this behavior, I'm using a NVIDIA GTX 1660 Ti.
Went ahead and tested 4 different distros:
All of them on the exact same scenario:
sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') flatpak run dev.lizardbyte.app.Sunshine
Not a single issue on other distros other than Fedora, and unfortunatelly I couldn't test the Xorg session on it since the Fedora team decided to literally nuke the Xorg packages from being installed on F41, so I'm stuck on Wayland, though at the same time, it works fine under Wayland on all the other distros, so I don't think this test will help either.
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
Just run some application and the streaming gets a black screen.
Expected Behavior
The stream should work with video
Additional Context
No response
Host Operating System
Linux
Operating System Version
Fedora 39 - Gnome 45.5 Wayland - Linux 6.7.9-200.fc39.x86_64
Architecture
64 bit
Sunshine commit or version
0.23.0
Package
Linux - rpm
GPU Type
Nvidia
GPU Model
NVIDIA GeForce GTX 1660 Ti with Max-Q Design
GPU Driver/Mesa Version
550.67
Capture Method (Linux Only)
KMS
Config
Apps
No response
Relevant log output