Ubuntu 20.04 : Unable to load the ‘nvidia-drm’ kernel

I failed to install the Nvidia driver using NVIDIA-Linux-x86_64-535.154.05.run on my Ubuntu 20.04 system this morning.
At the end of the installation, an error occurs:

ERROR: Unable to load the 'Nvidia-drm' kernel module.

I had installed the same NVIDIA driver before until I updated the Linux kernel from 5.4.0 to 5.15.0, now the computer cannot use GUI, only a command line is available. So I type all the information here word by word using my mobile phone. (a little inconvenient though)
This is an emergency and I hope somebody can help me.
System information

$ uname -sr
Linux 5.15.0-101-generic
$ lsb-release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

If you need more info, I will reply in real-time

Asked By: creeper12356

||

It seems that the NVIDIA driver was blacklisted for some reason, I resolved it in this way:

sudo prime-select nvidia

run

grep nvidia /etc/modprobe.d/* /lib/modprobe.d/*

to find a file containing
blacklist nvidia
and remove it,
then run

sudo update-initramfs -u

and reboot.


refs: https://forums.developer.nvidia.com/t/510-54-rtx3090-ubuntu-20-04-unable-to-load-the-nvidia-drm-kernel-module/204261/2

Answered By: creeper12356
Categories: Answers Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.