Steam-Headless / docker-steam-headless

A Headless Steam Docker image supporting NVIDIA GPU and accessible via Web UI
GNU General Public License v2.0
737 stars 80 forks source link

Playing games on a connected monitor to the GPU via HDMI/DisplayPort #28

Open premwhineray opened 1 year ago

premwhineray commented 1 year ago

Is your feature request related to a problem?

Hi, love the project, trying to figure out the nuances. I have done extensive research and have not found a way to have one of my GPU's display ports (HDMI/DisplayPort) output games to my connected monitor.

I don't even know if this is possible, but would love to know, as having the ability to stream over the network as well as play directly connected at 144hz would be a dream.

Running unraid 6.11.1

Any help or guidance would be appreciated, and if this is not a feature currently, would love it to be a feature :)

Cheers

What is your feature request?

have one of my GPU's display ports (HDMI/DisplayPort) output games to my connected monitor.

Are there any workarounds?

None that I am aware of.

Additional Context

No response

Bureaucromancer commented 1 year ago

Not sure about the nuances of this, but I'm definitely interested in this as well.

It might hoenstly be out of scope for this project, but getting a local use desktop environment containerized actually seems like a very nice use case.

premwhineray commented 1 year ago

Yeah my thoughts exactly. So my use-case scenario is, a containerised steam that is playable from moonlight/steam, but also from a connected monitor. I have an unraid server under my desk which does lots for me, has two GPU's, ample storage etc. I tried to get the VM option running, but couldn't wrap my head around it, and it renders an entire GPU unusable for any other workload (think AI inference). Found this solution and I was like, this is what I have been looking for, just lack the knowledge for even determining if it's even possible. Like can a GPU display port be output from something running inside docker? One would think so? Just opens up a world of possibility.

Bureaucromancer commented 1 year ago

and it renders an entire GPU unusable for any other workload (think AI inference)

this is the big one for me; I entirely get the benefits of a full VM for this, but in a trusted environment I'm looking at it as a fairly clean (if it works) path to making the one GOOD GPU I've got available to the server as well as end user applications.

Josh5 commented 1 year ago

Yes, this is possible. It should work out of the box with a Nvidia GPU. Mouse and keyboard are also supported.

premwhineray commented 1 year ago

Thanks for confirming @Josh5 :)

So that leaves the question... what did I do wrong.

I am running two GPU's in my system: RTX 2080 Super Quadro M6000

I bound my 2080 Super via the environment variable by providing the GUID (other GPU still showing up). Screenshot 2023-03-06 113821

Then inside Steam-Headless via VNC, I went to the nvidia X Server Settings (only NVIDIA configuration option I found) The Quadro which has 4x Displayport and one DVI, only shows the DVI, surprisingly it does output to that DVI. I wasnt trying to output this GPU last time, decided to test.

It seems my problem is with the other GPU, it wont allow me to enable it to output on the other GPU with monitor: screenshots Screenshot 2023-03-06 113909 Screenshot 2023-03-06 113939 Screenshot 2023-03-06 114006 Screenshot 2023-03-06 114018

I even tried running nvidia x settings via sudo, apparently it saved, yet on container restart, it forgot.

Docker wizards, any ideas what to do here?

Also @Josh5 , why would it be bringing in both GPU's? Thought it was only meant to make the one I specified come through?

Trozmagon commented 9 months ago

@premwhineray did you ever get this to work mate? I trying to do the exact same thing but Nvidia control panel seems to only detect the one attached display which I'm assuming is the virtual display for VNC.

premwhineray commented 9 months ago

@Trozmagon I never did have luck getting it to work, ended up just building another PC dedicated for gaming. The appeal is still there if it means I can use unraid for a secondary gaming PC, just never found others having the same issues.

When docker/linux is used in the non-happy path, the amount of roadblocks becomes quite overwhelming.

Trozmagon commented 9 months ago

@Trozmagon I never did have luck getting it to work, ended up just building another PC dedicated for gaming. The appeal is still there if it means I can use unraid for a secondary gaming PC, just never found others having the same issues.

When docker/linux is used in the non-happy path, the amount of roadblocks becomes quite overwhelming.

Thanks for the response mate, I'll take a look at this over the weekend and update you if I find anything.

Trozmagon commented 9 months ago

@Trozmagon I never did have luck getting it to work, ended up just building another PC dedicated for gaming. The appeal is still there if it means I can use unraid for a secondary gaming PC, just never found others having the same issues.

When docker/linux is used in the non-happy path, the amount of roadblocks becomes quite overwhelming.

I got it to work, it wasn't the virtual display like I thought, it was listed as HDMI-0 but I had my monitor plugged into a display port on my gpu, I moved the cable to the first hdmi port and it started working.

tornadox commented 9 months ago

I've checked it works on intel igpu with n5105, but I don't get any sound. Also in sunshine the input doesn't work.

tornadox commented 3 months ago

Anyone figured out how to get sound on host HDMI? Even adding sound drivers on unraid didn't fix it.

Freddy-0 commented 2 weeks ago

Regarding the Sound, @tornadox I am working on a documentation right now i got it working a few months ago. Are you willing to test this further?

If so. Let's continue this in #143