I am installing nvidia drivers and cuda on a new msi laptop and I am having problems to make it running.
I kept the 430 driver on ubuntu 18.04 installed by default and it seen not working.
I installed driver 440 using the .run file and it looks like it has been properly installed:
Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up. (Answer: Yes)
-> Your X configuration file has been successfully updated. Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64 (version: 440.44) is now complete.
Looks like everything is installed property but GPU can’t be accessed
/usr/bin/nvidia-debugdump -D
Error: nvmlInit(): Driver Not Loaded
/usr/bin/nvidia-smi --query
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
/usr/bin/nvidia-smi --query --unit
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
I tried to uninstall the .run, and install manually
I manage to install 430 driver using .run on secure boot and signing with private and public keys manually generated. Now everything is running fine.
Following the steps in case any other have the same problem:
sudo apt purge nvidia-*
sudo autoremove
sudo apt install pkg-config
openssl req -new -x509 -newkey rsa:2048 -keyout PATH_TO_PRIVATE_KEY -outform DER -out PATH_TO_PUBLIC_KEY -nodes -days 36500 -subj "/CN=Graphics Drivers"
sudo mokutil --import PATH_TO_PUBLIC_KEY
--> sudo reboot --> accept MOK --> reboot
echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf; sudo update-initramfs -u
sudo telinit 3
sudo sh ./NVIDIAXXXXXX.run -s --module-signing-secret-key=PATH_TO_PRIVATE_KEY --module-signing-public-key=PATH_TO_PUBLIC_KEY
check nvidia-smi connect to kernel and display the driver and CUDA version
After installation, the problem was that only HDMI output was working, after reset xorg config I manage to have the laptop screen running as well (previously black):
Rather just install the cuda-toolkit, installing ‘cuda’ will overwrite the already installed driver with the bundled one.
sudo apt install cuda-toolkit-10-0
The way you installed the driver now will break on kernel update. Installing the driver from repo with secure boot enabled will either require to select “install third-party software” on Ubuntu install or afterwards using
update-secureboot-policy
to enroll/create keys for dkms.