New NVIDIA driver automation

The repo README does suggest the 520 driver is preferred for Optimus configuration. That also means installing the LTS kernel, as the 520 driver modules will not build on Linux 6.2.x. Moreover, Blender mentions CUDA 12.0 not officially supported.

Fortunately, there’s no-need to re-install the OS from scratch.

  1. Install kernel-lts2021 (sudo swupd bundle-add kernel-lts2021 kernel-lts2021-dkms).
  2. Run (bash check-kernel-dkms) in the repo folder to be sure NVIDIA (current version) kernel modules have been built for the LTS kernel.
  3. Reboot the system and select the lts2021 kernel.
  4. Uninstall the 6.2 kernel (sudo swupd bundle-remove kernel-native-current kernel-native kernel-native-dkms linux-dev).
  5. Reboot the system (add "3 " with a space) to the kernel arguments.
  6. Install the NVIDIA 520 driver (bash install-driver 520).
  7. Uninstall CUDA 12.0 (bash uninstall-cuda).
  8. Install CUDA 11.8 (bash install-cuda). That will install CUDA 11.8 for the 520 driver.

Hopefully, Blender will work with CUDA 11.8. Otherwise, you will need to download CUDA 11.4 from the web and pass the path to install-cuda.

bash uninstall-cuda
bash install-cuda ~/Downloads/cuda_11.4.4_470.82.01_linux.run