How to Install Graphic Card Driver in Ubuntu 22.04

Supermellow
2 min readJul 21, 2023

--

During data analysis, both the GPU and CPU are used. This is because when only the CPU is used, data analysis is very slow. In order to install the GPU driver to activate GPU usage in an Ubuntu setting, I found 2 ways that worked for me.

FYI, I have 2 computers that differ only in graphics cards. I am using an RTX 3060 12GB (COLORFUL, ASUS KO) from 2 different manufacturers. I don’t know why, but when I used the same graphics card driver installation method, one of my computers did not work.

The two methods I used to install the drivers use the Ubuntu Terminal. The first method is to use ubuntu-drivers to install the drivers recommended by Ubuntu itself, and the second method is to install them after adding them to the PPA repository.

Method 1. Using ubuntu-drivers to install graphic driver

ubuntu-drivers devices

Type this command to find the graphics driver recommended by the system.

sudo apt install nvidia-driver-525

Then, install the recommended version of the found driver with the command above.

After restarting the computer, check the driver version with the following command:

nvidia-smi

Method 2. Add PPA repository then install the graphic driver

sudo add-apt-repository ppa:graphics-drivers/ppa

Then, update and upgrade apt using the following commands:

sudo apt update
sudo apt upgrade

Find the recommended version then proceed with installation.

sudo apt install nvidia-driver-525

After restarting the computer, check the driver version with the following command.

nvidia-smi

In my case, the installation method through autoinstall and the installation method through Software Updates GUI did not work properly. The two methods explained above worked for me though. Thanks for reading.

--

--

Supermellow

Stay Hungry for What Matters, Stay Foolish with AI: Let AI Save Your Time.