Skip to content

Latest commit

 

History

History
115 lines (95 loc) · 3.52 KB

File metadata and controls

115 lines (95 loc) · 3.52 KB
  1. Currently used graphics driver
  2. Graphic cards in the system
  3. See installed nvidia packages
  4. See if cc is installed (if not install the toolkit)
  1. Current (momentan) utilization of an Nvidia GPU
  1. Reset the memory
  1. Driver
  2. More recent driver
  3. Problem with the installation - purge (remove) existing packages (this might crash stuff!)

Check gpu/video driver

Currently used graphics driver

sudo lshw -c video

# If Nvidia
nvidia-smi
# OR
grep "X Driver" /var/log/Xorg.0.log

# More Nvidia
find /usr/lib/modules -name nvidia.ko
find /usr/lib/modules -name nvidia.ko -exec modinfo {} \;

# CPU utilization (graphics = % utilization)
nvidia-settings -q GPUUtilization
# Continously
watch -n 1 nvidia-settings -q GPUUtilization
watch -n 1 nvidia-smi

# Which process is using the GPU
ps f -o user,pgrp,pid,pcpu,pmem,start,time,command -p `lsof -n -w -t /dev/nvidia*`

Graphic cards in the system

lspci -nn | grep -E 'VGA|Display'
# OR
lspci | grep VGA
# OR
lspci -vnn | grep VGA

See installed nvidia packages

dpkg -l | grep -i nvidia

See if cc is installed (if not install the toolkit)

nvcc --version

GPU utilization

Current (momentan) utilization of an Nvidia GPU

nvidia-smi

GPU actions

Reset the memory

nvidia-smi
nvidia-smi --gpu-reset -i "gpu ID"
# OR
fuser -v /dev/nvidia*
kill -9 "PID"

Installation

Driver

apt search nvidia-driver
sudo apt update
sudo apt upgrade
ubuntu-drivers devices
sudo apt install [driver_name]
# Example: sudo apt install nvidia-driver-495
sudo reboot

More recent driver

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt upgrade
ubuntu-drivers devices
sudo apt install [driver_name]
# Example: sudo apt install nvidia-driver-470
sudo reboot

Problem with the installation - purge (remove) existing packages (this might crash stuff!)

sudo apt-get remove --purge '^nvidia-.*'
sudo reboot
# Redo the installation

# OR
sudo dpkg -P $(dpkg -l | grep nvidia-driver | awk '{print $2}')
sudo apt autoremove
# Redo the installation

Nvidia driver download

https://www.nvidia.com/Download/index.aspx?lang=en-us