I have a Lenovo Z70-80 and upgraded the Ubuntu from v20.04 to v22.04.
While upgrading, it showed downloading the latest nvidia-drivers-525 but it could not install. To note, I have
product: GM108M [GeForce 840M]
vendor: NVIDIA Corporation
Whenever I try to install the drivers using the following command:
sudo apt install nvidia-driver-525 nvidia-dkms-525
it is throwing the following error:
user@Lenovo-Z70-80:~$ sudo apt install nvidia-driver-525 nvidia-dkms-525
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nvidia-dkms-525 is already the newest version (525.60.11-0ubuntu0.22.04.1).
nvidia-driver-525 is already the newest version (525.60.11-0ubuntu0.22.04.1).
0 upgraded, 0 newly installed, 0 to remove and 3 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-525 (525.60.11-0ubuntu0.22.04.1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
Removing old nvidia-525.60.11 DKMS files...
Deleting module nvidia-525.60.11 completely from the DKMS tree.
Loading new nvidia-525.60.11 DKMS files...
Building for 5.15.0-56-generic
Building for architecture x86_64
Building initial module for 5.15.0-56-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-kernel-source-525.0.crash'
Error! Bad return status for module build on kernel: 5.15.0-56-generic (x86_64)
Consult /var/lib/dkms/nvidia/525.60.11/build/make.log for more information.
dpkg: error processing package nvidia-dkms-525 (--configure):
installed nvidia-dkms-525 package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-525:
nvidia-driver-525 depends on nvidia-dkms-525 (<= 525.60.11-1); however:
Package nvidia-dkms-525 is not configured yet.
nvidia-driver-525 depends on nvidia-dkms-525 (>= 525.60.11); however:
Package nvidia-dkms-525 is not configured yet.
dpkg: error processing package nvidia-driver-525 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for initramfs-tools (0.140ubuntu13.1) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-56-generic
I: The initramfs will attempt to resume from /dev/sda9
I: (UUID=b839824a-2800-4868-b38c-064d54ed0eb9)
I: Set the RESUME variable to override this.
Errors were encountered while processing:
nvidia-dkms-525
nvidia-driver-525
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command nvidia-smi gives the following output
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
Can anyone let me know what else can be done to get the latest drivers installed and get them working?
Thank you.