I just found out the hard way. When Debian 13 installs a new kernel and you reboot, your boot may never reach the graphical desktop. You may see no NVIDIA drivers loaded, with the nvidia-persistenced service failing.
The reason: The NVIDIA driver stack needs to be rebuilt, and before it can be rebuilt, it is also necessary to update kernel headers, which Debian may not do automatically. To wit:
apt purge nvidia* apt install dkms build-essential linux-headers-$(uname -r) apt install nvidia-open
After this, you may verify that the modules are in place:
ls /lib/modules/$(uname -r)/updates/dkms
There is a catch, though. It may not work as expected if you are still running the old kernel. If the reboot fails, try these steps from the command line in a text console in the partially booted system. (Alt-F2 switches to a working console where you can log in -- or just SSH into the system from another box.)
I should also note that $(uname -r) assumes that you already booted into the new kernel. If not, you may want to specify the kernel name, e.g., 6.12.73+deb13-amd64, explicitly.
