|
@@ -91,11 +91,11 @@ else
|
|
|
export CONNECTED_MONITOR="--connected-monitor=${VIDEO_PORT}"
|
|
export CONNECTED_MONITOR="--connected-monitor=${VIDEO_PORT}"
|
|
|
fi
|
|
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)"
|
|
HEX_ID="$(sudo nvidia-smi --query-gpu=pci.bus_id --id="$GPU_SELECT" --format=csv | sed -n 2p)"
|
|
|
IFS=":." ARR_ID=($HEX_ID)
|
|
IFS=":." ARR_ID=($HEX_ID)
|
|
|
unset IFS
|
|
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
|
|
# 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)"
|
|
export MODELINE="$(cvt -r "${SIZEW}" "${SIZEH}" "${REFRESH}" | sed -n 2p)"
|
|
|
# Generate /etc/X11/xorg.conf with nvidia-xconfig
|
|
# Generate /etc/X11/xorg.conf with nvidia-xconfig
|