Prechádzať zdrojové kódy

Fix: GPUs on nonzero PCI domain (#51)

* Fix: GPUs on nonzero PCI domain

Fixes https://github.com/selkies-project/docker-nvidia-glx-desktop/issues/50

---------

Co-authored-by: Seungmin Kim <8457324+ehfd@users.noreply.github.com>
Justin Bowes 1 rok pred
rodič
commit
d49df24d44
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      entrypoint.sh

+ 2 - 2
entrypoint.sh

@@ -91,11 +91,11 @@ else
   export CONNECTED_MONITOR="--connected-monitor=${VIDEO_PORT}"
 fi
 
-# Bus ID from nvidia-smi is in hexadecimal format, should be converted to decimal format which Xorg understands, required because nvidia-xconfig doesn't work as intended in a container
+# Bus ID from nvidia-smi is in hexadecimal format and should be converted to decimal format (including the domain) which Xorg understands, required because nvidia-xconfig doesn't work as intended in a container
 HEX_ID="$(sudo nvidia-smi --query-gpu=pci.bus_id --id="$GPU_SELECT" --format=csv | sed -n 2p)"
 IFS=":." ARR_ID=($HEX_ID)
 unset IFS
-BUS_ID="PCI:$((16#${ARR_ID[1]})):$((16#${ARR_ID[2]})):$((16#${ARR_ID[3]}))"
+BUS_ID="PCI:$((16#${ARR_ID[1]}))@$((16#${ARR_ID[0]})):$((16#${ARR_ID[2]})):$((16#${ARR_ID[3]}))"
 # A custom modeline should be generated because there is no monitor to fetch this information normally
 export MODELINE="$(cvt -r "${SIZEW}" "${SIZEH}" "${REFRESH}" | sed -n 2p)"
 # Generate /etc/X11/xorg.conf with nvidia-xconfig