Skip to content

Commit

Permalink
moving systemctl disable to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ruck314 committed Jul 9, 2024
1 parent a4e2c64 commit e19b731
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
14 changes: 9 additions & 5 deletions data_gpu/driver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ $ sudo apt-get install nvidia-cuda-toolkit
$ sudo ./comp_and_load_drivers.sh
```

If NVLink support is required, install cuda-drivers-fabricmanager-<driver version> as well. However, as of Febuary 2024, the latest version of fabricmanager is 535.
When it becomes available on Ubuntu, install with:
Disable the Xserver and nvidia-persistenced to prevent rmmod due to Module XXX is in use by: YYY
because the Nvidia driver gets loaded by default at startup

```
$ sudo apt-get install cuda-drivers-fabricmanager-545
```
https://forums.developer.nvidia.com/t/cant-install-new-driver-cannot-unload-module/63639

```bash
$ sudo systemctl disable gdm # For GNOME Display Manager
$ sudo systemctl disable lightdm # For LightDM
$ sudo systemctl disable sddm # For SDDM
$ sudo systemctl disable nvidia-persistenced
```
17 changes: 5 additions & 12 deletions data_gpu/driver/comp_and_load_drivers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,12 @@ echo "Using Nvidia path: $NVIDIA_PATH"
RET_DIR=$PWD
echo "Using RET_DIR: $RET_DIR"

# Stop the Xserver and nvidia-persistenced to prevent rmmod due to Module XXX is in use by: YYY
# https://forums.developer.nvidia.com/t/cant-install-new-driver-cannot-unload-module/63639
systemctl stop gdm # For GNOME Display Manager
systemctl stop lightdm # For LightDM
systemctl stop sddm # For SDDM
systemctl stop nvidia-persistenced

# Remove existing Nvidia modules (if any)
/usr/sbin/rmmod datagpu
/usr/sbin/rmmod nvidia-drm
/usr/sbin/rmmod nvidia-uvm
/usr/sbin/rmmod nvidia-modeset
/usr/sbin/rmmod nvidia
/usr/sbin/rmmod datagpu 2>&1
/usr/sbin/rmmod nvidia-drm 2>&1
/usr/sbin/rmmod nvidia-uvm 2>&1
/usr/sbin/rmmod nvidia-modeset 2>&1
/usr/sbin/rmmod nvidia 2>&1

# Go to nvidia path and build Nvidia driver
cd "$NVIDIA_PATH" || { echo "Error: Failed to change directory to $NVIDIA_PATH"; exit 1; }
Expand Down

0 comments on commit e19b731

Please sign in to comment.