After updating Ubuntu my Nvidia drivers stopped working. I think the kernel headers were updated. I am using Ubuntu 24.10.
When running nvidia-smi I get:
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
Running sudo apt upgrade I get:
Not upgrading:
linux-modules-nvidia-560-open-generic
Summary:
Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 1
When I try to install it with sudo apt install linux-modules-nvidia-560-open-generic it fails:
Some packages could not be installed. This may mean that
you have requested an impossible situation or, if you are using the
unstable distribution, that some required packages have not yet been
built or have not left Incoming.
The following information may help you resolve the situation:
Unsatisfied dependencies:
linux-modules-nvidia-560-open-generic : Depends on: linux-modules-nvidia-560-open-6.11.0-18-generic (= 6.11.0-18.18) but is not installable
Error: Problems cannot be corrected, you have held back broken packages.
How can I fix my drivers?
Edit: I tried all the suggested answers from Unable to correct problems, you have held broken packages and it did not fix it.