Fix a Black Screen After Installing NVIDIA Drivers on Linux

Quick fix

Get a text console with Ctrl+Alt+F3 (or boot once with nomodeset, see below), log in, and check whether the NVIDIA module is loaded. On Ubuntu the most reliable repair is to remove every NVIDIA package and let ubuntu-drivers pick the right, signed driver:

nvidia-smi
mokutil --sb-state
sudo apt purge '^nvidia-.*' '^libnvidia-.*'
sudo apt autoremove
sudo ubuntu-drivers install
sudo reboot

Fedora, Arch and openSUSE commands are in the fix by distro section.

Symptoms: which black screen do you have?

"Black screen" covers several different failures. Knowing which one you have saves time:

What you seeMost likely cause
Black screen with a mouse cursor, or a blinking underscore, where the login screen should beNVIDIA module failed to load (Secure Boot, DKMS build failure) or display manager crashed
Stuck at the distro logo or the firmware logo foreverKernel mode setting hand-off failed; nouveau and nvidia fighting; initramfs missing the module
Login screen appears, you type the password, screen goes black and returns to loginLogin loop: broken session, user config, or Wayland session cannot start on the driver
Laptop screen black, external monitor works (or the reverse)Hybrid graphics (Optimus) / PRIME configuration
Worked yesterday, black after a kernel updateModule not rebuilt for the new kernel (DKMS/akmods)
Black screen only after resume from suspendDriver power management; see the suspend notes below

Step 1: Get to a terminal

Option A: switch to a text console

Press Ctrl+Alt+F3. Try F2 through F6 if F3 shows nothing. Log in with your username and password (nothing is echoed while you type the password). If you get a prompt, skip to Step 2.

Option B: boot once with nomodeset

nomodeset tells the kernel not to load graphics drivers that set the display mode, so the system falls back to a basic framebuffer. It is a temporary way in, not a fix.

  1. Reboot. On the GRUB menu, highlight your normal entry. If you never see the menu, hold Shift (BIOS) or tap Esc (UEFI) right after the firmware logo.
  2. Press e to edit the entry.
  3. Find the line starting with linux and add nomodeset at the end, after quiet splash.
  4. Press Ctrl+X or F10 to boot. The change is not saved.

The full procedure for every bootloader is in how to set kernel boot parameters.

Option C: recovery mode or a multi-user target

On Ubuntu, choose Advanced options for Ubuntu → an entry ending in (recovery mode) → root. On any distro you can instead append systemd.unit=multi-user.target to the linux line to boot to a text login without starting the graphical session. If the system drops into a maintenance shell instead, see "You are in emergency mode".

Remote option

If SSH is enabled on the machine, logging in from another computer is often the easiest way to work, because you can copy and paste commands.

Step 2: Diagnose why the driver is not working

Is the NVIDIA module loaded?

nvidia-smi
lsmod | grep -E 'nvidia|nouveau'
lspci -k | grep -A3 -E 'VGA|3D'

Example output of a failed load:

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

01:00.0 VGA compatible controller: NVIDIA Corporation AD106 [GeForce RTX 4060 Ti] (rev a1)
	Subsystem: ...
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

The lspci output lists the modules that could drive the card. What matters is the line Kernel driver in use:. If it is missing, no driver claimed the GPU. If it says nouveau, the open-source driver is still in charge and the NVIDIA module never loaded.

Is Secure Boot blocking it?

mokutil --sb-state
sudo dmesg | grep -i -E 'nvidia|secure boot|lockdown|module verification'

Example output:

SecureBoot enabled
Loading of unsigned module is rejected
modprobe: ERROR: could not insert 'nvidia': Key was rejected by service

Key was rejected by service means the kernel refused a module that is not signed with a key it trusts. Jump to Cause 1.

Was the module built for the running kernel?

uname -r
dkms status
modinfo -F version nvidia

Example output:

7.0.0-15-generic
nvidia/580.95.05, 6.17.0-8-generic, x86_64: installed

Here the module exists only for an older kernel, so the new kernel boots without it. modinfo: ERROR: Module nvidia not found means the same thing. See Cause 2.

What did the graphical session log?

journalctl -b -1 -p err
journalctl -b -1 | grep -i -E 'nvidia|gdm|sddm|drm'
cat /proc/driver/nvidia/version

-b -1 shows the previous boot, which is the one that went black if you rebooted with nomodeset. Look for lines such as NVRM: The NVIDIA GPU ... is not supported by the NVIDIA open kernel modules, NVRM: API mismatch, or GDM/SDDM failing to start a session.

Causes and fixes, most common first

Cause 1: Secure Boot rejected the unsigned module

With Secure Boot on, every kernel module must be signed by a trusted key. Locally built NVIDIA modules (DKMS, akmods) are signed with a Machine Owner Key (MOK) that you must enroll once. If you skipped or missed the blue MOK management screen after installing, the module is rejected on every boot.

On Ubuntu, re-import the key DKMS created and reboot:

sudo mokutil --import /var/lib/shim-signed/mok/MOK.der
# choose a one-time password, then
sudo reboot

On reboot the blue MOK manager appears. Choose Enroll MOK → Continue → Yes, type the password you chose and reboot. Check with mokutil --list-enrolled afterwards. Fedora uses a different key path; see Fedora below. Ubuntu can also install pre-signed modules (linux-modules-nvidia-* packages) that need no MOK at all, which is another reason to let ubuntu-drivers choose.

Don't just disable Secure Boot

Turning Secure Boot off in the firmware makes the module load, but it removes a real protection against boot-level malware. Enrolling the key takes two minutes and keeps it on.

Cause 2: the module was not built for your kernel

After a kernel update, DKMS (Ubuntu, Debian, Arch -dkms packages) or akmods (Fedora) must compile the module for the new kernel. If headers were missing or the build failed, the new kernel has no NVIDIA module. Quick test: boot the previous kernel from Advanced options in GRUB. If that works, rebuild:

# Ubuntu / Debian / Mint
sudo apt install linux-headers-$(uname -r)
sudo dkms autoinstall
# Fedora
sudo akmods --force
sudo dracut --force

If dkms autoinstall prints a compiler error, the driver branch may be too old for a brand new kernel. Install a newer branch from your distro or stay on the older kernel until a fixed driver arrives. The build log is under /var/lib/dkms/nvidia/.

Cause 3: the driver branch does not support your GPU

Current drivers default to the open kernel modules, which support Turing (RTX 20, GTX 16) and newer only. On a Pascal (GTX 10), Maxwell (GTX 900/750) or Volta card the open module loads and then refuses the GPU, giving a black screen. Those cards need the legacy proprietary 580 branch, which is the last one that supports them, or nouveau. Find your GPU generation with:

lspci -nn | grep -i nvidia

On Ubuntu, ubuntu-drivers list only shows branches that support your card. Kepler and older cards are not supported by any maintained proprietary branch on current kernels; use nouveau.

Cause 4: nouveau is still loading

Distro packages blacklist nouveau automatically, but a stale initramfs can still load it before the NVIDIA module. Blacklist it explicitly and rebuild the initramfs:

printf 'blacklist nouveau\noptions nouveau modeset=0\n' | sudo tee /etc/modprobe.d/blacklist-nouveau.conf
# Ubuntu 24.04 / Debian / Mint
sudo update-initramfs -u
# Fedora, openSUSE, and releases that use Dracut such as Ubuntu 26.04
sudo dracut --force
# Arch
sudo mkinitcpio -P

Cause 5: kernel mode setting not enabled (Wayland, login loop)

Wayland compositors need the NVIDIA DRM module to run with kernel mode setting. Recent driver branches enable it by default; older setups needed nvidia-drm.modeset=1 on the kernel command line. GNOME 50 on Ubuntu 26.04 and Fedora 44 has no X11 session to fall back to, so a missing modeset shows as a login loop or black screen. Check:

cat /sys/module/nvidia_drm/parameters/modeset

Y is correct. If it prints N, add nvidia-drm.modeset=1 permanently as described in kernel parameters. Background on why this matters is in Wayland vs X11.

Cause 6: hybrid graphics (laptops)

On Optimus laptops the internal panel is usually wired to the Intel or AMD iGPU, while HDMI ports may be wired to the NVIDIA GPU. A wrong PRIME mode can leave one screen black. On Ubuntu:

prime-select query
sudo prime-select on-demand
sudo reboot

on-demand renders on the iGPU and offloads apps to NVIDIA when asked, which is the most reliable mode. Also check the firmware setup: a "discrete only" or "MUX" setting changes which GPU drives the panel.

Cause 7: mixed installs (.run installer plus packages)

If you ever ran NVIDIA's .run installer, its files conflict with distro packages. Uninstall it first, then reinstall packages:

sudo nvidia-uninstall
# or, if that file is gone
sudo /path/to/NVIDIA-Linux-x86_64-*.run --uninstall

Clean reinstall by distro

Ubuntu and Linux Mint

sudo apt purge '^nvidia-.*' '^libnvidia-.*'
sudo apt autoremove
sudo apt update
ubuntu-drivers list
sudo ubuntu-drivers install
sudo reboot

On Mint, you can use Driver Manager instead of the last two commands. For choosing between branches, open vs proprietary modules and Secure Boot enrollment step by step, see install NVIDIA drivers on Ubuntu.

Debian 13

Enable the contrib non-free non-free-firmware components, then:

sudo apt update
sudo apt install linux-headers-amd64 nvidia-driver firmware-misc-nonfree
sudo reboot

Debian's DKMS build also creates a MOK key on Secure Boot systems; follow the enrollment prompt.

Fedora

Fedora uses RPM Fusion's akmod-nvidia, which builds the module in the background after installation. Rebooting before the build finishes is a classic cause of a black screen.

sudo dnf remove '*nvidia*'
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
# wait until this prints a version instead of an error
modinfo -F version nvidia
sudo reboot

For Secure Boot on Fedora, generate and enroll the akmods key once, then rebuild:

sudo dnf install kmodtool akmods mokutil openssl
sudo kmodgenca -a
sudo mokutil --import /etc/pki/akmods/certs/public_key.der
sudo akmods --force
sudo reboot

See the RPM Fusion NVIDIA howto for legacy branches.

Arch Linux

Current GPUs use nvidia-open (for the stock linux kernel) or nvidia-open-dkms (for linux-lts, linux-zen and custom kernels). Using the non-DKMS package with a different kernel is a common cause of a missing module.

sudo pacman -S nvidia-open nvidia-utils
# or, for non-stock kernels
sudo pacman -S nvidia-open-dkms nvidia-utils linux-lts-headers

Remove kms from the HOOKS line in /etc/mkinitcpio.conf so nouveau is not loaded early, then run sudo mkinitcpio -P. Pascal and older cards need a legacy 580 package from the AUR. Details: Arch Wiki: NVIDIA.

openSUSE

Add the NVIDIA repository (YaST → Software Repositories, or the openSUSE-repos-*-NVIDIA package on Tumbleweed and Leap 16), then let zypper pick the matching driver:

sudo zypper refresh
sudo zypper install-new-recommends

See SDB:NVIDIA drivers for current package names.

Black screen after suspend or with external monitors

If the system wakes to a black screen, make sure the NVIDIA suspend services are enabled (distro packages normally do this):

systemctl status nvidia-suspend.service nvidia-resume.service nvidia-hibernate.service
sudo systemctl enable nvidia-suspend.service nvidia-resume.service nvidia-hibernate.service

For a black external monitor, try another cable or port first (DisplayPort vs HDMI), then check whether that port is wired to the NVIDIA GPU or the iGPU on a laptop.

Last resort: go back to nouveau

If you need a working desktop now, remove the NVIDIA driver completely and boot with the open-source nouveau driver, which needs no extra packages:

# Ubuntu / Debian / Mint
sudo apt purge '^nvidia-.*' '^libnvidia-.*'
sudo rm -f /etc/modprobe.d/blacklist-nouveau.conf
sudo update-initramfs -u   # or: sudo dracut --force
sudo reboot

Remember to remove nomodeset if you made it permanent, or nouveau cannot set a display mode either. If the machine no longer reaches GRUB at all after your experiments, see fix grub rescue. Before trying another driver install, take a snapshot (Timeshift on Ubuntu/Mint, Snapper on openSUSE and Fedora Btrfs setups) so you can roll back in one step.

Frequently asked questions

Why do I get a black screen after installing NVIDIA drivers?

Usually the NVIDIA kernel module did not load: Secure Boot rejected an unsigned module, DKMS failed to build it for your kernel, or the driver branch does not support your GPU. The desktop then has no working display driver and shows nothing.

Is nomodeset a permanent fix?

No. nomodeset stops kernel graphics drivers from setting the display mode, which gets you a picture but disables proper acceleration, external monitors and Wayland on most systems. Use it only to get in and fix the driver, then remove it.

How do I get to a terminal from a black screen?

Press Ctrl+Alt+F3 (try F2 to F6) to switch to a text console and log in. If that fails, boot the Advanced options entry in GRUB and choose recovery mode, or add nomodeset to the kernel line.

Should I use the .run installer from nvidia.com?

Not on Ubuntu, Fedora or Arch. The .run installer bypasses the package manager, breaks on kernel updates and conflicts with distro packages. Use ubuntu-drivers, RPM Fusion or the Arch packages instead.

My GPU is a GTX 10-series. Which driver do I need?

Pascal (GTX 10) and older are not supported by the open kernel modules. Use the legacy proprietary 580 branch, which is the last one for Maxwell, Pascal and Volta, or the nouveau driver.

Spotted a mistake or a command that no longer works? Send a correction — pages are re-checked when reports come in.