Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Debian 12 fails to install nVidia drivers

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
Martek
Posts: 19
Joined: 2024-05-03 09:50

Debian 12 fails to install nVidia drivers

#1 Post by Martek »

My first attempt at this I accidentally added the unstable section to the apt sources list. This completely broke the system so I have just installed Debian 12 again and this times followed the correct parts of the instructions. However, the following error comes up:

Code: Select all

Errors were encountered while processing:
 nvidia-kernel-dkms
 nvidia-driver
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can anyone help resolve this?

Aki
Global Moderator
Global Moderator
Posts: 3103
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 77 times
Been thanked: 419 times

Re: Debian 12 fails to install nVidia drivers

#2 Post by Aki »

Hello,

What is your installed Debian and kernel version ? You can verify with the following commands:

Code: Select all

cat /etc/debian_version
uname -a
Did you installed the kernel headers ? You can verify with the following commands:

Code: Select all

apt --installed list "linux-headers-*"
What are the nvidia kernel modules installed ? You can verify with the following command:

Code: Select all

apt --installed list "nvidia*"
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Martek
Posts: 19
Joined: 2024-05-03 09:50

Re: Debian 12 fails to install nVidia drivers

#3 Post by Martek »

Thanks but I decided to remove the nVidia card from my PC and just use the integrated GPU on my Intel CPU. I reinstalled Debian just to be sure as I hadn't started using it anyway and the install was so much simpler and just works. I stopped gaming on PC years ago and I had never bothered changing the GPU so now was a good excuse to do it.

Aki
Global Moderator
Global Moderator
Posts: 3103
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 77 times
Been thanked: 419 times

Re: Debian 12 fails to install nVidia drivers

#4 Post by Aki »

Hello,

It’s your choice, of course.

May you please run the commands I suggested and report back their output in a follow-up message ? It could be useful to other forums readers.

Please report also the model of nvidia graphics card.

Thanks.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Martek
Posts: 19
Joined: 2024-05-03 09:50

Re: Debian 12 fails to install nVidia drivers

#5 Post by Martek »

Aki wrote: 2024-05-03 21:01 What is your installed Debian and kernel version ? You can verify with the following commands:

Code: Select all

cat /etc/debian_version
uname -a

Code: Select all

12.5
Linux debian-kde 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux
Did you installed the kernel headers ? You can verify with the following commands:

Code: Select all

apt --installed list "linux-headers-*"
I did install the kernel headers but, as I said, I have now removed the GPU and reinstalled Debian over the previous install. So the clean install without nVidia GPU shows:

Code: Select all

Listing... Done
linux-headers-6.1.0-18-amd64/stable,now 6.1.76-1 amd64 [installed,automatic]
linux-headers-6.1.0-18-common/stable,now 6.1.76-1 all [installed,automatic]
What are the nvidia kernel modules installed ? You can verify with the following command:

Code: Select all

apt --installed list "nvidia*"
Again, as I said, there are now no nvidia kernel modules installed because I removed the GPU and reinstalled Debian.

User avatar
sunrat
Administrator
Administrator
Posts: 6615
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 120 times
Been thanked: 509 times

Re: Debian 12 fails to install nVidia drivers

#6 Post by sunrat »

Martek wrote: 2024-05-04 11:08

Code: Select all

12.5
Linux debian-kde 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux

Code: Select all

Listing... Done
linux-headers-6.1.0-18-amd64/stable,now 6.1.76-1 amd64 [installed,automatic]
linux-headers-6.1.0-18-common/stable,now 6.1.76-1 all [installed,automatic]
Your kernel headers should be the same version as the kernel but they are not. This would be the reason your nvidia-driver package failed to build the kernel modules. The situation is strange as the kernel and headers should update together automatically as long as you have the linux-image-amd64 and linux-headers-amd64 metapackages installed, which they should be in a standard default install.

Your negative comments (in another topic) about Nvidia devices may be appropriate for your personal experience but in no way do they reflect everyone's experience. Personally I use a GTX 970 card, 8 years old now, and it has performed admirably when using the Nvidia drivers from default stable repositories.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Martek
Posts: 19
Joined: 2024-05-03 09:50

Re: Debian 12 fails to install nVidia drivers

#7 Post by Martek »

sunrat wrote: 2024-05-04 12:36
Martek wrote: 2024-05-04 11:08

Code: Select all

12.5
Linux debian-kde 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux

Code: Select all

Listing... Done
linux-headers-6.1.0-18-amd64/stable,now 6.1.76-1 amd64 [installed,automatic]
linux-headers-6.1.0-18-common/stable,now 6.1.76-1 all [installed,automatic]
Your kernel headers should be the same version as the kernel but they are not. This would be the reason your nvidia-driver package failed to build the kernel modules. The situation is strange as the kernel and headers should update together automatically as long as you have the linux-image-amd64 and linux-headers-amd64 metapackages installed, which they should be in a standard default install.

Your negative comments (in another topic) about Nvidia devices may be appropriate for your personal experience but in no way do they reflect everyone's experience. Personally I use a GTX 970 card, 8 years old now, and it has performed admirably when using the Nvidia drivers from default stable repositories.
I totally agree but I can only comment on my experience. I think I made it clear in that topic that I was giving my experience only.

I suppose it would be worthwhile knowing why my headers are out of sync for future reference. This is a clean install and all I have done since then is a "sudo apt update" and "sudo apt upgrade"

User avatar
sunrat
Administrator
Administrator
Posts: 6615
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 120 times
Been thanked: 509 times

Re: Debian 12 fails to install nVidia drivers

#8 Post by sunrat »

Martek wrote: 2024-05-04 12:45I suppose it would be worthwhile knowing why my headers are out of sync for future reference. This is a clean install and all I have done since then is a "sudo apt update" and "sudo apt upgrade"
Show

Code: Select all

apt list -i linux-image-amd64 linux-headers-amd64
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply