Ubuntu - nvidia driver installed but not running

I have an NVIDIA GeForce GTX 550 Ti installed on my system. I just did a fresh install of Ubuntu 20.04.

$ lspci | grep VGA
04:00.0 VGA compatible controller: NVIDIA Corporation GF116 [GeForce GTX 550 Ti] (rev a1)

NVIDIA tools indicate that the driver is not running, though. And nvidia-settings gets a glib error.

$ nvidia-smi
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

$ nvidia-settings

ERROR: NVIDIA driver is not loaded

ERROR: Unable to load info from any available system

(nvidia-settings:37667): GLib-GObject-CRITICAL **: 19:27:51.992: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed

I have the latest driver installed for it.

$ sudo apt -y install nvidia-driver-390
Reading package lists… Done
Building dependency tree
Reading state information… Done
nvidia-driver-390 is already the newest version (390.141-0ubuntu0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 292 not upgraded.

I have nouveau black listed. Any assistance getting the driver loaded and running would be appreciated.nvidia-bug-report.log.gz (395.4 KB)

While the correct 390 driver is installed, there are kernel modules from the incompatible 460 driver left which are blocking everything.
How did you previously install the 460 driver?

Thanks for your response. When i installed Ubuntu from the ISO i did click the box allowing it to install third party video drivers. I pulled up the Ubuntu “Software & Updates” application and checked the additional drivers and it did show 460 installed and so i selected 390 and it seemed to accept that change. Beyond that, i do not believe i explicitly installed 460. At this point i am only a couple days into the install so i will reinstall without allowing proprietary drivers, but if you have other suggestions please let me know. Thanks for your help.

Please post the output of
dkms status
and run
sudo update-initramfs -u
then reboot and check if the nvidia gpu is working.

dkms status seems to confirm exactly what you are saying.

$ dkms status
nvidia, 390.141, 5.8.0-40-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)

update-initramfs -u did not issue an error, but after a reboot nothing has changed. dkms status seems to give the same response as before.

$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-5.8.0-40-generic

Please try
sudo dkms install nvidia/390.141 -k 5.8.0-40-generic --force
sudo update-initramfs -u
reboot

I get the following response. I will still try the rest with the reboot.

$ sudo dkms install nvidia/390.141 -k 5.8.0-40-generic --force
Module nvidia/390.141 already installed on kernel 5.8.0-40-generic/x86_64

Still running the old driver.

pesky dkms. Please try
sudo dkms remove nvidia/390.141 --all
sudo dkms --force install nvidia/390.141 -k 5.8.0-40-generic
then post the output of
modinfo nvidia

2 Likes

My screen is flashing now :-)

$ modinfo nvidia
filename: /lib/modules/5.8.0-40-generic/updates/dkms/nvidia.ko
alias: char-major-195-*
version: 390.141
supported: external
license: NVIDIA
srcversion: CE499642F4B496ACBEB9E3C
alias: pci:v000010DEd00000E00svsdbc04sc80i00*
alias: pci:v000010DEdsvsdbc03sc02i00
alias: pci:v000010DEdsvsdbc03sc00i00
depends: ipmi_msghandler
retpoline: Y
name: nvidia
vermagic: 5.8.0-40-generic SMP mod_unload
parm: NVreg_Mobile:int
parm: NVreg_ResmanDebugLevel:int
parm: NVreg_RmLogonRC:int
parm: NVreg_ModifyDeviceFiles:int
parm: NVreg_DeviceFileUID:int
parm: NVreg_DeviceFileGID:int
parm: NVreg_DeviceFileMode:int
parm: NVreg_UpdateMemoryTypes:int
parm: NVreg_InitializeSystemMemoryAllocations:int
parm: NVreg_UsePageAttributeTable:int
parm: NVreg_MapRegistersEarly:int
parm: NVreg_RegisterForACPIEvents:int
parm: NVreg_CheckPCIConfigSpace:int
parm: NVreg_EnablePCIeGen3:int
parm: NVreg_EnableMSI:int
parm: NVreg_TCEBypassMode:int
parm: NVreg_UseThreadedInterrupts:int
parm: NVreg_EnableStreamMemOPs:int
parm: NVreg_EnableBacklightHandler:int
parm: NVreg_RestrictProfilingToAdminUsers:int
parm: NVreg_EnableUserNUMAManagement:int
parm: NVreg_EnableIBMNPURelaxedOrderingMode:int
parm: NVreg_MemoryPoolSize:int
parm: NVreg_KMallocHeapMaxSize:int
parm: NVreg_VMallocHeapMaxSize:int
parm: NVreg_IgnoreMMIOCheck:int
parm: NVreg_RegistryDwords:charp
parm: NVreg_RegistryDwordsPerDevice:charp
parm: NVreg_RmMsg:charp
parm: NVreg_AssignGpus:charp

I reran sudo update-initramfs -u and rebooted and i am running 390

I think i am good to go. I appreciate the help. Should i not install third party drivers on Ubuntu install and do it after the install next time?

Normally, it’s the way to go, must be some bug it’s installing the wrong version. The option during install is necessary if secure boot is enabled.

Makes sense. Thanks again.

I also reinstalled ubuntu 20.04.2 by usb iso, and I found out that the kernel source tree has nvidia-460 driver, which impact DKMS rebuild.
e.g. my kernel source tree in following structure.
/usr/lib/modules/5.8.0-44-generic/kernel/nvidia-460/

I’ve moved nvidia-460 to ~/, and i’m able to install nvidia-455.

I need older nvidia driver version for official tensorflow installation, 使用 pip 安裝 TensorFlow