Nvidia driver not working on Ubuntu 22.04

id flag

My Ubuntu 22.04 updated this morning (after I use a standard script using the apt command and some other stuffs to clean my home directory) and the Nvidia driver does not work anymore.

I have noticed that the kernel was updated too: 6.0.0-1007-oem and my only explanation is that it comes with something incompatible with the Nvidia driver. I came back to kernel 5.15.0-56-generic and the Nvidia driver still does not work; something is broken in my distro.

The script I mention in the comments just use the apt command plus I clean some files in my home directory: nothing revolutionary.

EDIT: inxi -SG as requested:

gaucher@mars:~$ inxi -SG 
System:   Host: mars Kernel:5.15.0-56-generic x86_64 bits: 64 Desktop: GNOME 42.5
    Distro: Ubuntu 22.04.1 LTS (Jammy Jellyfish) Graphics:   Device-1: NVIDIA TU106 [GeForce RTX 2060 SUPER] driver: N/A   Display: x11 server: X.Org v: driver: X: loaded: nouveau,vesa
    unloaded: fbdev,modesetting gpu: N/A resolution: 1024x768~76Hz   OpenGL: renderer: llvmpipe (LLVM 13.0.1 256 bits) v: 4.5 Mesa 22.0.5

The script (the part using apt; it is not easy to post with the resolution of the screen):

sudo apt update; sudo apt upgrade ;sudo apt autoremove ;sudo apt clean
vn flag

If you have problems reinstalling the correct graphics driver from the GUI, try installing it from the command line instead.

For Ubuntu 22.04, available Nvidia driver packages are listed here (be sure to have the "Restricted" repo enabled).

My default suggestion would be to start with the newest driver (at the time of posting it's nvidia-driver-525). To install this, run:

sudo apt install --reinstall nvidia-driver-525

In case of issues, reverting to the previous driver can sometimes help.

Philippe Gaucher avatar
id flag
I use this update script (which does not contain anything revolutionary) precisely because the standard way for updating from the GUI does not always update everything...
cn flag

While the @artur-meinild's answer didn't work for me, I adapted the solution from this nvidia forum thread.

I run sudo apt install linux-headers-$(uname -r) to install missing kernel headers (Idk why they weren't installed).

Now nvidia-smi works just fine

in flag

I ran into the same issue, what helped me was switching to onboard, then back to nvidia.

sudo prime-select intel
sudo prime-select nvidia
in flag

In my case installing nvidia-dkms-(DriverVersion) solved the problem:

sudo apt install nvidia-dkms-525

Thanks to @Tooster for providing link:

cm flag

Even though I did not actively update any driver, in my case it was a borked driver install, just needed to run the following:

sudo apt --fix-broken install

after this you will need to either reboot or restart x.

sudo pkill x

You should be able to login normally and screen(s) should have corrected resolution if this fixed the issue.

David avatar
cn flag
The OP says he has a kernel issue so not sure how this will help.
ls flag

The solution given by Hani Shams worked for me: There are no kernel modules installed. Please try installing the kernel headers

sudo apt install linux-headers-$(uname -r)

and then post the output of

dkms status

Reboot and good. Thanks to all who took the time to search and share.

nz flag

Yeah so if you're using the open version of the drivers I would recommend using the non open version. Docs detail the open version not having as much as the non open version.

David avatar
cn flag
As much what? This as written is not an answer.
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.