Nvidia NVML Driver/library version mismatch [closed]
Asked Answered
E

19

553

When I run nvidia-smi, I get the following message:

Failed to initialize NVML: Driver/library version mismatch

An hour ago I received the same message and uninstalled my CUDA library and I was able to run nvidia-smi, getting the following result:

nvidia-smi-result

After this I downloaded cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb from the official NVIDIA page and then simply:

sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}

Now I have CUDA installed, but I get the mentioned mismatch error.


Some potentially useful information:

Running cat /proc/driver/nvidia/version I get:

NVRM version: NVIDIA UNIX x86_64 Kernel Module  378.13  Tue Feb  7 20:10:06 PST 2017
GCC version:  gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)

I'm running Ubuntu 16.04.2 LTS (Xenial Xerus).

The kernel release is 4.4.0-66-generic.

Eichhorn answered 25/3, 2017 at 22:47 Comment(6)
You have probably mixed a previous runfile install with your (current) package manager install (apt-get). Follow the instructions in the cuda linux install guide to remove all previous NVIDIA driver and CUDA files, and then reinstall after you have cleaned that up. Before starting your reinstall, you may want to read the entire linux install guide doc I linked. The conflict almost certainly arises out of your attempt to install the CUDA 8 GA2 package on top of your existing 378.13 driver install.Pest
@talonmies Where would be a good place to ask GPU related questions, if not on Stackoverflow?Inebriety
I am using Ubuntu and I think error occurs after Nvidia driver is updated on Linux. Maybe auto-remove and reboot is required after updating Nvidia driver.Pasahow
Running sudo reboot solved this problem for me.Petua
One important thing many folks are missing here is to make sure you also clean up any junk that dkms might build automatically. Make sure you clear out /var/lib/dkms/nvidia of any old module sources!Ddene
This happened to me, automatic updates broke my NVidia driver. Kinda pissed me off, so I did: sudo dpkg-reconfigure unattended-upgrades and choose No. Then search for multiple driver versions with dpkg -l | grep nvidia - e.g. I had versions 510 and 535 of various packages. Use apt-get to purge packages with the wrong version. Finally, with your correct version in hand (e.g. 535), re-install to ensure everything is rebuilt: sudo apt-get install --reinstall linux-headers-$(uname -r) linux-modules-$(uname -r) linux-modules-nvidia-535-$(uname -r) nvidia-driver-535 Reboot and you're done.Verrocchio
E
794

Surprise surprise, rebooting solved the issue (I thought I had already tried that).

The solution Robert Crovella mentioned in the comments may also be useful to someone else, since it's pretty similar to what I did to solve the issue the first time I had it.

Eichhorn answered 25/3, 2017 at 23:6 Comment(24)
I was sceptical about this working after a reboot, but nonetheless I gave it a try, and IT WORKED!! Thanks!Accentual
@AbhishekPotnis If you're wondering why reboot worked, it may be because of this: checking /var/log/apt/history.log on Ubuntu revealed that the system has automatically updated libcuda, which presumably required a restart to continue functioning correctly. I've since disabled those updates in the hopes that I won't see it again.Plop
@john had same problem, reboot worked, and verified that in fact there was an automatic update, as recorded in the file you mention. thanks! would you mind sharing how to disable such updates? also, it might make sense to add this info to the current answer or a new answer.Queenstown
had same problem, reboot worked! but I can't find /var/log/apt/history.log. I'm using centOS, where is this file?Fool
Unfortunately this is not a permanent solution. The problem might reappear. The solution is to install an newer version of the nvidia package (nvidia-390). See my answer belowAlek
Wanted to add this worked for me on NVIDIA-SMI 418.39, Driver Version: 418.39, CUDA Version: 10.1 (though we load cuda 10 libraries for TF). We will eventually need to upgrade this driver/fw combo to the latest once Tensorflow can support cuda 10.1 properly, but for now rebooting definitely still works.Acetaldehyde
This also worked for me. Some instructions include sudo reboot now and others don't.Grantland
I rebooted and it upgraded cuda from 10.1 to 10.2 also with Ubuntu 18 my Intel graphics card is non functional.Bono
Cool! I had the same problem, I think related to nvidia driver auto update.Manana
A reboot is an unnecessary drastic measure. You just need to unload the old nvidia kernel module (and it's dependencies): sudo rmmod nvidia_drm nvidia_uvm nvidia_modeset nvidia. See answer by Comzyh.Kinder
Don't do this! I can't log into GUI anymore after reboot!Keratose
Just restart, it works for me on Ubuntu 20.04.1 & NVIDIA-SMI 450.66 & CUDA Version: 11.0 & nvidia-driver-450Melquist
Can testify too, nvidia-440.100 driver and CUDA-10.1 in /usr/local/cudaRegelation
this doesn't work on ubuntu 16.04 lts with nvidia-460 driverCoagulant
Restart can temporarily solve the problem, but it will appear again in my machineTriplett
For a permanent solution, see my answer below. Basically you need to disable the autoupdate of the nvidia packages.Wotan
I ran into this problem after apt upgrade and a reboot as described here fixed the issue.Suppletion
Same for me. Rebooting solved the problem.Suh
It's August, 2022, and, yes, rebooting solved my problem.Digged
For Ubuntu 22.04, simple sudo update, sudo full-upgrade, and restart solve the issue. None of the other solutions work as intended.Circuitous
dell.com/support/kbdoc/es-es/000133480/….Venn
I don't know why. But this worked for me.Handknit
In my case (archlinux), this issue appeared after updating nvidia-open and nvidia-utils. I had to run nvidia-modprobe and also enable nvidia resume service with systemctl enable --now nvidia-resume.service. After running these and rebooting, my installation went back to normal.Application
Rebooting works but can't install nvtopPaluas
T
493

As etal said, rebooting can solve this problem, but I think a procedure without rebooting will help.

For Chinese, check my blog -> 中文版

The error message

NVML: Driver/library version mismatch

tell us the Nvidia driver kernel module (kmod) have a wrong version, so we should unload this driver, and then load the correct version of kmod

How can we do that?

First, we should know which drivers are loaded.

lsmod | grep nvidia

You may get

nvidia_uvm            634880  8
nvidia_drm             53248  0
nvidia_modeset        790528  1 nvidia_drm
nvidia              12312576  86 nvidia_modeset,nvidia_uvm

Our final goal is to unload nvidia mod, so we should unload the module depend on nvidia:

sudo rmmod nvidia_drm
sudo rmmod nvidia_modeset
sudo rmmod nvidia_uvm

Then, unload nvidia

sudo rmmod nvidia

Troubleshooting

If you get an error like rmmod: ERROR: Module nvidia is in use, which indicates that the kernel module is in use, you should kill the process that using the kmod:

sudo lsof /dev/nvidia*

and then kill those process, then continue to unload the kmods.

Test

Confirm you successfully unload those kmods

lsmod | grep nvidia

You should get nothing. Then confirm you can load the correct driver:

nvidia-smi

You should get the correct output.

Tameka answered 26/7, 2017 at 6:33 Comment(24)
@suraj it's not just linked. the answer is well written. the only issue is he didn't disclosed his affiliation and you did it.Fatuity
This really works. The question is, if the wrong stuff is loaded at first, why does nvidia-smi load the correct ones after that? I mean, how does it know which are the correct ones?Hebetude
@Hebetude The wrong one is no longer exists on disk, but still in memory. nvidia-smi just trigger a new loading procedure I think.Tameka
Brilliant! Had no idea this was what caused the problem. So rebooting does the same thing?Riviera
@Riviera Obviously, rebooting will unload and then reload all the module.Tameka
worked but rebooting brings the problem back .. and my resolution is not right as well. It's not a clean installation at all..Astigmatic
Not worked for me. sudo rmmod nvidia_drm sudo rmmod nvidia_modeset sudo rmmod nvidia_uvm sudo rmmod nvidia lsmod | grep nvidia gives empty output but there is still same error: nvidia-smi Failed to initialize NVML: Driver/library version mismatch After error lsmod | grep nvidia gives same output as at start.Autohypnosis
It didn't work for me either, even after sudo lsof /dev/nvidia* I got rmmod: ERROR: Module nvidia is in usePallor
This solution works like a charm when there is no graphical interface used in parallel, il there is, then you need to reboot, otherwise graphical sessions will block and fail.Mastership
Worked for me on Fedora 33 after a reboot didn't solve the issue.Kenzi
After rmmod I expect that you should modprobe to get those modules back. Otherwise the drivers are not loaded. But as i know there is no easy way to do so with nvidia. rmmod resulted in all nvidia drivers uninstalled and i had to reinstall them. I would expect a reboot to fix the problem and change apt repo to avoid automatic update - this seems like the most plausible solution to me.Wotan
Great answer, worked fine for me. Thank you very much. However, do you know what could be the root cause of that error?Howdoyoudo
This worked for me and avoided a disruptive reboot. I shut down the X server with sudo init 3 in order to get around the rmmod: ERROR: Module nvidia is in use problem which is a nice option if you're working remotely.Crop
It happens to my servers occasionally, but I can't reboot my production machines. I used this instructions (rmmod), but I had to kill all processes using nvidia drivers (lsof and kill), then reload all drivers (modprobe), then restart gdm3 and gdm services (Ubuntu 20.04). It finally worked. Thanks!Television
For some reason which I haven't understood yet this didn't work for me. First, I stopped my display-manager from using nvidia, then I rmmod the modules and finally when I tried to modprobe back the modules I got modprobe: FATAL: Module nvidia_drm not found in directory /lib/modules/Inly
Worked for me with my server device (Ubuntu 16.04). Thank you.Scrofula
Unloading previous and loading new module after install worked.Grum
When I try to do sudo rmmod nvidia_drm I get rmmod: ERROR: ../libkmod/libkmod-module.c:799 kmod_module_remove_module() could not remove 'nvidia_drm': Operation not permitted rmmod: ERROR: could not remove module nvidia_drm: Operation not permitted Ephemerid
Simply rebooting did not solve my issue, but this answer did. Thank you!Unreasonable
Not working for me: $ sudo rmmod nvidia_drm rmmod: ERROR: Module nvidia_drm is in use. Check for which process: sudo lsof /dev/nvidia*: Empty output, i.e. nothing listed. $ sudo rmmod nvidia_uvm rmmod: ERROR: ../libkmod/libkmod-module.c:799 kmod_module_remove_module() could not remove 'nvidia_uvm': Operation not permitted. What did work was to go back to look at the last time new nvidia drivers were installed and uninstall them, e.g. sudo apt remove libnvidia-compute-418 libnvidia-compute-430 libnvidia-compute-520. Boom. Fixed instantly, without reboot.Ephemerid
Answer is not full, got sudo rmmod nvidia rmmod: ERROR: Module nvidia is in use by: nv_peer_memCyprinodont
Well, this crashed my box, but hey, that means I rebooted so...Cohobate
Docker containers that are using nvidia will not appear in this list. I was unable to remove the nvidia module without stopping those containers.Thisbee
As of November 2023, a simple reboot worked.Eczema
W
51

Why does the version mismatch happen and how can we prevent it from happening again?

You may find that the versions are different in these locations:

  1. dpkg -l | grep nvidia (look at nvidia-utils-xxx package version). This version is reported by NVML and is showed by running nvidia-smi.
  2. cat /proc/driver/nvidia/version (look at the version of Kernel Module, 535.146 - for example). This version is read directly from the proc filesystem, populated by the NVIDIA driver.

The restart should work, but you may want to forbid the automatic update of this package by modifying /etc/apt/sources.list.d/ files. In my experience, the best way is to simply hold the packages to prevent them from automatic updates by executing the commands below

sudo apt-mark hold nvidia-dkms-version_number
sudo apt-mark hold nvidia-driver-version_number
sudo apt-mark hold nvidia-utils-version_number

The version_number here, for example, is 535. Replace it with your desired version.

P.S.: Some content was inspired by this (the original instruction was in Chinese, so I referenced the translated version instead)

Wotan answered 15/4, 2021 at 8:39 Comment(7)
Thank you for the explanation. I still don't get why it happens though. I start from a state where everything works, I don't update any package and still get the error after a seemingly random amount of time. Would you happen to know what exactly causes the mismatch to happen?Battles
@Battles let’s assume that you didn’t update your packages. Have you used the commands (1 and 2) above to check if the versions are the same? If they are not the same then obviously one or both of them got updated somehow. And that you can try my solution (apt mark hold) or create new question with more detail if mine doesn’t help.Wotan
@Antonio that's a correct way to do, please make sure to mark the version you want to use to avoid automatic update, and unmark it when needed. Thanks for a very informative reference. I learned a thing or two!Wotan
@Wotan I just realized I forgot a "not" in my comment, so I am republishing it here: Thank you, for me what worked was running dpkg -l | grep nvidia and purge all the packages that were not from the newer versions of the driver. Some useful links askubuntu.com/questions/18804/… askubuntu.com/questions/151941/…)Insurgent
@Insurgent I see, in fact removing both older and newer packages should make it work with the right version, you can double check that the currently remaining package version would match the one in /proc/driver/nvidia/version. Please note that in the future your package may get auto updated and that's when hold command comes in handy. The LINK you copied above seems to be broken. For embedded link in comment, check this. Have a good day!Wotan
@Wotan Yep, I killed the links while copy-pasting :/ askubuntu.com/questions/151941/… askubuntu.com/questions/18804/…Insurgent
Thankyou so much. I was able to fix it. i accidentally installed a different version of nvidia-utils-xxx. It helped me fix my problem.Bename
N
40

I was having this problem, and none of the other remedies worked. The error message was opaque, but checking the output of dmesg was the key:

[   10.118255] NVRM: API mismatch: the client has the version 410.79, but
           NVRM: this kernel module has the version 384.130.  Please
           NVRM: make sure that this kernel module and all NVIDIA driver
           NVRM: components have the same version.

However, I had completely removed the 384 version, and removed any remaining kernel drivers nvidia-384*. But even after reboot, I was still getting this. Seeing this meant that the kernel was still compiled to reference 384, but it was only finding 410. So I recompiled my kernel:

uname -a # Find the kernel it's using

Linux blah 4.13.0-43-generic #48~16.04.1-Ubuntu SMP Thu May 17 12:56:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


update-initramfs -c -k 4.13.0-43-generic # Recompile it
reboot

And then it worked.

After removing 384, I still had 384 files in: /var/lib/dkms/nvidia-XXX/XXX.YY/4.13.0-43-generic/x86_64/module /lib/modules/4.13.0-43-generic/kernel/drivers

I recommend using the locate command (not installed by default) rather than searching the filesystem every time.

Nonperishable answered 24/1, 2019 at 15:6 Comment(5)
Thanks a lot! It's a good idea to use locate nvidia-smi. I used the command figuring out that another driver was installed.Autarch
sudo update-initramfs -c -k uname -r Not helped me.Autohypnosis
dmesg output: NVRM: API mismatch: the client has the version 418.67, but NVRM: this kernel module has the version 430.26. Please NVRM: make sure that this kernel module and all NVIDIA driver NVRM: components have the same version.Autohypnosis
If nvidia-smi is showing Failed to initialize NVML despite successfully installing nvidia drivers and CUDA toolkit, issue could be that an older (and compressed) kernel with older Nvidia modules loaded at the reboot instead of an kernel with updated nvidia modules. https://mcmap.net/q/74554/-how-to-fix-quot-nvrm-api-mismatch-quot-between-client-version-and-kernel-module-version-when-installing-nvidia-drivers-for-a-gtx-560-ti-in-ubuntu-20-04 has more clarity to this issue and resolved issue for me (Cent OS 7, nvidia/460.32.03, 3.10.0-957.21.3.el7.x86_64 with CUDA 11.2)Sula
Also worth looking into this post by Andrew Laidlaw on correctly building kernel-specific nvidia modules.Sula
D
37

The top-2 answers can't solve my problem. I found a solution at the Nvidia official forum solved my problem.

The below error information may be caused by installing two different versions of the driver by different approaches. For example, install Nvidia driver by APT and the official installer.

Failed to initialize NVML: Driver/library version mismatch

To solve this problem, there is only a need to execute one of the following two commands.

sudo apt-get --purge remove "*nvidia*"
sudo /usr/bin/nvidia-uninstall
Davies answered 17/7, 2019 at 14:52 Comment(7)
bash: /usr/bin/nvidia-uninstall: No such file or directoryMaidenly
It works. Sometimes the uninstall file does not exist.Triplett
I did this and now i dont have any nvidia drivers installed on my computer. have to reinstall againCoagulant
I can see how removing one of the conflicting versions can help, but the suggested solution as it stands looks carelessly destructive. I tried it anyway, but neither would even run. I recommend not following this answer.Laugh
ok but then what? Do we need to install something or what?Swedish
it worked. after uninstalling , i installed it again from additional driversFission
can you add the command to install after thisRaddy
R
20

I had the issue too (I'm running Ubuntu 18.04 (Bionic Beaver)).

What I did:

dpkg -l | grep -i nvidia

Then sudo apt-get remove --purge nvidia-381 (and every duplicate version, in my case I had 381, 384 and 387)

Then sudo ubuntu-drivers devices to list what's available.

And I choose sudo apt install nvidia-driver-430.

After that, nvidia-smi gave the correct output (no need to reboot). But I suppose you can reboot when in doubt.

I also followed this installation to reinstall cuda+cudnn.

Repp answered 11/6, 2019 at 17:7 Comment(2)
I don't know why this was marked down (-1). I incremented it to 0. The command "dpkg -l | grep -i nvidia" is valid and shows what is not deleted.Shiller
I particularly liked selective purging and then listing of available drivers.Kiker
T
16

Reboot.

If the problem still exist:

sudo rmmod nvidia_drm
sudo rmmod nvidia_modeset
sudo rmmod nvidia
nvidia-smi

For CentOS and Red Hat Enterprise Linux (RHEL):

cd /boot
mv initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
dracut -vf initramfs-$(uname -r).img $(uname -r)

Then

reboot

For Debian/Ubuntu:

update-initramfs -u

If the problem persists:

apt install -y dkms && dkms install -m nvidia -v 440.82

Change 440.82 to your actual version.

Tip: get the Nvidia driver version:

ls /usr/src

You will find the Nvidia driver directory, such as nvidia-440.82.


Also, you can remove all Nvidia packages and reinstall the driver again:

apt purge nvidia*
apt purge *cuda*

# Check
apt list -i |grep nvidia
apt list -i |grep cuda
Toein answered 8/3, 2020 at 7:18 Comment(3)
This worked for me on Centos. Do I know why? No.Rainer
I tried this for Centos too! It worked, no idea what it did though.Lohrman
in Ubuntu 22.04.4 LTS, I get an error after running sudo rmmod nvidia_drm ; rmmod: ERROR: Module nvidia_drm is in useCaprice
N
6

Mostly reboot would fix the issue on Ubuntu 18.04 (Bionic Beaver).

The “Failed to initialize NVML: Driver/library version mismatch?” error generally means the CUDA Driver is still running an older release that is incompatible with the CUDA toolkit version currently in use. Rebooting the compute nodes will generally resolve this issue.

Noh answered 12/1, 2021 at 16:48 Comment(3)
it works with ubuntu 20.0.4, nvidia-driver-470 installedFreezedrying
reboot worked for me. Strange that linux needs reboots, thought it was a 'windows' thing.Tyrrell
@NathanB even human needs reboots sometimes.Canada
A
5

This also happened to me on Ubuntu 16.04 using the nvidia-348 package (latest Nvidia version on Ubuntu 16.04).

However I could resolve the problem by installing nvidia-390 through the Proprietary GPU Drivers PPA.

So a solution to the described problem on Ubuntu 16.04 is doing this:

  • sudo add-apt-repository ppa:graphics-drivers/ppa
  • sudo apt-get update
  • sudo apt-get install nvidia-390

Note: This guide assumes a clean Ubuntu install. If you have previous drivers installed a reboot might be needed to reload all the kernel modules.

Alek answered 5/6, 2018 at 11:30 Comment(1)
This and a restart did it for me!Belittle
A
5

These answers did not work for me:

dmesg

NVRM: API mismatch: the client has the version 418.67, but
NVRM: this kernel module has the version 430.26.  Please
NVRM: make sure that this kernel module and all NVIDIA driver
NVRM: components have the same version.

Uninstall old driver 418.67 and install new driver 430.26 (download NVIDIA-Linux-x86_64-430.26.run):

sudo apt-get --purge remove "*nvidia*"
sudo /usr/bin/nvidia-uninstall
chmod +x NVIDIA-Linux-x86_64-430.26.run
sudo ./NVIDIA-Linux-x86_64-430.26.run
[ignore abort]

cat /proc/driver/nvidia/version

NVRM version: NVIDIA UNIX x86_64 Kernel Module  430.26  Tue Jun  4 17:40:52 CDT 2019
GCC version:  gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
Autohypnosis answered 29/1, 2020 at 11:33 Comment(2)
The sudo /usr/bin/nvidia-uninstall part was crucial for me. Nothing else worked!Jeroldjeroma
Had similar issue, and these commands helped fixing it after a reboot before re'installing.Dichromaticism
C
3

It doesn't work for me by rebooting or unloading the driver. I solved the problem by updating my Nvidia driver 440.33.01 to 450.80.2.

sudo apt-get install nvidia-driver-450

sudo reboot

I'm running Ubuntu 20.04 LTS (Focal Fossa), which is a remote server.

Caloric answered 21/4, 2021 at 3:15 Comment(0)
E
1

I experienced this problem after a normal kernel update on a CentOS machine. Since all CUDA and Nvidia drivers and libraries have been installed via YUM repositories, I managed to solve the issues using the following steps:

sudo yum remove nvidia-driver-*
sudo reboot
sudo yum install nvidia-driver-cuda nvidia-modprobe
sudo modprobe nvidia # Or just reboot

It made sure my kernel and my Nvidia driver were consistent. I reckon that just rebooting may result in the wrong version of the kernel module being loaded.

Emileeemili answered 4/12, 2019 at 15:2 Comment(0)
H
1

I have to restart my kernels and remove all the packages that I have installed previously (during the first installation). Please make sure to delete all the packages, even after removing packages by the command below:

sudo apt-get --purge remove "*nvidia*"

The packages, like "libtinfo6:i386", don't get removed.

I'm using Ubuntu 20.04 (Focal Fossa) and Nvidia-driver-440. For that, you have to remove all the packages shown in the below image.

List of all the packages that need to be remove:

img

As shown in the image, make sure that the package you're installing is of the correct size. That is 207  MB for Nvidia-driver-440. If it's less, it means you haven't removed all the packages.

Hydrology answered 20/6, 2020 at 11:14 Comment(1)
Please review Should we edit a question to transcribe code from an image to text? and Why not upload images of code/errors when asking a question? (e.g., "Images should only be used to illustrate problems that can't be made clear in any other way, such as to provide screenshots of a user interface.") and take the appropriate action (it covers answers as well). Thanks in advance.Eupatrid
C
0

I had reinstalled the Nvidia driver: run these commands in root mode:

  1. systemctl isolate multi-user.target

  2. modprobe -r nvidia-drm

  3. Reinstall the Nvidia driver: chmod +x NVIDIA-Linux-x86_64–410.57.run

  4. systemctl start graphical.target

And finally check nvidia-smi

Thanks to:

Cotonou answered 26/10, 2019 at 6:18 Comment(0)
B
0

I committed the container into a Docker image. Then I recreated another container using this Docker image and the problem was gone.

Bretbretagne answered 12/12, 2019 at 21:29 Comment(0)
F
0

For completeness, I ran into this issue as well. In my case it turned out that because I had set Clang as my default compiler (using update-alternatives), nvidia-driver-440 failed to compile (check /var/crash/) even though apt didn't post any warnings. For me, the solution was to apt purge nvidia-*, set cc back to use gcc, reboot, and reinstall nvidia-driver-440.

Feldt answered 29/6, 2020 at 0:5 Comment(0)
D
0

First I installed the Nvidia driver.

Next I installed CUDA.

After that, I got the "Driver/library version mismatch" error, but I could see the CUDA version, so I purged the Nvidia driver and reinstalled it.

Then it worked correctly.

Dozier answered 28/1, 2021 at 15:37 Comment(0)
A
0

There is an easier solution that worked for me. On Fedora 33, try the following:

rpm -qa | grep -i nvidia | grep f32

You should have two packages listed from the previous version of Fedora for OpenGL. Remove those and reboot.

Deleting and reinstalling the entire Nvidia package set is overkill.

Airla answered 17/3, 2021 at 15:22 Comment(0)
M
-2

I was facing the same problem and I'm posting my solution here.

In my case, the NVRM version was 440.100 and the driver version was 460.32.03. My driver was updated by sudo apt install caffe-cuda and I didn't notice at that time, but I checked it from /var/log/apt/history.log.

By following my NVRM version, I just used sudo apt install nvidia-driver-440, but it installed 450.102. I don't know why it installed another version and nvidia-smi is showing 450.102.04.

Anyhow, after rebooting my PC, everything is working fine now. After reinstalling the driver, still my CUDA is working fine.

I didn't remove/purge anything related to the Nvidia driver. Version 460.32.03 was uninstalled automatically by running sudo apt install nvidia-driver-440.

Michaelmichaela answered 30/3, 2021 at 2:28 Comment(1)
Because the issue was closed, I can't post the solution here. But for me the fix was different. See here: https://mcmap.net/q/74554/-how-to-fix-quot-nvrm-api-mismatch-quot-between-client-version-and-kernel-module-version-when-installing-nvidia-drivers-for-a-gtx-560-ti-in-ubuntu-20-04Burgeon

© 2022 - 2024 — McMap. All rights reserved.