Discussion:
NVIDIA drivers issue: Bug that keeps presenting on kernel 6.1.0-21
(too old to reply)
Daniel Rodriguez
2024-06-19 01:30:01 UTC
Permalink
Hello team,

by installing NVIDIA drivers as per the guideline of Debian on Debian 12,
it shows an error as follows:

Building initial module for 6.1.0-21-amd64
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
Error! Bad return status for module build on kernel: 6.1.0-21-amd64
(x86_64)
Consult /var/lib/dkms/nvidia-current/525.147.05/build/make.log for more
information.
installed nvidia-kernel-dkms package post-installation script subprocess
returned error exit status 10
nvidia-driver depends on nvidia-kernel-dkms (= 525.147.05-7~deb12u1) |
nvidia-kernel-525.147.05 | nvidia-open-kernel-525.147.05 |
Package nvidia-kernel-dkms is not configured yet.
Package nvidia-kernel-525.147.05 is not installed.
Package nvidia-kernel-dkms which provides nvidia-kernel-525.147.05 is
not configured yet.
Package nvidia-open-kernel-525.147.05 is not installed.
Package nvidia-open-kernel-525.147.05 is not installed.
I researched about it and I found this post
<https://forums.debian.net/viewtopic.php?t=158413&sid=edb9d888040ee2a3bb2b7191c40323d4>
wherein
a person explains how to troubleshoot by enabling verbose option on dkms.
As a summary of my troubleshooting it hits the same issue. By checking out
the file /var/lib/dkms/nvidia-current/525.147.05/build/make.log as
initially the logs suggest, I found the following logs:

/bin/sh: 1: ./tools/bpf/resolve_btfids/resolve_btfids: not found
make[3]: ***
/var/lib/dkms/nvidia-current/525.147.05/build/nvidia-peermem.ko] Error 127
make[3]: *** Deleting file
'/var/lib/dkms/nvidia-current/525.147.05/build/nvidia-peermem.ko'
The post
<https://forums.debian.net/viewtopic.php?t=158413&sid=edb9d888040ee2a3bb2b7191c40323d4>
presents the bug: Debian Bug report logs - #1027306 linux-kbuild-6.0:
missing `resolve_btfids` and some scripts
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1027306>, as a reason
for the log:

/bin/sh: 1: ./tools/bpf/resolve_btfids/resolve_btfids: not found


The solution of the post
<https://forums.debian.net/viewtopic.php?t=158413&sid=edb9d888040ee2a3bb2b7191c40323d4>
to this issue is to update the kernel from 6.1.0-13 -> 6.1.0.18; however,
my kernel is a later version: 6.1.0-21-amd64, so I am stuck for solving
this issue. Do you have any idea about what may be happening and/or how to
solve it?
Anssi Saari
2024-06-20 22:10:01 UTC
Permalink
The solution of the post to this issue is to update the kernel from
6.1.0-21-amd64, so I am stuck for solving this issue. Do you have any
idea about what may be happening and/or how to solve it?
I wondered about this since I have no such issue. Then I remembered, you
need nvidia-driver from bookworm-updates.

$ uname -a
Linux rocket 6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64 GNU/Linux
$ apt policy nvidia-driver
nvidia-driver:
Installed: 525.147.05-7~deb12u1
Candidate: 525.147.05-7~deb12u1
Version table:
*** 525.147.05-7~deb12u1 500
500 https://deb.debian.org/debian bookworm-updates/non-free amd64 Packages
100 /var/lib/dpkg/status
525.147.05-4~deb12u1 500
500 https://deb.debian.org/debian bookworm/non-free amd64 Packages
Loading...