Kubuntu 22.04 cannot upgrade/install nvidia driver after kernel update

Bug #1994035 reported by Alfredo Gemma
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
kubuntu-driver-manager (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After the automatic upgrade of the kernel to 5.17.0-1020-oem, the nvidia driver became unavailable:
$ 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.

Trying to install any nvidia drivers using kubuntu-driver-manager throws the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/qt/SoftwarePropertiesQt.py", line 1065, in on_driver_selection_changed
    modules_package_obj = self.apt_cache[modules_package]
TypeError: Expected a string or a pair of strings
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/qt/SoftwarePropertiesQt.py", line 1065, in on_driver_selection_changed
    modules_package_obj = self.apt_cache[modules_package]
TypeError: Expected a string or a pair of strings

Trying to manually install any nvidia drivers from command line doesn't produce any changes (no Nvidia driver detected) and it requires /usr/lib/python3/dist-packages/UbuntuDrivers/detect.py to be fixed in advanced ( https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/comments/5 )

Trying to revert back to a previous Kernel version doesn't fix the issue.

KDE Plasma version: 5.25.2
KDE Frameworks Version: 5.98.0
QT Version: 5.15.3
Kernel Version: 5.17.0-1020-oem (64 bit)
-display
       description: VGA compatible controller
       product: GA103M [GeForce RTX 3080 Ti Mobile]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: /dev/fb0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller cap_list fb
       configuration: depth=32 latency=0 mode=2560x1440 visual=truecolor xres=2560 yres=1440
       resources: iomemory:600-5ff iomemory:640-63f memory:83000000-83ffffff memory:6000000000-63ffffffff memory:6400000000-6401ffffff ioport:4000(size=128) memory:84000000-8407ffff

Revision history for this message
Mateusz Chrusciel (nerthosperioton) wrote :

I also ran into this very same issue. Same kernel, same error messages.
KDE Plasma version: 5.24.6
KDE Frameworks Version: 5.92.0
QT Version: 5.15.3
Kernel Version: 5.17.0-1020-oem (64 bit)
VGA compatible controller: NVIDIA Corporation GA104 [GeForce RTX 3070] (rev a1) (prog-if 00 [VGA controller])
 Subsystem: Micro-Star International Co., Ltd. [MSI] GA104 [GeForce RTX 3070]
 Flags: bus master, fast devsel, latency 0, IRQ 158
 Memory at 52000000 (32-bit, non-prefetchable) [size=16M]
 Memory at 40000000 (64-bit, prefetchable) [size=256M]
 Memory at 50000000 (64-bit, prefetchable) [size=32M]
 I/O ports at 4000 [size=128]
 Expansion ROM at 53000000 [disabled] [size=512K]
 Kernel driver in use: nouveau
 Kernel modules: nvidiafb, nouveau

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kubuntu-driver-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Erik Hofman (ermarch) wrote (last edit ):

The problem seems to be that the kernel header files are not installed. At least that fixed it for me (and reinstalling the NVidia drivers)

Revision history for this message
Alfredo Gemma (alfredo-gemma) wrote :

Just tried to install the kernel header files, but after rebooting the system hangs on:

[FAILED] Failed to start Detect the available GPUs and deal with any system changes.

It doesn't load KDE anymore.

Revision history for this message
Erik Hofman (ermarch) wrote :

Odd, it did the trick for me.
Maybe you should remove all NVidia related and reinstall the NVidia drivers again?

Revision history for this message
Alfredo Gemma (alfredo-gemma) wrote :

I got it working after switching to the previous kernel and installing the 515 nvidia driver instead of the 520 from the command line (kubuntu-driver-manager keeps having the same issue as above)

Then switching back to the current kernel (5.17.0-1020-oem) did the trick.
I'm using the Nvidia driver 515.65.01 and I won't upgrade to the 520 until this bug is fixed.

Revision history for this message
marco (mark8989) wrote (last edit ):

I'm on the second clean installation of Kubuntu 22.04 and I keep getting the same.
Everything works fine for a while, and then at the first firmware update the kubuntu-driver-manager gets broken in the same way and the nvidia drivers won't load anymore.

myuser@mypc:~$ sudo nvidia-smi
[sudo] password for myuser:
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Kernel version: 6.2.0-1009-lowlatency
KDE plasma version: 5.24.7

EDIT: The nvidia drivers were fixed by running:
sudo apt -y install linux-headers-$(uname -r)

However I keep facing the same issue described by the original poster with the driver manager.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.