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:
Check Problem
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"
Possible Solution
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 (Command to see GPU in Linux)

An alternate method is to use "lshw" command (Linux command for check display option)

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-460) in this example
sudo apt-get install –reinstall nvidia-460
Reboot
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):
https://askubuntu.com/questions/206283/how-can-i-uninstall-a-nvidia-driver-completely


