install nvidia driver on linux.
check latest nvidia driver by this link
Ubuntu
- install build need package
apt install build-essential
- Blacklist Nvidia nouveau driver
|
|
Confirm the content of the newly created modeprobe file blacklist-nvidia-nouveau.conf
:
|
|
Enter the following Linux command to update kernel initramfs:
sudo update-initramfs -u
Last step is to reboot your system:
sudo reboot +0
Install CUDA
apt update
apt install nvidia-cuda-toolkit
- (method1) install official run driver
chmod +x NVIDIA-Linux-x86_64-470.199.02.run
sudo ./NVIDIA-Linux-x86_64-470.199.02.run
- generate xorg configure file
sudo nvidia-xconfig
Uninstall Nvidia Driver
ubuntu repository and PPA NVIDIA drivers
- First thing you will need to do is open a command line terminal. Then, executing the following commands will remove the proprietary Nvidia driver:
sudo dpkg -P $(dpkg -l | grep nvidia-driver | awk '{print $2}')
sudo apt autoremove
- Switch back to nouveau driver by downloading the latest version with apt package manager:
sudo apt update
sudo apt install xserver-xorg-video-nouveau
reboot +0
- Once your system has rebooted confirm loaded
nouveau
modules with thelsmod
command:
|
|
official NVIDIA drivers
- Uninstall the Nvidia Driver. Update the below Nvidia script name where appropriate :
sudo bash NVIDIA-Linux-x86_64-XXX.XX.run --uninstall
- If you have not done so yet, restore your xorg original configuration from backup:
sudo nvidia-xconfig --restore-original-backup
- Enable Nouveau modules.
rm -f /etc/modprobe.d/blacklist-nvidia-nouveau.conf
reboot +0