gow icon indicating copy to clipboard operation
gow copied to clipboard

AMD GPU not detected when Nvidia GPU is also installed

Open arminmarth opened this issue 2 years ago • 2 comments

When trying to run GoW headless on a PC with both an Nvidia GPU and AMD GPU installed, the Nvidia GPU is detected but not the AMD GPU.

When running running: ./run-gow --headless --gpu nvidia --app retroarch up -d GoW works, and I can connect to RetroArch over Moonlight on my Nvidia GPU.

but when I try to run it without "--gpu nvidia" to try and run GoW on my AMD GPU, I get the followin error on the gow-xorg-1 log:

[2022-12-21 16:10:03] Adding user 'retro' to groups: gow-gid-71,root
[2022-12-21 16:10:04] Launching the container's startup script
[2022-12-21 16:10:04] Detected Nvidia drivers, installing them...
Looking for driver version 525.60.13
Downloading https://us.download.nvidia.com/XFree86/Linux-x86_64/525.60.13/NVIDIA-Linux-x86_64-525.60.13.run
ERROR: Unable to download /tmp/nvidia-525.60.13.run
Couldn't download nvidia driver version 525.60.13

So I think it's still trying to use my Nvidia GPU instead of my AMD GPU, even without the "--gpu nvidia" command

So my question is: is there any way to force GoW not to detect the Nvidia GPU so I can use my AMD GPU instead?

Environment:

Unraid version: 6.11.5

Nvidia GPU info: 
[10de:1c82] 01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)
driver version: 525.60.13

AMD GPU info:
[1002:73ff] 04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 23 [Radeon RX 6600/6600 XT/6600M] (rev c1)

arminmarth avatar Dec 21 '22 18:12 arminmarth

With the help of Forty2 on discord I was able to isolate the AMD GPU to get it running by following the following steps:

  1. create a file in the directory you've cloned gow into called ensure-nvidia-dummy.sh and make it executable with chmod 755 ensure-nvidia-dummy.sh. inside it put this:
#!/bin/bash
exit 0
  1. then edit compose/headless.yml , and in the xorg service, under volumes:, add this: - /path/to/ensure-nvidia-dummy.sh:/opt/gow/ensure-nvidia-xorg-driver.sh
  2. create a file called xorg-amd-primary.conf
Section "OutputClass"
    Identifier "amd"
    MatchDriver "amdgpu"
    Driver "amdgpu"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "yes"
EndSection
  1. and mount it in compose/headless.yml like this: - /path/to/xorg-amd-primary.conf:/usr/share/X11/xorg.conf.d/01-amd-primary.conf:ro

arminmarth avatar Dec 21 '22 18:12 arminmarth

There's two parts to this, I think. One is, we definitely shouldn't be trying to download nvidia drivers if we know we're supposed to be using an AMD GPU. Since the ensure-nvidia... script is run when the container is launched, that will require a little coordination, but it shouldn't be too hard.

The other part is, what if someone has multiple GPUs and Xorg wants to use the wrong one by default? There's a way to override it in config using the PrimaryGPU option, but it's not obvious what the best way to tie that into --gpu nvidia (or whatever) would be. This part may take longer to fix, just because we have to decide what a fix looks like :smile:

zb140 avatar Jan 04 '23 21:01 zb140

Multi-GPU setup should work in Wolf, see: https://games-on-whales.github.io/wolf/stable/user/configuration.html#_multiple_gpu

ABeltramo avatar Jun 14 '24 19:06 ABeltramo