NVIDIA GPU / Graphics Card troubleshooting
Problem: GPU card is not accessible in Linux desktop/laptop/server
The graphics card of a computer might stop working for multiple reasons.
- Driver version mismatch
- Hardware wiring
- Other issues
This could result in
Login issue with GUI
Distorted display etc.
If the issue is related to NVIDIA driver, we can resolve it in following way:
Step-1: Login to the system
If GUI login is not working, use tty login to access via command prompt
CTRL + ALT + F1 to CTRL + ALT + F7
Step-2 Type command nvidia-smi and check the result
If drive is not communicating with card, we get an error
"NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver"
Check if Graphics card is detected
"hwinfo" is a nice utility to detect graphics card in your system.
If this utility is not installed:
sudo apt install hwinfo
An alternate method is to use "lshw" command
Search for NVIDIA driver in apt
apt-cache search nvidia-driver
Note: If you have GUI access, the same information is available at
System Settings => Software & Updates => Additional Drivers
Install latest package (nvidia-465) in this example
sudo apt-get install –reinstall nvidia-465
Check if nvidia-smi command is working fine now
Note: If above steps are not helpful and full removal with new installation is required (Be CAREFUL):