Kernel 6.12.x + nvidia = problems

- - 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
Texlee
Posts: 79
Joined: 2024-01-05 15:10
Has thanked: 6 times

Kernel 6.12.x + nvidia = problems

#1 Post by Texlee »

Hi, since I updated to the new kernel version 6.12.x my laptop's dedicated graphics card no longer works.
I have Debian trixie, the latest nvidia drivers 535.216.03 and an RTX 4050.
What can I do to solve this?
Thanks

:linked:

karukera21
Posts: 3
Joined: 2024-12-28 14:13

Re: Kernel 6.12.x + nvidia = problems

#2 Post by karukera21 »

Nvidia driver 535.216.03 works for me with kernel 6.11.10 on debian sid but not with kernel 6.12.x

Maybe just wait for update of nvdia driver ? A bug ?

jebez
Posts: 127
Joined: 2024-07-01 15:21
Been thanked: 2 times

Re: Kernel 6.12.x + nvidia = problems

#3 Post by jebez »

Retired of Debian, I'm on Arch Linux btw

Texlee
Posts: 79
Joined: 2024-01-05 15:10
Has thanked: 6 times

Re: Kernel 6.12.x + nvidia = problems

#4 Post by Texlee »

jebez wrote: 2024-12-29 00:36 viewtopic.php?p=813854#p813854
Are you suggesting to me that I could fix this by downloading the latest driver directly from the nvidia website?
This is something I have never done before.
What exactly should I do?
Last edited by Texlee on 2024-12-29 09:43, edited 1 time in total.

jebez
Posts: 127
Joined: 2024-07-01 15:21
Been thanked: 2 times

Re: Kernel 6.12.x + nvidia = problems

#5 Post by jebez »

nvidia-xconfig? viewtopic.php?p=813881#p813881.

What is your desktop environment?

Run NVIDIA-Linux-x86_64-*.run in the console.
It can say "Installing the NVIDIA driver while X is running is not recommended":

Code: Select all

su -

Code: Select all

init 3
init 3 stops the DE then you land to the CLI.
If KDE:

Code: Select all

su -

Code: Select all

killall kwin_wayland
then run NVIDIA-Linux-x86_64-*.run.
According to the messages of NVIDIA-Linux-x86_64-565.77.run, I had to install gcc make linux-headers-amd64 steam-installer pkg-config libglvnd-dev (steam-installer for 32-bit compatibility).
Ctrl-Alt-Del to reboot.

How I installed Debian viewtopic.php?t=159997.
Last edited by jebez on 2024-12-29 10:15, edited 1 time in total.
Retired of Debian, I'm on Arch Linux btw

Texlee
Posts: 79
Joined: 2024-01-05 15:10
Has thanked: 6 times

Re: Kernel 6.12.x + nvidia = problems

#6 Post by Texlee »

jebez wrote: 2024-12-29 09:29 nvidia-xconfig? viewtopic.php?p=813881#p813881.

What is your desktop environment?

Run NVIDIA-Linux-x86_64-*.run in the CLI.
It can say "Installing the NVIDIA driver while X is running is not recommended":

Code: Select all

su -

Code: Select all

init 3
init 3 stops the DE then you land to the CLI.
If KDE:

Code: Select all

su -

Code: Select all

killall kwin_wayland
then run NVIDIA-Linux-x86_64-*.run.
According to the messages of NVIDIA-Linux-x86_64-565.77.run, I had to install gcc make linux-headers-amd64 steam-installer pkg-config libglvnd-dev (steam-installer for 32-bit compatibility).
Ctrl-Alt-Del to reboot.

How I installed Debian viewtopic.php?t=159997.
I don't understand, do I have to modify nvidia-xconfig or install the drivers downloaded from the nVidia website?

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

Re: Kernel 6.12.x + nvidia = problems

#7 Post by @ttila »

An alternative is to use packaged Nvidia drivers from official cuda repo, they are updated until 565.57 version.

They aren't compatible with kernel 6.12.x, but applying this simple patch will make the trick. I tested them and i am running the current 6.12.6 kernel.
Regards

jebez
Posts: 127
Joined: 2024-07-01 15:21
Been thanked: 2 times

Re: Kernel 6.12.x + nvidia = problems

#8 Post by jebez »

You can try nvidia-xconfig...

I'm on NVIDIA-Linux-x86_64-565.77.run because see the paragraph Nvidia driver: viewtopic.php?t=159997.
Retired of Debian, I'm on Arch Linux btw

cartes
Posts: 8
Joined: 2023-07-24 16:26
Has thanked: 1 time

Re: Kernel 6.12.x + nvidia = problems

#9 Post by cartes »


User avatar
stevepusser
Posts: 13135
Joined: 2009-10-06 05:53
Has thanked: 56 times
Been thanked: 103 times

Re: Kernel 6.12.x + nvidia = problems

#10 Post by stevepusser »

They say just install and run nvidia-xconfig to fix the issue, or wait for a new driver. Apparently it has been reported for a while now.
MX Linux packager and developer

eamanu
Debian Developer
Debian Developer
Posts: 33
Joined: 2020-07-12 21:37
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Kernel 6.12.x + nvidia = problems

#11 Post by eamanu »

I had the same issues, I didn't found the patch before, so I opted to run kernel 6.11.


@Best_Threads

jebez
Posts: 127
Joined: 2024-07-01 15:21
Been thanked: 2 times

Re: Kernel 6.12.x + nvidia = problems

#12 Post by jebez »

@@ttila
What a discovery, I didn't know, it isn't in https://www.nvidia.com/en-us/drivers/...

How did you manage to install nvidia-driver 565.57.01-1? I tried to install Debian unstable KDE viewtopic.php?t=159997 with it without success: blinking cursor instead of SDDM.
I tried nvidia-xconfig viewtopic.php?p=813854, text & blinking cursor.

How did you patch?
Last edited by jebez on 2025-01-03 10:32, edited 1 time in total.
Retired of Debian, I'm on Arch Linux btw

lime_time
Posts: 1
Joined: 2025-01-03 09:25

Re: Kernel 6.12.x + nvidia = problems

#13 Post by lime_time »

@jebez

1. Remove old nvidia packages. According to "Uninstallation" from here: https://wiki.debian.org/NvidiaGraphicsDrivers
2. Enter rescue mode + login
3.

Code: Select all

wget "https://us.download.nvidia.com/XFree86/Linux-x86_64/565.77/NVIDIA-Linux-x86_64-565.77.run"
chmod +x NVIDIA-Linux-x86_64-565.77.run
./NVIDIA-Linux-x86_64-565.77.run

jebez
Posts: 127
Joined: 2024-07-01 15:21
Been thanked: 2 times

Re: Kernel 6.12.x + nvidia = problems

#14 Post by jebez »

Welcome!

You didn't see viewtopic.php?t=159997, I managed to install Debian unstable KDE with NVIDIA-Linux-x86_64-565.77.run.

But I said the nvidia-driver 565.57.01-1 package from https://developer.nvidia.com/cuda-downl ... eb_network, https://developer.download.nvidia.com/c ... 12/x86_64/.
Retired of Debian, I'm on Arch Linux btw

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

Re: Kernel 6.12.x + nvidia = problems

#15 Post by @ttila »

jebez wrote: 2025-01-03 09:13 @@ttila

How did you manage to install nvidia-driver 565.57.01-1? I tried to install Debian unstable KDE viewtopic.php?t=159997 with it without success: blinking cursor instead of SDDM.
I tried nvidia-xconfig viewtopic.php?p=813854, text & blinking cursor.

How did you patch?
  • Instead to run a script to install drivers, i suggest to use the official packaged cuda Debian repo.
  • Sddm is a nightmare with Nvidia driver, black screen with the arrow is a routine. I removed Sddm and i launch Lxqt from terminal, try launching Kde from a virtual console (press ctrl+alt+Fx with x=1 or 2 or 3,....etc.) but i don't know which command use to load the whole DE.
This isn't the right/elegant way to patch a file (see the patch command) but open the nvidia-drm-drv.c file and add RED LINES:

---------omissis-------------

.llseek = noop_llseek,

#if defined(FOP_UNSIGNED_OFFSET)
.fop_flags = FOP_UNSIGNED_OFFSET,
#endif

};

static const struct drm_ioctl_desc nv_drm_ioctls[] = {

---------omissis................

Then remove with dkms the old Nvidia module complied without the patch:

Code: Select all

dkms remove -m nvidia -v 565.57 -k 6.12.6
and recompile them with the patch:

Code: Select all

dkms install -m nvidia -v 565.57 -k 6.12.6
All worked for me.
Regards

jebez
Posts: 127
Joined: 2024-07-01 15:21
Been thanked: 2 times

Re: Kernel 6.12.x + nvidia = problems

#16 Post by jebez »

Thanks!

For me it's

Code: Select all

dkms remove -m nvidia -v 565.57.01 -k 6.12.6-amd64;dkms install -m nvidia -v 565.57.01 -k 6.12.6-amd64
but Wayland doesn't work: landing on SDDM, Plasma (Wayland), log, black screen few seconds then reland on SDDM.
X11 works.
What is your DE? Does Wayland work for you?

I guess I've to wait 565.77, no patch needed...
Retired of Debian, I'm on Arch Linux btw

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

Re: Kernel 6.12.x + nvidia = problems

#17 Post by @ttila »

Check ~/.local/share/sddm for sddm wayland logs.

I use Lxqt plus labwc as wayland compositor, i can load the DE without SDDM because SDDM gave to me a black screen. I think the fault is the newer Nvidia drivers because with 560 everything was working, SDDM too.
That patch is alrady included in 565.77 drivers.

Are you able to launch Plasma from virtual console with (eg.):

Code: Select all

 startplasmacompositor or kstart plasma-desktop........
or something else???
I do not use Kde

jebez
Posts: 127
Joined: 2024-07-01 15:21
Been thanked: 2 times

Re: Kernel 6.12.x + nvidia = problems

#18 Post by jebez »

Thus I posted viewtopic.php?p=814186#p814186, https://forums.developer.nvidia.com/t/w ... sed/318717.

Ctrl-Alt-F3

Code: Select all

su -

Code: Select all

init 3
Alt-F1

Code: Select all

startplasma-wayland
same: black screen few seconds.

I wait nvidia-driver 565.77.
Retired of Debian, I'm on Arch Linux btw

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

Re: Kernel 6.12.x + nvidia = problems

#19 Post by @ttila »

We won't wait too long for fresh drivers because on 7th at the CES Nvidia will present the RTX50 family.

gamingondebian
Posts: 53
Joined: 2025-01-05 01:30
Been thanked: 4 times

Re: Kernel 6.12.x + nvidia = problems

#20 Post by gamingondebian »

Hi, since I updated to the new kernel version 6.12.x my laptop's dedicated graphics card no longer works.
I have Debian trixie, the latest nvidia drivers 535.216.03 and an RTX 4050.
What can I do to solve this?
Thanks
Sometimes installing nvidia drivers via the apt package manager does not work, and this can happen for different reasons. Sometimes dkms doesn't work properly, because of version mismatches for example.

To work around this problem it's easy to use the nvidia driver installer from their website which is posted(updated) here:

https://forums.developer.nvidia.com/t/c ... ases/28500

you can use that installer to do everything you could possibly need to for nvidia, the only difference is that you'll have to manually manage it, instead of relying on apt. (for users of other operating systems that is typical behavior anyways, to manually install their own drivers)

you can use it like this for example to install it with dkms

sh nvidia.run --dkms

you can run it to see all the different options for installation like this

sh nvidia.run -A

(if dkms doesn't work then you just have to manually install it with the run file, whenever you update your kernel, takes a couple minutes)

I've done this literally hundreds of times on debian, and it works for me every time(haven't gotten dkms to work yet though)
Last edited by gamingondebian on 2025-01-05 04:38, edited 1 time in total.

Post Reply