Hey! I can’t seem to get the NVIDIA driver on my Ubuntu machine to work. This happened after installing the 6.0 kernel, through Ubuntu Mainline. I’m back at 5.19.11, but can’t install the nvidia driver. I’ve tried many proposed things, but always with the same result. This is the output I get running sudo apt install nvidia-driver-515
:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nvidia-driver-515 is already the newest version (515.76-0ubuntu0.22.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up nvidia-dkms-515 (515.76-0ubuntu0.22.04.1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Removing old nvidia-515.76 DKMS files...
Deleting module nvidia-515.76 completely from the DKMS tree.
Loading new nvidia-515.76 DKMS files...
Building for 5.19.11-051911-generic
Building for architecture x86_64
Building initial module for 5.19.11-051911-generic
ERROR (dkms apport): kernel package linux-headers-5.19.11-051911-generic is not
supported
Error! Bad return status for module build on kernel: 5.19.11-051911-generic (x86
_64)
Consult /var/lib/dkms/nvidia/515.76/build/make.log for more information.
dpkg: error processing package nvidia-dkms-515 (--configure):
installed nvidia-dkms-515 package post-installation script subprocess returned
error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-515:
nvidia-driver-515 depends on nvidia-dkms-515 (<= 515.76-1); however:
Package nvidia-dkms-515 is not configured yet.
nvidia-driver-515 depends on nvidia-dkms-515 (>= 515.76); however:
Package nvidia-dkms-515 is not configured yet.
dpkg: error processing package nvidia-driver-515 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup erro
r from a previous failure.
Processing triggers for initramfs-tools (0.140ubuntu13
) ...
update-initramfs: Generating /boot/initrd.img-5.19.11-051911-generic
Errors were encountered while processing:
nvidia-dkms-515
nvidia-driver-515
E: Sub-process /usr/bin/dpkg returned an error code (1)
OS: Ubuntu 22.04.1 LTS
Laptop: Lenovo Legion S7 15ACH6
GPU: Geforce RTX 3060
CPU: AMD Ryzen 7 5800h
Thanks for any help!
Here it is
make.log (36.0 KB)
The kernel was compiled with gcc 12.2 so the headers are incompatible. Please use the liquorix ppa get get a compatible kernel.
I installed nvidia 515, but it gave the same error (I think) for the 6.0 kernel and won’t work with that.
But, it is working with kernel 5.19, which seems to also be built with gcc 12.2 . The make.log says that the kernel was built with 12.1.0, but cat /proc/version says 12.2.0 so I don’t know why it would work with one but not the other for me if gcc being version 11 is important. nvidia 520 doesn’t seem to work with either.
Is there a place where I can find the 520 nvidia driver built with a current gcc version so it will work with an up to date kernel?
nvidia driver 515.76
$ cat /proc/version
Linux version 5.19.5-051905-generic (kernel@kathleen) (x86_64-linux-gnu-gcc (Ubuntu 12.2.0-1ubuntu1) 12.2.0, GNU ld (GNU Binutils for Ubuntu) 2.39) #202208291036 SMP PREEMPT_DYNAMIC Mon Aug 29 10:47:31 UTC 2022
Hi @generix,
I am facing a similar problem to this thread and would appreciate if you can help me solve it. I want to install the nvidia driver but I receive this error
update-initramfs: Generating /boot/initrd.img-6.5.0-17-generic
Errors were encountered while processing:
nvidia-dkms-515
nvidia-driver-515
E: Sub-process /usr/bin/dpkg returned an error code (1)
if I run: sudo dpkg --configure -a
I get this issue:
Setting up nvidia-dkms-515 (515.105.01-0ubuntu1) …
update-initramfs: deferring update (trigger activated)
A modprobe blacklist file has been created at /etc/modprobe.d to prevent Nouveau
from loading. This can be reverted by deleting the following file:
/etc/modprobe.d/nvidia-graphics-drivers.conf
A new initrd image has also been created. To revert, please regenerate your
initrd by running the following command after deleting the modprobe.d file:
/usr/sbin/initramfs -u
*** Reboot your computer and verify that the NVIDIA graphics driver can ***
*** be loaded. ***
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Removing old nvidia-515.105.01 DKMS files…
Deleting module nvidia-515.105.01 completely from the DKMS tree.
Loading new nvidia-515.105.01 DKMS files…
Building for 6.5.0-17-generic
Building for architecture x86_64
Building initial module for 6.5.0-17-generic
ERROR: Cannot create report: [Errno 17] File exists: ‘/var/crash/nvidia-dkms-515.0.crash’
Error! Bad return status for module build on kernel: 6.5.0-17-generic (x86_64)
Consult /var/lib/dkms/nvidia/515.105.01/build/make.log for more information.
dpkg: error processing package nvidia-dkms-515 (–configure):
installed nvidia-dkms-515 package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-515:
nvidia-driver-515 depends on nvidia-dkms-515 (= 515.105.01-0ubuntu1); however:
Package nvidia-dkms-515 is not configured yet.
I am new to linux and working with gpu is needed… at first I was trying to install cuda 118 but it was conflicting with another version that was not probably uninstalled. After going through many trials and solutions I think managed to clean all installations and I installed nvidia driver (the recommended was nvidia-driver-470) and then followed the steps on the official website to install cuda 11.8
after installing cuda11-8 I found the nvidia drivers were deleted and reverted back to the novoeu version and I am undable to install any nvidia version since
I also attached the make.log file in case it helps… thanks in advance
make.log (137.5 KB)
Well my problem is now fixed…for anyone if it helps
I tried to unistall and reinstall again a different version of nvidia …removed nvidia 515 and replaced it with 535 version.
what I used were these commands
sudo apt update
sudo apt install nvidia-driver-535
sudo apt update
sudo apt install libnvidia-common-515 libnvidia-gl-515 nvidia-driver-515
I am not sure what was the problem but it is working now when I check with
nvidia-smi or nvcc --version
both return the expected output of nvidia driver and cuda version
And Using torch is going well also
However I am unaware of the status of the nvidia-dkms-<version_number> package or whether this issue will appear again
1 Like