Hey everyone,
when trying to install the nvidia-driver-515 on Ubuntu 22.04 LTS I get the following error message:
update-initramfs: Generating /boot/initrd.img-5.18.16-surface
Errors were encountered while processing:
nvidia-dkms-515
nvidia-driver-515
E: Sub-process /usr/bin/dpkg returned an error code (1)
Secure boot is disabled.
Thanks in advance,
Chris
Processing: nvidia-bug-report.log.gz…
The log upload is stuck, please unzip and attach as text file.
Here’s my report
nvidia-bug-report.log (214.9 KB)
The kernel headers are not installed.
Thanks for your instant reply! I just tried to install them, but this is what i got:
chris@chris-Surface-Laptop-Studio:~$ sudo apt install linux-headers-$(uname -r)
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
linux-headers-5.18.16-surface is already the newest version (5.18.16-surface-1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
After a reboot, the error still persists
nvidia-bug-report.log (215 KB)
The kernel you’re running was built for ubuntu 20.04 with gcc 9, so there might be build problems. Please post the output of
dkms status
Looks like the dkms part didn’t get installed at all, please post the output of
dpkg -l |grep nvidia
Please install nvidia-dkms-515 manually and post any errors.
sudo apt-get install nvidia-dkms-515
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
nvidia-dkms-515
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/30,7 kB of archives.
After this operation, 139 kB of additional disk space will be used.
Selecting previously unselected package nvidia-dkms-515.
(Reading database ... 256520 files and directories currently installed.)
Preparing to unpack .../nvidia-dkms-515_515.65.01-0ubuntu0.22.04.1_amd64.deb ...
Unpacking nvidia-dkms-515 (515.65.01-0ubuntu0.22.04.1) ...
Setting up nvidia-dkms-515 (515.65.01-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
Loading new nvidia-515.65.01 DKMS files...
Building for 5.18.16-surface
Building for architecture x86_64
Building initial module for 5.18.16-surface
Secure Boot not enabled on this system.
Done.
nvidia.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.18.16-surface/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.18.16-surface/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.18.16-surface/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.18.16-surface/updates/dkms/
nvidia-peermem.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.18.16-surface/updates/dkms/
depmod…
Processing triggers for initramfs-tools (0.140ubuntu13) …
update-initramfs: Generating /boot/initrd.img-5.18.16-surface
The restart took way longer due to a failure and also the bug report only ran in --safe-mode
nvidia-bug-report.log (1.4 MB)
So I reinstalled
sudo apt-get install --reinstall linux-image-5.18.16-surface
and
sudo apt-get install --reinstall linux-headers-5.18.16-surface
nvidia-bug-report.log (209.8 KB)
On your first attempt when installing nvidia-dkms-515, the kernel modules were compiled (mostly) fine, all you needed to do was to set kernel parameter
ibt=off
to have it load. After reinstalling image and headers, the modules are gone again. Please set the kernel parameter and post the output of
dkms status
Thank you very much for your help. This one did the trick =)