Nvidia-driver-390 building for kernel failure

Any idea how I can resolve this error on an old asus laptop?

It's saying latest is installed but fails on building for the 6.8 kernel.

sudo apt install nvidia-dkms-390
[sudo] password for john:         
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nvidia-dkms-390 is already the newest version (390.157-0ubuntu0.22.04.2).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
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-390 (390.157-0ubuntu0.22.04.2) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
Removing old nvidia-390.157 DKMS files...
Deleting module nvidia-390.157 completely from the DKMS tree.
Loading new nvidia-390.157 DKMS files...
Building for 6.8.0-45-generic
Building for architecture x86_64
Building initial module for 6.8.0-45-generic
Error! Bad return status for module build on kernel: 6.8.0-45-generic (x86_64)
Consult /var/lib/dkms/nvidia/390.157/build/make.log for more information.
dpkg: error processing package nvidia-dkms-390 (--configure):
 installed nvidia-dkms-390 package post-installation script subprocess returned 
error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-390:
 nvidia-driver-390 depends on nvidia-dkms-390 (<= 390.157-1); however:
  Package nvidia-dkms-390 is not configured yet.
 nvidia-driver-390 depends on nvidia-dkms-390 (>= 390.157); however:
  Package nvidia-dkms-390 is not configured yet.

dpkg: error processing package nvidia-driver-390 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.140ubuntu13.4) ...
update-initramfs: Generating /boot/initrd.img-6.8.0-45-generic
Errors were encountered while processing:
 nvidia-dkms-390
 nvidia-driver-390

Card details:

 sudo lshw -C video
  *-display UNCLAIMED       
       description: VGA compatible controller
       product: GF116M [GeForce GT 555M/635M]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller cap_list
       configuration: latency=0
       resources: memory:da000000-dbffffff memory:c0000000-cfffffff memory:d0000000-d3ffffff ioport:d000(size=128) memory:dc000000-dc07ffff
  *-display
       description: VGA compatible controller
       product: 2nd Generation Core Processor Family Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 resolution=1600,900
       resources: irq:38 memory:dc400000-dc7fffff memory:b0000000-bfffffff ioport:e000(size=64) memory:c0000-dffff

The Problem seems to be that the 390 Nvidia Driver is too old for the 6.8 Kernel. So, you need an older one. The 5.15 Kernel for Example.

Stop press!

Found another thread here that described a similar issue and have now managed to resolve it somehow. Used a PPA for the drivers.

Thought it hadn't worked then restarted and apt upgrade successfully upgraded them

1 Like

I spoke too soon, the screen keeps freezing.

And now regretting not having taken a snapshot beforehand....

What's my best way to recover from here?

Back in 2011 when i used a GTX 485m (around the same date as your card) in my older Clevo P170HM notebook and tried linux mint 17 my screen froze alot too. I am pretty sure the nvidia drivers back then where the issue i had. You have a legacy card and your using a pretty old driver. You probably wony get the freezings fixed unless you switch to noveau driver.

1 Like

Thanks, I'll try the nouveau driver then.

Is there a way to switch without booting into the GUI?

Yes, select nouveau in the part in the screenshot posted below, it will delete the nvidia driver. It's located in the store.

Thanks, but I need to find a way of installing without booting to the desktop because of the screen freeze issue.

Managed to do it just before a random freeze occurred.

Seemed ok so far on nouveau driver