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

Black screen with multiple GPUs with virtual display, isolated to simply multiple GPUs #2875

Closed
2 tasks done
Apprisco opened this issue Jul 17, 2024 · 3 comments · Fixed by #3002
Closed
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@Apprisco
Copy link

Apprisco commented Jul 17, 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

I have 2 tesla T4 virtualized in a Windows VM with Proxmox VE (latest).
When I only passthrough 1 GPU, Sunshine does not complain. I'm using the Virtual Display Driver for this, and it works great.

However, when I passthrough both gpus on the SeaBIOS VM, Sunshine returns a black screen then disconnects me for "no video from host". Inputs and Audio are working as intended.

There is no network to consider here as it's localhost.
The only thing differentiating the working setup from the non-working setup is the SeaBIOS (legacy, which should have 0 effect)
and the fact that I have 2 Tesla T4s in this case, not 1.

I have tried restricting Sunshine to either gPU to no avail.
I've tried telling Sunshine to only use NVENC.
I've tried changing the autodetect capture APIs from duplication to the beta to no avail.
I have tried HEVC vs H264 to no avail.
I have tried every configuration option that could affect this to no avail.

I know that my virtualized setup and gpus with no display out will definitely raise some eyebrows, but again, the setup works with a single GPU with no complaints. However I must pass through both gpus to the windows VM, and there's no reason for this not to work as such.

Most importantly, other remote options such as Parsec, Anydesk, Teamviewer all have no complaints. It is only Sunshine that is causing this issue, but I much prefer sunshine over all alternatives.

https://pastebin.com/RVy5qApc Debug logs

Expected Behavior

With multiple GPUs, sunshine should choose one and not display a black screen or "no video received from host" and exit.

Additional Context

No response

Host Operating System

Windows

Operating System Version

11 Pro (latest)

Architecture

64 bit

Sunshine commit or version

v2024.715.152002

Package

Windows - installer

GPU Type

Nvidia

GPU Model

Tesla T4

GPU Driver/Mesa Version

552.74

Capture Method

Desktop Duplication API (Windows)

Config

encoder = nvenc
sunshine_name = MSKontakt
port = 49000
resolutions = [
    3440x1440
]
fps = [120]
min_threads = 6
av1_mode = 1

Apps

N/A

Relevant log output

https://pastebin.com/RVy5qApc
@Apprisco
Copy link
Author

Apprisco commented Jul 17, 2024

Issue seems to originate from having two IDENTICAL gpus, down to the vendor ID. So there is no way to really tell Sunshine to use the correct gpu for the virtual display driver.

Disabling one of the GPUs allows Sunshine to work without any issues. BIOS is clearly not an issue, it is simply that Sunshine gets confused on which GPU to grab if they have identical names and vendor ids due to being identical GPUs... should be using LUIDs instead.

@Nonary Nonary self-assigned this Aug 9, 2024
@Nonary Nonary added the bug Something isn't working label Aug 9, 2024
@Nonary
Copy link
Collaborator

Nonary commented Aug 9, 2024

I have found the root cause and looking into seeing if I can fix it, but not entirely familiar with DXGI so it may take awhile.

It's caused by probe_for_gpu_preference in src/platform/windows/display_base.cpp

The intent of that function was to allow hybrid GPU setups, which by design it is supposed to ignore virtual outputs, but it unintentionally causes breaking behavior with IDDSampleDriver.

A quick fix? Tell the method to always return false... otherwise, hope to find a real solution soon after research

@Nonary
Copy link
Collaborator

Nonary commented Aug 10, 2024

I've identified the bug and fixed it, I'm just polishing the code and will submit a PR later today for review and resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants