mirror of
https://git.bs.b-eit.de/bucde/notes.git
synced 2024-11-22 02:03:07 +01:00
fix[script 'xrdp_nvidia_setup']: change keyring version and PCIe BUS_ID finding
This commit is contained in:
parent
0a77e69e31
commit
d129bd0c8b
@ -15,8 +15,8 @@ sudo apt-get -y autoremove
|
||||
|
||||
# Install CUDA (Shamelessly copied from Nvidia's website):
|
||||
#wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
|
||||
wget https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/cuda-keyring_1.0-1_all.deb
|
||||
sudo dpkg -i cuda-keyring_1.0-1_all.deb
|
||||
wget https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/cuda-keyring_1.1-1_all.deb
|
||||
sudo dpkg -i cuda-keyring_1.1-1_all.deb
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install nvidia-driver
|
||||
sudo apt-get -y install cuda
|
||||
@ -80,10 +80,11 @@ make -j $(nproc) clean all
|
||||
sudo make install
|
||||
|
||||
echo "Configuring Nvidia..."
|
||||
BUS_ID=$(nvidia-smi --query-gpu=pci.bus --format=csv | sed -n '2 p' | xargs -I{} printf "%d\n" {})
|
||||
# BUS_ID=$(nvidia-smi --query-gpu=pci.bus --format=csv | sed -n '2 p' | xargs -I{} printf "%d\n" {})
|
||||
# Alternative method to get the BUS ID that doesn't work on some systems (Such as a laptop with an Intel iGPU and an Nvidia Discrete GPU).
|
||||
# BUS_ID=$(lspci | grep -e 'VGA.*NVIDIA' | cut -d: -f1 | xargs -I{} printf "%d\n" 0x{} | sed -n 1p)
|
||||
BUS_ID=$(lspci | grep -e 'VGA.*NVIDIA' | cut -d: -f1 | xargs -I{} printf "%d\n" 0x{} | sed -n 1p)
|
||||
# nvidia-xconfig --query-gpu-info
|
||||
echo "BUS_ID [$BUS_ID]"
|
||||
sudo sed -i -E 's/(BusID "PCI:)[[:digit:]]+(:0:0")/\1'$BUS_ID'\2/' /etc/X11/xrdp/xorg_nvidia.conf
|
||||
|
||||
echo "Starting the server..."
|
||||
|
Loading…
Reference in New Issue
Block a user