View Categories

How to resolve NVIDIA GPU errors in Ubuntu

Estimated Reading Time: 1 min read

Table of Contents

Case #

You have issues when installing the drivers of your NVIDIA GPU inside an Ubuntu machine. Or you may experience errors after a recent Ubuntu distribution upgrade or NVIDIA driver update. This article provides some troubleshooting steps you can follow to to resolve NVIDIA GPU errors in Ubuntu.

Solution #

First consult the log file /var/lib/dkms/nvidia/390.157/build/make.log for more information about your particular error. You scenario may vary significantly from what is discussed here, but you should still be able to use this article for general reference on the troubleshooting procedure. In my example, i had the following dependency errors in the make.log file, following an NVIDIA drive updated package deployment.

dpkg: error processing package nvidia-dkms-390 (--configure): installed nvidia-dkms-390 package post-installation script subprocess returned
error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-390: nvidia-driver-390 depends on nvidia-dkms-390 (<= 390.157-1); however:
Package nvidia-dkms-390 is not configured yet.nvidia-driver-390 depends on nvidia-dkms-390 (>= 390.157); however: Package nvidia-dkms-390 is not configured yet.
dpkg: error processing package nvidia-driver-390 (--configure): dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.

To resolve the above issues i had to run the following commands:

sudo dpkg --force-all --configure -a

sudo dpkg --purge --force-depends nvidia-dkms-390

sudo dpkg --purge --force-depends nvidia-driver-390

sudo apt-get -f install

sudo apt autoremove

sudo apt update & apt-upgrade

sudo apt install nvidia-utils-390

sudo nvidia-smi

sudo apt install nvidia-settings

sudo apt autoremove

sudo apt remove *nvidia*

sudo ubuntu-drivers list

sudo ubuntu-drivers install

Verify status with sudo nvidia-smi

Powered by BetterDocs