Ubuntu 20.04.1 lts driver & kernal has different version conflict

The problem started after normal sudo apt update && sudo apt upgrade -y where I was upgraded to Ubuntu 20.04 - .1

I have zero nVidia Server Settings, is just a black empty box, I have no duel monitor options and can not set up.

len@len-Z390-AORUS-ULTRA:~ dmesg |tail -4 [65724.003002] NVRM: API mismatch: the client has the version 455.38, but NVRM: this kernel module has the version 435.21. Please NVRM: make sure that this kernel module and all NVIDIA driver NVRM: components have the same version. len@len-Z390-AORUS-ULTRA:~

len@len-Z390-AORUS-ULTRA:~$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001F07sv00001043sd00008671bc03sc00i00
vendor : NVIDIA Corporation
model : TU106 [GeForce RTX 2070 Rev. A]
driver : nvidia-driver-418-server - distro non-free
driver : nvidia-driver-450-server - distro non-free
driver : nvidia-driver-455 - distro non-free recommended
driver : nvidia-driver-440-server - distro non-free
driver : nvidia-driver-450 - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin

I have purged all Nvidia drivers and reloaded the recommended driver a number of times, but above version mismatch persists.

Please note the kernel module has the version 435.21and is lower not higher than the driver version nvidia-driver-455 - distro non-free recommended.

How do I upgrade the kernel module version 435.21 to the same as the driver nvidia-driver-455 - distro non-free recommended?

Is it possible to provide a link to a playlist of commands to make this happen or suitable code snippets?

What is the output of:
uname -r
and
dkms status

Hi, thanks for the reply, hold on I will get the outputs, thanks

len@len-Z390-AORUS-ULTRA:~ uname -r 5.4.0-21-generic len@len-Z390-AORUS-ULTRA:~ dkms status
nvidia, 455.38, 5.3.0-42-generic, x86_64: installed
nvidia, 455.38, 5.4.0-21-generic, x86_64: installed
nvidia, 455.38, 5.4.0-53-generic, x86_64: installed
nvidia, 455.38, 5.4.0-54-generic, x86_64: installed
len@len-Z390-AORUS-ULTRA:~$

did you try one of the other kernels installed? 5.4.0-54-generic?

No, I have just tried installing different drivers, I do not know how to install another kernel, I am an advanced newbie, how do I install 5.4.0-54-generic?

It seems already installed.
At boot menu select advanced options and choose the kernel to boot.

OK, thank you I will try that and get back to you!

I am able to boot normally in 5.4.0-21-generic, x86_64:
I only have options in the advanced boot of 5.3 series, no 5.4.0-54-generic, x86_64. If I boot in the 5.3 series I lose wifi and internet. I looked while booted into 5.3 series and still had no nVidia Server Settings, is just a black empty box, I have no duel monitor options and can not set up.

I dont understand if (dkms status) reviels 5.4.0-54-generic, x86_64: is installed, why it was not listed in my advanced boot options??? and if I can load it, does that not mean I have to use comparable nvidia 454 driver???, if I can get the aforemention kernal loaded that is.

indeed it is strange, that dkms shows that kernel, but you have no boot entry for it.

does apt search linux-image-5.4.0-54-generic show it as installed (first letter in the line should be ‘i’)?

if not i’d remove the dkms for it.
sudo dkms uninstall -m nvidia -v 455.38 -k 5.4.0-54-generic
and
sudo dkms remove -m nvidia -v 455.38 -k 5.4.0-54-generic

(same for kernel 5.4.0-53-generic)

and then install the kernel and kernel headers.
for x in linux-headers-5.4.0-54-generic linux-image-5.4.0-54-generic; do sudo apt install $x; done

then try to boot into it.
If the kernel is installed I’d first purge it and then do all the above mentioned steps.

OK, now I am scared! that’s advanced command line slinging your suggesting there, guess I have to learn sometime, I will give it ago and get back to you, you may not see me back for a week though if I get this wrong and have to do a fresh install.

no need to be scared.
you still have the other kernels installed to boot from.
you can copy the commands as is.

thats just a simple loop.
you could do that in two steps…
sudo apt install linux-headers-5.4.0-54-generic
sudo apt install linux-image-5.4.0-54-generic

I did the search and got back this-

len@len-Z390-AORUS-ULTRA:~$ apt search linux-image-5.4.0-54-generic
Sorting… Done
Full Text Search… Done
linux-image-5.4.0-54-generic/focal-updates,now 5.4.0-54.60 amd64 [installed,automatic]
Signed kernel image generic

I’d purge and reinstall just to make sure (same for the kernel headers).
Watch the output for a new grub configuration.
If it’s not happening… sudo update-grub after the kernel install.

still first do the dkms removal.

OK, this is what I have done to remove, if your happy I will instigate
for x in linux-headers-5.4.0-54-generic linux-image-5.4.0-54-generic; do sudo apt install $x; done

This is the output from my terminal-

len@len-Z390-AORUS-ULTRA:~$ sudo dkms uninstall -m nvidia -v 455.38 -k 5.4.0-54-generic
[sudo] password for len:

-------- Uninstall Beginning --------
Module: nvidia
Version: 455.38
Kernel: 5.4.0-54-generic (x86_64)

Status: Before uninstall, this module version was ACTIVE on this kernel.

nvidia.ko:

  • Uninstallation
    • Deleting from: /lib/modules/5.4.0-54-generic/updates/dkms/
  • Original module
    • No original module was found for this module on this kernel.
    • Use the dkms install command to reinstall any previous module version.

nvidia-modeset.ko:

  • Uninstallation
    • Deleting from: /lib/modules/5.4.0-54-generic/updates/dkms/
  • Original module
    • No original module was found for this module on this kernel.
    • Use the dkms install command to reinstall any previous module version.

nvidia-drm.ko:

  • Uninstallation
    • Deleting from: /lib/modules/5.4.0-54-generic/updates/dkms/
  • Original module
    • No original module was found for this module on this kernel.
    • Use the dkms install command to reinstall any previous module version.

nvidia-uvm.ko:

  • Uninstallation
    • Deleting from: /lib/modules/5.4.0-54-generic/updates/dkms/
  • Original module
    • No original module was found for this module on this kernel.
    • Use the dkms install command to reinstall any previous module version.

depmod…

DKMS: uninstall completed.
len@len-Z390-AORUS-ULTRA:~$ sudo dkms remove -m nvidia -v 455.38 -k 5.4.0-54-generic

-------- Uninstall Beginning --------
Module: nvidia
Version: 455.38
Kernel: 5.4.0-54-generic (x86_64)

Status: This module version was INACTIVE for this kernel.
depmod…

DKMS: uninstall completed.
len@len-Z390-AORUS-ULTRA:~ len@len-Z390-AORUS-ULTRA:~ sudo dkms uninstall -m nvidia -v 455.38 -k 5.4.0-53-generic

-------- Uninstall Beginning --------
Module: nvidia
Version: 455.38
Kernel: 5.4.0-53-generic (x86_64)

Status: Before uninstall, this module version was ACTIVE on this kernel.

nvidia.ko:

  • Uninstallation
    • Deleting from: /lib/modules/5.4.0-53-generic/updates/dkms/
  • Original module
    • No original module was found for this module on this kernel.
    • Use the dkms install command to reinstall any previous module version.

nvidia-modeset.ko:

  • Uninstallation
    • Deleting from: /lib/modules/5.4.0-53-generic/updates/dkms/
  • Original module
    • No original module was found for this module on this kernel.
    • Use the dkms install command to reinstall any previous module version.

nvidia-drm.ko:

  • Uninstallation
    • Deleting from: /lib/modules/5.4.0-53-generic/updates/dkms/
  • Original module
    • No original module was found for this module on this kernel.
    • Use the dkms install command to reinstall any previous module version.

nvidia-uvm.ko:

  • Uninstallation
    • Deleting from: /lib/modules/5.4.0-53-generic/updates/dkms/
  • Original module
    • No original module was found for this module on this kernel.
    • Use the dkms install command to reinstall any previous module version.

depmod…

DKMS: uninstall completed.
len@len-Z390-AORUS-ULTRA:~$ sudo dkms remove -m nvidia -v 455.38 -k 5.4.0-53-generic

-------- Uninstall Beginning --------
Module: nvidia
Version: 455.38
Kernel: 5.4.0-53-generic (x86_64)

Status: This module version was INACTIVE for this kernel.
depmod…

DKMS: uninstall completed.
len@len-Z390-AORUS-ULTRA:~$

dkms removal went smoothly.

purge the kernel(s):
sudo apt purge linux-image-5.4.0-53-generic
sudo apt purge linux-image-5.4.0-54-generic
re-install the latest:
for x in linux-headers-5.4.0-54-generic linux-image-5.4.0-54-generic; do sudo apt install $x; done

check dkms status for the nvidia driver with that kernel.
if it’s not there:
sudo dkms autoinstall -m nvidia -v 455.38 -k 5.4.0-54-generic

sudo update-grub just to be sure.

reboot into the 5.4.0-54 kernel.

OK great, I have a good feeling about this. Will input above and get back to you

Hi Mart,

I was locked out of the forum for 24 hours as I only joined today and am bound to 20 replies for the first day.

I had issues.

Still, the newly loaded Kernel was not listed in advanced options.

A few thoughts come to me, I am booting with UEFI and I am using the ZFS file system offered in Ubuntu 20.04.

This is the output from the terminal from all your suggested commands-

len@len-Z390-AORUS-ULTRA:~$ sudo apt purge linux-image-5.4.0-53-generic

[sudo] password for len:

Reading package lists… Done

Building dependency tree

Reading state information… Done

The following additional packages will be installed:

linux-image-unsigned-5.4.0-53-generic

Suggested packages:

fdutils linux-doc | linux-source-5.4.0 linux-tools

The following packages will be REMOVED:

linux-image-5.4.0-53-generic* linux-modules-extra-5.4.0-53-generic*

The following NEW packages will be installed:

linux-image-unsigned-5.4.0-53-generic

0 to upgrade, 1 to newly install, 2 to remove and 0 not to upgrade.

Need to get 8,951 kB of archives.

After this operation, 190 MB disk space will be freed.

Do you want to continue? [Y/n] Y

Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-image-unsigned-5.4.0-53-generic amd64 5.4.0-53.59 [8,951 kB]

Fetched 8,951 kB in 5s (1,719 kB/s)

(Reading database … 304372 files and directories currently installed.)

Removing linux-modules-extra-5.4.0-53-generic (5.4.0-53.59) …

Removing linux-image-5.4.0-53-generic (5.4.0-53.59) …

I: /boot/vmlinuz.old is now a symlink to vmlinuz-5.4.0-54-generic

I: /boot/initrd.img.old is now a symlink to initrd.img-5.4.0-54-generic

/etc/kernel/postrm.d/initramfs-tools:

update-initramfs: Deleting /boot/initrd.img-5.4.0-53-generic

Selecting previously unselected package linux-image-unsigned-5.4.0-53-generic.

(Reading database … 299000 files and directories currently installed.)

Preparing to unpack …/linux-image-unsigned-5.4.0-53-generic_5.4.0-53.59_amd64.deb

Unpacking linux-image-unsigned-5.4.0-53-generic (5.4.0-53.59) …

Setting up linux-image-unsigned-5.4.0-53-generic (5.4.0-53.59) …

I: /boot/vmlinuz is now a symlink to vmlinuz-5.4.0-53-generic

I: /boot/initrd.img is now a symlink to initrd.img-5.4.0-53-generic

(Reading database … 299003 files and directories currently installed.)

Purging configuration files for linux-modules-extra-5.4.0-53-generic (5.4.0-53.59) .

Purging configuration files for linux-image-5.4.0-53-generic (5.4.0-53.59) …

I: /boot/vmlinuz is now a symlink to vmlinuz-5.4.0-54-generic

I: /boot/initrd.img is now a symlink to initrd.img-5.4.0-54-generic

/var/lib/dpkg/info/linux-image-5.4.0-53-generic.postrm … removing pending trigger

rmdir: failed to remove ‘/lib/modules/5.4.0-53-generic’: Directory not empty

Processing triggers for linux-image-unsigned-5.4.0-53-generic (5.4.0-53.59) …

len@len-Z390-AORUS-ULTRA:~$ sudo apt purge linux-image-5.4.0-54-generic

Reading package lists… Done

Building dependency tree

Reading state information… Done

The following packages were automatically installed and are no longer required:

amd64-microcode intel-microcode iucode-tool thermald

Use ‘sudo apt autoremove’ to remove them.

The following additional packages will be installed:

linux-image-unsigned-5.4.0-54-generic

Suggested packages:

fdutils linux-doc | linux-source-5.4.0 linux-tools

The following packages will be REMOVED:

linux-generic* linux-image-5.4.0-54-generic* linux-image-generic*

linux-modules-extra-5.4.0-54-generic* linux-signed-generic*

The following NEW packages will be installed:

linux-image-unsigned-5.4.0-54-generic

0 to upgrade, 1 to newly install, 5 to remove and 0 not to upgrade.

Need to get 8,914 kB of archives.

After this operation, 190 MB disk space will be freed.

Do you want to continue? [Y/n] Y

Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-image-unsigned-5.4.0-54-generic amd64 5.4.0-54.60 [8,914 kB]

Fetched 8,914 kB in 5s (1,900 kB/s)

(Reading database … 299003 files and directories currently installed.)

Removing linux-signed-generic (5.3.0.45.38) …

Removing linux-generic (5.4.0.54.57) …

Removing linux-image-generic (5.4.0.54.57) …

Removing linux-modules-extra-5.4.0-54-generic (5.4.0-54.60) …

Removing linux-image-5.4.0-54-generic (5.4.0-54.60) …

I: /boot/vmlinuz.old is now a symlink to vmlinuz-5.4.0-53-generic

I: /boot/vmlinuz is now a symlink to vmlinuz-5.4.0-53-generic

/etc/kernel/postrm.d/initramfs-tools:

update-initramfs: Deleting /boot/initrd.img-5.4.0-54-generic

Selecting previously unselected package linux-image-unsigned-5.4.0-54-generic.

(Reading database … 293622 files and directories currently installed.)

Preparing to unpack …/linux-image-unsigned-5.4.0-54-generic_5.4.0-54.60_amd64.deb

Unpacking linux-image-unsigned-5.4.0-54-generic (5.4.0-54.60) …

Setting up linux-image-unsigned-5.4.0-54-generic (5.4.0-54.60) …

I: /boot/vmlinuz is now a symlink to vmlinuz-5.4.0-54-generic

I: /boot/initrd.img is now a symlink to initrd.img-5.4.0-54-generic

(Reading database … 293625 files and directories currently installed.)

Purging configuration files for linux-modules-extra-5.4.0-54-generic (5.4.0-54.60) .

Purging configuration files for linux-image-5.4.0-54-generic (5.4.0-54.60) …

I: /boot/vmlinuz is now a symlink to vmlinuz-5.4.0-53-generic

/var/lib/dpkg/info/linux-image-5.4.0-54-generic.postrm … removing pending trigger

rmdir: failed to remove ‘/lib/modules/5.4.0-54-generic’: Directory not empty

Processing triggers for linux-image-unsigned-5.4.0-54-generic (5.4.0-54.60) …

len@len-Z390-AORUS-ULTRA:~$ for x in linux-headers-5.4.0-54-generic linux-image-5.4.0-54-generic; do sudo apt install $x; done

Reading package lists… Done

Building dependency tree

Reading state information… Done

linux-headers-5.4.0-54-generic is already the newest version (5.4.0-54.60).

linux-headers-5.4.0-54-generic set to manually installed.

The following packages were automatically installed and are no longer required:

amd64-microcode intel-microcode iucode-tool thermald

Use ‘sudo apt autoremove’ to remove them.

0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

Reading package lists… Done

Building dependency tree

Reading state information… Done

The following packages were automatically installed and are no longer required:

amd64-microcode intel-microcode iucode-tool thermald

Use ‘sudo apt autoremove’ to remove them.

Suggested packages:

fdutils linux-doc | linux-source-5.4.0 linux-tools

The following packages will be REMOVED:

linux-image-unsigned-5.4.0-54-generic

The following NEW packages will be installed:

linux-image-5.4.0-54-generic

0 to upgrade, 1 to newly install, 1 to remove and 0 not to upgrade.

Need to get 8,883 kB of archives.

After this operation, 338 kB disk space will be freed.

Do you want to continue? [Y/n] Y

Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-image-5.4.0-54-generic amd64 5.4.0-54.60 [8,883 kB]

Fetched 8,883 kB in 4s (1,998 kB/s)

(Reading database … 293625 files and directories currently installed.)

Removing linux-image-unsigned-5.4.0-54-generic (5.4.0-54.60) …

/etc/kernel/postrm.d/initramfs-tools:

update-initramfs: Deleting /boot/initrd.img-5.4.0-54-generic

Selecting previously unselected package linux-image-5.4.0-54-generic.

(Reading database … 293622 files and directories currently installed.)

Preparing to unpack …/linux-image-5.4.0-54-generic_5.4.0-54.60_amd64.deb …

Unpacking linux-image-5.4.0-54-generic (5.4.0-54.60) …

Setting up linux-image-5.4.0-54-generic (5.4.0-54.60) …

I: /boot/vmlinuz is now a symlink to vmlinuz-5.4.0-54-generic

I: /boot/initrd.img is now a symlink to initrd.img-5.4.0-54-generic

Processing triggers for linux-image-5.4.0-54-generic (5.4.0-54.60) …

/etc/kernel/postinst.d/dkms:

  • dkms: running auto installation service for kernel 5.4.0-54-generic

Kernel preparation unnecessary for this kernel. Skipping…

applying patch disable_fstack-clash-protection_fcf-protection.patch…patching file

Kbuild

Hunk #1 succeeded at 84 (offset 13 lines).

Building module:

cleaning build area…

unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 ‘make’

-j16 NV_EXCLUDE_BUILD_MODULES=’’ KERNEL_UNAME=5.4.0-54-generic IGNORE_XEN_PRESENCE=1

IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.4.0-54-generic/build LD=/usr/bin/ld.bfd

modules…

Signing module:

  • /var/lib/dkms/nvidia/455.38/5.4.0-54-generic/x86_64/module/nvidia-modeset.ko

  • /var/lib/dkms/nvidia/455.38/5.4.0-54-generic/x86_64/module/nvidia-drm.ko

  • /var/lib/dkms/nvidia/455.38/5.4.0-54-generic/x86_64/module/nvidia-uvm.ko

  • /var/lib/dkms/nvidia/455.38/5.4.0-54-generic/x86_64/module/nvidia.ko

Secure Boot not enabled on this system.

cleaning build area…

DKMS: build completed.

nvidia.ko:

Running module version sanity check.

  • Original module

  • No original module exists within this kernel

  • Installation

  • Installing to /lib/modules/5.4.0-54-generic/updates/dkms/

nvidia-modeset.ko:

Running module version sanity check.

  • Original module

  • No original module exists within this kernel

  • Installation

  • Installing to /lib/modules/5.4.0-54-generic/updates/dkms/

nvidia-drm.ko:

Running module version sanity check.

  • Original module

  • No original module exists within this kernel

  • Installation

  • Installing to /lib/modules/5.4.0-54-generic/updates/dkms/

nvidia-uvm.ko:

Running module version sanity check.

  • Original module

  • No original module exists within this kernel

  • Installation

  • Installing to /lib/modules/5.4.0-54-generic/updates/dkms/

depmod…

DKMS: install completed.

…done.

/etc/kernel/postinst.d/initramfs-tools:

update-initramfs: Generating /boot/initrd.img-5.4.0-54-generic

I: The initramfs will attempt to resume from /dev/nvme1n1p3

I: (UUID=60ce2056-9a7d-445f-91a0-38ba6ed74753)

I: Set the RESUME variable to override this.

len@len-Z390-AORUS-ULTRA:~$ dkms status

nvidia, 455.38, 5.3.0-42-generic, x86_64: installed

nvidia, 455.38, 5.4.0-21-generic, x86_64: installed

nvidia, 455.38, 5.4.0-54-generic, x86_64: installed

len@len-Z390-AORUS-ULTRA:~$ sudo update-grub

Sourcing file `/etc/default/grub’

Sourcing file `/etc/default/grub.d/init-select.cfg’

Generating grub configuration file …

grub-probe: error: unknown filesystem.

Found linux image: vmlinuz-5.4.0-21-generic in rpool/ROOT/ubuntu_q6zf8y

Found initrd image: initrd.img-5.4.0-21-generic in rpool/ROOT/ubuntu_q6zf8y

Found linux image: vmlinuz-5.3.0-45-generic in rpool/ROOT/ubuntu_q6zf8y

Found initrd image: initrd.img-5.3.0-45-generic in rpool/ROOT/ubuntu_q6zf8y

Found linux image: vmlinuz-5.3.0-42-generic in rpool/ROOT/ubuntu_q6zf8y

Found initrd image: initrd.img-5.3.0-42-generic in rpool/ROOT/ubuntu_q6zf8y

device-mapper: reload ioctl on osprober-linux-nvme1n1p5 failed: Device or resource busy

Command failed.

Adding boot menu entry for UEFI Firmware Settings

done

len@len-Z390-AORUS-ULTRA:~$