[SID - UNSTABLE] Error on upgrade: nvidia-driver build error

- - ALL UNSTABLE / TESTING THREADS SHOULD BE POSTED HERE - -
This sub-forum is the dedicated area for the ongoing Unstable/Testing releases of Debian. Advanced, or Experienced User support only. Use the software, give, and take advice with caution.
Post Reply
Message
Author
HoLiC
Posts: 3
Joined: 2024-03-21 20:14
Has thanked: 1 time
Been thanked: 2 times

[SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#1 Post by HoLiC »

Hello

I'm trying to update my system but it fails upgrading nvidia-driver (535.183.01-1) package with this message:

Code: Select all

Loading new nvidia-current-535.183.01 DKMS files...
Building for 6.9.12-amd64 6.10.3-amd64
Module build for kernel 6.9.12-amd64 was skipped since the
kernel headers for this kernel do not seem to be installed.
Building initial module for 6.10.3-amd64
Error! Bad return status for module build on kernel: 6.10.3-amd64 (x86_64)
Consult /var/lib/dkms/nvidia-current/535.183.01/build/make.log for more information.
Linux Headers installed:

Code: Select all

i A linux-headers-6.10.3-amd64                             - Header files for Linux 6.10.3-amd64
My nvidia model:

Code: Select all

01:00.0 3D controller [0302]: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] [10de:1c8c] (rev a1)
Error Log:
/var/lib/dkms/nvidia-current/535.183.01/build/make.log
Error log

Any idea?
Thanks!

User avatar
sunrat
Site admin
Site admin
Posts: 7450
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 665 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#2 Post by sunrat »

It's Unstable, this happens regularly when the nvidia driver build doesn't keep up with the new kernel. It won't build for 6.10 kernels currently. You will have to keep using the 6.9 kernel until a new nvidia driver package is available.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
stevepusser
Posts: 13068
Joined: 2009-10-06 05:53
Has thanked: 50 times
Been thanked: 97 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#3 Post by stevepusser »

The 470 and 460 tesla, even the 390xx legacy, already have the backported patches from 550, though.

Code: Select all

nvidia-graphics-drivers-legacy-390xx (390.157-8) unstable; urgency=medium

  * Backport CONFIG_MITIGATION_RETPOLINE changes from 470.256.02.
  * Backport follow_pfn changes from 550.90.07 to fix kernel module build for
    Linux 6.10.
  * bug-script: Report 'apt-cache policy' (535.183.06-1).

 -- Andreas Beckmann <anbe@debian.org>  Fri, 26 Jul 2024 22:29:09 +0200
I wonder how hard it would be to adapt those patches to 535.
Last edited by stevepusser on 2024-08-12 07:17, edited 1 time in total.
MX Linux packager and developer

User avatar
sunrat
Site admin
Site admin
Posts: 7450
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 665 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#4 Post by sunrat »

stevepusser wrote: 2024-08-10 22:47 The 470 and 460 tesla, even the 390xx legacy, already have the backported patches from 555, though.

Code: Select all

nvidia-graphics-drivers-legacy-390xx (390.157-8) unstable; urgency=medium

  * Backport CONFIG_MITIGATION_RETPOLINE changes from 470.256.02.
  * Backport follow_pfn changes from 550.90.07 to fix kernel module build for
    Linux 6.10.
  * bug-script: Report 'apt-cache policy' (535.183.06-1).

 -- Andreas Beckmann <anbe@debian.org>  Fri, 26 Jul 2024 22:29:09 +0200
I wonder how hard it would be to adapt those patches to 535.
@stevepusser towo has done it already for siduction - https://packages.siduction.org/fixes/po ... s-drivers/ although it's 535.104.5 not the current 535.183.06
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Tas_Mania
Posts: 2
Joined: 2024-06-21 00:41
Has thanked: 3 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#5 Post by Tas_Mania »

I'm using testing (Trixie)
How does one know when a nvidia driver is available for kernel 6.10.3? Does it appear on an nvidia list or a debian one?

User avatar
@ttila
Posts: 184
Joined: 2017-12-13 16:57
Has thanked: 3 times
Been thanked: 23 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#6 Post by @ttila »

I am using 560.28 on Trixie from the Nvidia cuda repo, i gave up with outdated 535.183 and the driver compiles successfully on 6.10.3.

User avatar
sunrat
Site admin
Site admin
Posts: 7450
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 665 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#7 Post by sunrat »

Tas_Mania wrote: 2024-08-11 08:55 I'm using testing (Trixie)
How does one know when a nvidia driver is available for kernel 6.10.3? Does it appear on an nvidia list or a debian one?
The situation with Testing is the same as with Unstable as in OP's case, except it will take a little longer. Driver upgrades will happen with the normal upgrade process when they become available. Don't hold your breath.

Nvidia driver issues were one of the main reasons I now happily use Stable after being on Unstable for years.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Tas_Mania
Posts: 2
Joined: 2024-06-21 00:41
Has thanked: 3 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#8 Post by Tas_Mania »

I did what @ttila did and used the Nvidia Cuda APT repository. I followed Method 2 from this page.
Also had to update linux headers with 'sudo apt install linux-headers-amd64'. Then kernel 6.10.3 completed successfully. Lucky we have the boot chooser :)
I appreciate sunrats advice - this could get tedious.

I don't install the full CUDA thing but just the one that comes with the driver. I found it's too big and add more big programs and the root partition fills up.

User avatar
stevepusser
Posts: 13068
Joined: 2009-10-06 05:53
Has thanked: 50 times
Been thanked: 97 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#9 Post by stevepusser »

sunrat wrote: 2024-08-10 23:09
stevepusser wrote: 2024-08-10 22:47 The 470 and 460 tesla, even the 390xx legacy, already have the backported patches from 555, though.

Code: Select all

nvidia-graphics-drivers-legacy-390xx (390.157-8) unstable; urgency=medium

  * Backport CONFIG_MITIGATION_RETPOLINE changes from 470.256.02.
  * Backport follow_pfn changes from 550.90.07 to fix kernel module build for
    Linux 6.10.
  * bug-script: Report 'apt-cache policy' (535.183.06-1).

 -- Andreas Beckmann <anbe@debian.org>  Fri, 26 Jul 2024 22:29:09 +0200
I wonder how hard it would be to adapt those patches to 535.
@stevepusser towo has done it already for siduction - https://packages.siduction.org/fixes/po ... s-drivers/ although it's 535.104.5 not the current 535.183.06
I couldn't find a patch in the Siduction source for it--maybe this is an LTS 535 release from Nvidia that supports the 6.10 kernel OOTB.

Code: Select all

nvidia-graphics-drivers (535.104.05-0siduction1) experimental; urgency=medium

  * New upstream release

 -- Torsten Wohlfarth <towo@siduction.org>  Tue, 29 Aug 2023 18:41:02 +0200

nvidia-graphics-drivers (535.98-0siduction1) experimental; urgency=medium

  * New upstream release.

 -- Torsten Wohlfarth <towo@siduction.org>  Thu, 17 Aug 2023 22:39:12 +0200
MX Linux packager and developer

User avatar
stevepusser
Posts: 13068
Joined: 2009-10-06 05:53
Has thanked: 50 times
Been thanked: 97 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#10 Post by stevepusser »

And now there are patched 535.183.06 and Tesla 525 drivers in Sid, so the builds should work on 6.10.
MX Linux packager and developer

User avatar
stevepusser
Posts: 13068
Joined: 2009-10-06 05:53
Has thanked: 50 times
Been thanked: 97 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#11 Post by stevepusser »

Backported and built on bookworm and bullseye bases for MX 21 and 23. ;) In our staging repository at the moment. Debian may decide to push them to Bookworm as an update anyway, like the last 535 driver.

Code: Select all

Linux dellmx23 6.10.4-2-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix 6.10-3~mx23+1 (2024-08-12) x86_64 GNU/Linux

$ nvidia-run-mx inxi -G
Graphics:
  Device-1: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile] driver: nvidia
    v: 535.183.06
  Device-2: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
    driver: amdgpu v: kernel
  Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo
  Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9 driver: X:
    loaded: amdgpu,nvidia dri: radeonsi gpu: amdgpu resolution: 1: 2560x1440
    2: N/A
  API: OpenGL v: 4.6.0 NVIDIA 535.183.06 renderer: NVIDIA GeForce RTX 3050
    Ti Laptop GPU/PCIe/SSE2
MX Linux packager and developer

TiberiusKG
Posts: 42
Joined: 2024-08-02 14:08
Has thanked: 20 times
Been thanked: 6 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#12 Post by TiberiusKG »

Had to reinstall Trixie on my laptop, and the kernel 6.10.3 has been installed in addition to 6.9.10 that is included in the netinst ISO. And when attempting to install the nVidia drivers, I have run into the same problem as the OP describes.
sunrat wrote: 2024-08-10 08:48 You will have to keep using the 6.9 kernel until a new nvidia driver package is available.
This is what I would like to do, but when I tried to get the matching kernel headers, I saw that the linux-headers-6.9.10-amd64 package is no longer available in the Trixie and Sid repositories. Is there any chance to still get this package from somewhere?

User avatar
sunrat
Site admin
Site admin
Posts: 7450
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 665 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#13 Post by sunrat »

“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
stevepusser
Posts: 13068
Joined: 2009-10-06 05:53
Has thanked: 50 times
Been thanked: 97 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#14 Post by stevepusser »

Debian should update the drivers first, then the kernel that needs them, IMHO.
MX Linux packager and developer

User avatar
sunrat
Site admin
Site admin
Posts: 7450
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 665 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#15 Post by sunrat »

stevepusser wrote: 2024-08-16 07:03 Debian should update the drivers first, then the kernel that needs them, IMHO.
That would be nice. It's generally only an issue for development versions rather than Stable though. Except for that one time a few point releases ago...
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

TiberiusKG
Posts: 42
Joined: 2024-08-02 14:08
Has thanked: 20 times
Been thanked: 6 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#16 Post by TiberiusKG »

@sunrat: In other words, no way to go back one or two notches... Yes, I have seen that thread, and it is probably the same problem that has pushed me to reinstall: after updating, there were many red lines in the boot log, and due to my blocked root account (left root password empty during install, and forgot to set one later), I could not even attempt to do something about it.

I have also looked at the driver site that wizard10000 has linked to, and since after a short glance I could not see there any time-related information, I will just trust his observation that a new driver will come soon enough. And once I will have it installed again, I will have to teach myself to use 'apt dist-upgrade' much more sparingly.

User avatar
sunrat
Site admin
Site admin
Posts: 7450
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 665 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#17 Post by sunrat »

When using Unstable or Testing with Nvidia, I would remove the linux-image-amd64 and linux-headers-amd64 metapackages to prevent automatic kernel upgrades. Then regularly check for new kernels manually. This way old kernels are not removed automatically so you can just remove any new kernel for which modules don't build and boot the earlier kernel.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

TiberiusKG
Posts: 42
Joined: 2024-08-02 14:08
Has thanked: 20 times
Been thanked: 6 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#18 Post by TiberiusKG »

Thanks, sunrat, I will definitely do this! Regarding Trixie, to which I am still quite new, I feel like I am here to stay, and I will eagerly collect any tips and techniques to to maximize the time when my machine is up and running, and not locked down by some kernel-driver mismatches... Such as now... I guess that the best that I can do while waiting for a new nVidia driver is to try to find out why my OpenGL code that runs quite fine on nVidia does not even start on nouveau, which is advertised by

Code: Select all

glxinfo | grep OpenGL
to support OpenGL 4.3... :?

TiberiusKG
Posts: 42
Joined: 2024-08-02 14:08
Has thanked: 20 times
Been thanked: 6 times

Re: [SID - UNSTABLE] Error on upgrade: nvidia-driver build error

#19 Post by TiberiusKG »

Finally! The nVidia driver version 535.183.06-1 amd64 became available (edit: for Trixie)(535.183.01-1 was the problematic one); no problems during installation, no problems during rebooting, and my OpenGL code runs again! :D
Without nVidia drivers, the problem was shader compilation failure. I have looked at the nouveau site, and it looks like nouveau is not involved in shader compilation, and probably in no OpenGL matters at all... It is the Mesa 3D Library that I may want to look at next time I run into a no-nVidia situation.

Post Reply