Install Nvidia GPU driver on Ubuntu

Aug 9, 2021 08:46 · 126 words · 1 minute read

Install Nvidia driver on Ubuntu can be very tricky. Sometimes it goes extremely smooth while sometime it just doesn’t work. Follow these following steps, it should make it easier.

  1. Download Nvidia driver to your Ubuntu machine from its website. It is a .run file.

  2. Install make and gcc.

    sudo apt install make    
    sudo apt install gcc
    
  3. Disable Nouveau kernel driver.

    # Create a file
    sudo nano /etc/modprobe.d/blacklist-nouveau.conf
    

    with the following contents:

    blacklist nouveau
    options nouveau modeset=0
    

    Regenerate the kernel initramfs:

    sudo update-initramfs -u
    

    Then reboot

    sudo reboot
    
  4. Hit Ctrl+Alt+F1 and login using your credentials. Then kill your current X server session by typing sudo service lightdm stop or sudo lightdm stop. Enter runlevel 3 by typing:

    sudo init 3
    
  5. Install the driver

    sudo ./Your_Nvidia_Driver.run
    

Ref:

https://www.cnblogs.com/zqifa/p/12910989.html

comments powered by Disqus