Home / Blog / GPU Repair

Linux Black Screen After Installing the NVIDIA Driver? nomodeset, Secure Boot Signing & DKMS Diagnosis Guide

GPU Repair 2026-11-24 27 minutes HK GPU Fix Editorial Team
Linux Black Screen After Installing the NVIDIA Driver? nomodeset, Secure Boot Signing & DKMS Diagnosis Guide

Key takeaway

A black screen after installing the NVIDIA driver on native Linux is usually one of four variables, not a dead card: whether the boot used nomodeset, whether Secure Boot is blocking an unsigned module, whether DKMS rebuilt the module for the current kernel, or whether the Wayland or X11 session is at fault. Four comparisons separate the four layers.

Introduction

The pattern is specific, and the timing is the first piece of evidence. Linux was installed natively on the hard drive and booted fine — perhaps slowly, perhaps at low resolution, using the open-source nouveau driver — and then the proprietary NVIDIA driver was installed. On the next boot the screen goes black, the desktop never appears, or the machine drops to a text terminal, and nvidia-smi reports no device or that the driver is not loaded. Nothing changed on the card itself between the two boots. What changed is the software chain between the kernel and the card.

That contrast is the clue, and it is also the boundary of this guide. This article is about one narrow shape: native Linux, NVIDIA discrete graphics, proprietary driver installed, black screen afterwards. It is not about a machine that never booted at all, not about a Live USB that will not start, not about WSL or Docker, and not about a card that only crashes under load in games. Each of those has its own article, and the boundary section near the end says which one.

The mechanism behind the shape is unusual enough that the most natural instincts are the wrong ones. Installing a driver package is not the same as the driver loading. On Linux the proprietary NVIDIA driver is an out-of-tree kernel module: it must be compiled for the exact kernel that is running, it must not be blocked by Secure Boot if that is enabled, and it must be rebuilt every time a new kernel is installed. The open-source nouveau driver also has to be kept out of the way first. Any one of those four links can break, and each breakage looks the same from the outside — a black screen. That is why the tests in this article are built the way they are: each one isolates one variable — a boot parameter, a signing state, a rebuild state, or a display session — and measures one outcome.

Symptom definition: what counts as this problem

This article covers one narrow shape. All of the following must be true; if any one is missing, the problem belongs somewhere else.

First, Linux is installed natively on the hard drive — not a Live USB, not WSL, not a Docker container — and the black screen, missing desktop, or "no device" message from nvidia-smi started after the proprietary NVIDIA driver was installed. The starting point is the sequence: it worked before the driver, it went black after it. That timing is itself the first evidence, and test T3 is built on exactly that kind of timing.

Second, the machine booted before the driver was installed. Before the proprietary driver, the nouveau open-source driver or basic display output reached the desktop — perhaps slowly, perhaps at low resolution, but there was a picture. If the machine never showed anything, not even the BIOS screen, that is a hardware or boot layer, not this article.

Third, the scope is an NVIDIA discrete card with the proprietary driver. AMD and Intel cards run open-source Mesa drivers, and their mechanism is completely different: there is no proprietary out-of-tree module to sign or rebuild with DKMS. Laptop Optimus dual-GPU machines are a boundary case — this article is written mainly for a desktop with a single NVIDIA card, and laptops are flagged where they differ.

Fourth, the distribution is not fixed. Ubuntu and Debian-based systems use DKMS; Fedora-based systems use akmods. The commands and package names differ, and this article gives both where they differ instead of writing one distribution's commands as the universal path. That distinction matters throughout: a guide that only shows the Ubuntu commands will mislead a Fedora reader, and vice versa.

Three shapes that look similar need to be kept apart because each is measured differently. A Live USB that works while Windows fails is the route in article #492 (cross-system comparison). nvidia-smi finding no card inside WSL is the route in article #573 (the Windows host driver and the WSL version). A card that is invisible inside a Docker container is the route in article #554 (the container runtime). This article asks a different question: on native Linux, at boot time, has the kernel module loaded, has signing blocked it, has DKMS rebuilt it, and was the right display session chosen.

Five layers of mechanism

A black screen after installing the NVIDIA driver is not one cause. It is four things acting together, and five sources agree on them: NVIDIA's official README, umatechnology.org, cloudhousetechnologies.com, a Fedora Discussion case report, and spiritualmachines.ca. The details below come from the sources listed at the end of this article.

Layer one: the boot and kernel mode-setting layer — nouveau grabs the card first, or the kernel modeset fails (a main subject of this article). Linux uses the nouveau open-source driver by default. NVIDIA's official README states that before installing the proprietary driver, nouveau should first be disabled (Chapter 8.1, "Interaction with the Nouveau Driver"). If nouveau is not kept out of the way, the proprietary driver cannot load. nomodeset is a boot parameter that tells the kernel not to do mode setting and not to load any GPU driver. If adding nomodeset gets the machine into a low-resolution desktop or a text terminal, that proves the fault is in the driver-loading layer, not in hardware initialisation. The evidence for this layer is test T1.

Layer two: the module signing layer — Secure Boot refuses an unsigned module (a main subject of this article). The proprietary driver's kernel module is compiled on the reader's own machine and is unsigned by default. With Secure Boot enabled, the kernel refuses to load an unsigned proprietary module. The RPM Fusion Howto states plainly: "Secure Boot currently blocks the kernel from loading the NVIDIA driver." A Fedora Discussion case reports the same shape from the user's side: the driver was installed, the screen went blank, nomodeset got in, and turning Secure Boot off fixed it immediately. There are two branches out of this layer, and they are not the same test: disable Secure Boot, or sign the module yourself with a Machine Owner Key (MOK) enrolment. Disabling Secure Boot is a diagnostic comparison, not a recommendation — signing is the path that keeps the security feature. The evidence for this layer is test T2.

Layer three: the module rebuilding layer — after a kernel update, DKMS has not rebuilt the module (a main subject of this article). The NVIDIA kernel module has a kernel interface layer that must be compiled specifically for each kernel — NVIDIA's official README states this in its own words: "The NVIDIA kernel module has a kernel interface layer that must be compiled specifically for each kernel." DKMS (Dynamic Kernel Module Support) exists to rebuild registered modules automatically whenever a different kernel is installed; the README says DKMS will "take care of automatically rebuilding registered kernel modules when installing a different Linux kernel." The chain breaks in three common places: the kernel headers for the running kernel are missing so DKMS cannot compile, the driver branch is too old to support the new kernel, or a compressed module file (.ko.zst) fails to load. The signature of this layer is timing: the black screen started after a kernel or system update, not immediately after the driver was installed. The evidence for this layer is test T3.

Layer four: the display server layer — the Wayland session fails while Xorg works, or the reverse (a main subject of this article). A black screen at boot, before the login screen appears, belongs to layers one to three. A machine that reaches the login screen and then goes black or flickers after logging in belongs to this layer. Wayland and Xorg sessions take different paths, and a given driver version can fail on one and work on the other. UMA Technology lists "Wayland vs Xorg" as a standalone step: when Wayland fails, switch to Xorg as the comparison. The evidence for this layer is test T4.

Layer five: the driver source layer — distribution package versus the .run installer versus a too-old branch (a boundary, not a main subject). A distribution package (for example Ubuntu's nvidia-driver-XXX) normally handles DKMS registration and nouveau disabling automatically. NVIDIA's .run installer from its website requires the reader to choose DKMS registration during installation — the README states that without registration the driver must be reinstalled manually after every kernel update. A driver branch too old for the current kernel is the same problem as layer three, seen from the installation side. This layer is handled as an auxiliary observation in the test section, not as one of the four decisive tests, because it is a choice of installation method rather than a diagnostic comparison.

The mechanism leads to one key distinction: "black screen after installing the driver" is not one cause, it is one of four variables failing — the boot parameter, the module signing, the module rebuilding, or the display session. Each variable has its own test, and each test's variable and outcome variable are different.

A note on the sources and their versions

The NVIDIA README quoted in this article was consulted in the version numbered 384.111, an older release. Its mechanism statements — the kernel interface must be compiled per kernel, nouveau must be disabled first, DKMS registration — have been stable across releases, but 384.111 must not be treated as the current version. Readers should check the current official NVIDIA README and their own distribution's documentation for the commands that apply to their kernel and driver branch. The same applies to driver branch numbers: sources record that older branches such as 390.x and 470.x do not work with newer kernels, but that statement was true as of the date it was recorded, and the reader should check the current NVIDIA release notes rather than treating any branch number as a permanent standard. Kernel log messages about refused modules also vary in wording between kernels and distributions, so this article never treats one particular log string as the only evidence — the three commands in test T2 are read together.

The four decisive tests

T1: nomodeset boot comparison — add nomodeset at GRUB, does the desktop or a TTY appear?

How to do it: at boot, press e at the GRUB menu to edit the entry (on UEFI machines, pressing Esc usually brings up the GRUB menu first; on BIOS machines, hold Shift). Find the line starting with linux, add nomodeset at the end of that line, then press Ctrl+X or F10 to boot. If the machine now reaches the desktop (at low resolution) or a text terminal — press Ctrl+Alt+F2 or F3 to reach a text login — the driver-loading layer is confirmed, and the next step is T2 or T3. If it still goes black, and even a text terminal cannot be reached, the fault is not in the driver-loading layer, and the stop point in step 7 of the diagnosis flow applies.

Two things to keep straight. First, nomodeset edited this way applies to this one boot only — pressing e does not write the change into the configuration — so it is not a fix. It only proves that "with no GPU driver loaded, the machine boots", and T2 and T3 are still needed before any conclusion is drawn. Second, this test is new to this library: the word "nomodeset" appears in no earlier article in either language, and "nouveau" appears only in article #492, in a Live USB context about the live environment defaulting to nouveau — not about a boot parameter on a native installation. Article #492's first layer varies the USB creation, Secure Boot setting, and boot mode, and measures whether the live desktop opens; T1 varies the GRUB kernel parameter and measures whether the natively installed desktop opens. Article #573 is about WSL, #554 about Docker, and #141 about Windows Safe Mode using the basic display driver — none of them is a Linux kernel parameter.

T2: Secure Boot module signing comparison — Secure Boot state plus module load state

How to do it: (a) From a text terminal, or from the desktop reached with nomodeset, open a terminal and run three commands together: mokutil --sb-state to see whether Secure Boot is on or off; lsmod | grep nvidia to see whether the nvidia module has loaded; and nvidia-smi to see whether the driver recognises the card. (b) Read the kernel messages as well: dmesg | grep -i secure or journalctl -k, looking for messages about module signing or refused loading. The exact wording varies by kernel and distribution, so no single string is the evidence — the three commands plus the log are read together. (c) Compare: Secure Boot on, module not loaded, and nvidia-smi failing points at the signing layer. Then test one of the two branches. Branch one, the diagnostic comparison: disable Secure Boot in the BIOS or UEFI settings and boot again — if nvidia-smi now works, the signing layer is confirmed. Branch two, the keep-secure path: sign the module yourself — generate a Machine Owner Key, enrol it, and sign the module (on Fedora-based systems akmods handles signing automatically; on Ubuntu-based systems the flow is DKMS plus the MOK procedure, and the two distributions' procedures differ, so follow the documentation for the distribution actually installed). If the module loads after signing, the signing layer is confirmed.

Disabling Secure Boot is a diagnostic comparison, not a recommendation. Signing is the approach that keeps the security feature. This article describes the comparison design only and does not tell the reader to disable Secure Boot permanently. The two branches must be written separately and must not be mixed into one instruction.

This test is also new in its outcome, and the overlap is stated openly: the variable (the Secure Boot switch) overlaps with the first layer of article #492, but the outcome variable is different. In #492, Secure Boot is a boot obstacle for the Live USB environment and the outcome is whether the live desktop opens; in T2 the outcome is whether the nvidia kernel module loads and whether nvidia-smi runs. The words "mokutil" and "module signing" appear in no earlier article in either language, and "DKMS" appears in none either. Of the eleven articles that mention Secure Boot, ten are in a Windows context (TPM, Windows 11 requirements, boot settings) and the only Linux one is #492's live-boot sentence.

T3: DKMS kernel update comparison — ask about timing, read dkms status, rebuild and retest

How to do it: (a) Ask about timing first. Did the black screen start immediately after installing the driver, or after a kernel or system update? Immediately after installation, use T1 and T2. After a kernel update, use this test. (b) From a text terminal or the nomodeset desktop, run uname -r to see which kernel is currently running, then run dkms status to see the state of the nvidia module. If it shows installed against the currently running kernel version, the rebuilding layer is not the problem — go back to T2 or T4. If it shows added but not installed, failed, or a kernel version that does not match the running one (the module was built for an older kernel), the DKMS chain is broken. (c) Separate the break point. Missing kernel headers: the package linux-headers-$(uname -r) is not installed, so DKMS cannot compile — install the headers and then run dkms autoinstall or reinstall the driver. Driver branch too old: the DKMS build log says the branch does not support the new kernel — the driver branch must be upgraded rather than clung to. If the rebuild succeeds and nvidia-smi works again, the DKMS layer is confirmed.

On Fedora-based systems the equivalent tool is akmods rather than DKMS: akmods --force rebuilds the module, and akmods rebuilds and signs automatically when a new kernel is installed. The two tools do the same job — automatically rebuilding the module after a kernel update — but their commands differ, and this article must not present DKMS as the only tool.

This test is new: "DKMS", "dkms", "kernel module", and "Linux kernel update" appear in no earlier article in either language. Article #492 is about a Live USB, and a live environment starts clean on every boot, so it has no "kernel update" variable at all. Article #573 mentions a WSL kernel version threshold, which is a version number, not a DKMS rebuild. Article #554 compares driver versions against container CUDA versions and says nothing about kernel module rebuilding.

T4: Wayland versus X11 session comparison — switch sessions at the login screen

How to do it: if the machine reaches the login screen, use the session menu — the gear icon at the bottom right of the GDM login screen, or the session menu of another display manager — to switch from a Wayland session (for example "Ubuntu" or "GNOME") to an Xorg session (for example "Ubuntu on Xorg" or "GNOME on Xorg"), log in, and test again. If Xorg reaches the desktop while Wayland goes black or flickers, the display server layer is confirmed. If both sessions go black, the fault is not in the display server layer — go back to T1–T3. This test only applies to the shape "reaches the login screen, then goes black or flickers after logging in". If the screen is already black at boot, before any login screen appears, this is not the test to run — run T1.

Session names vary by distribution and desktop environment, so readers should go by the options on their own login screen rather than a fixed click path written here.

This test is new: "Wayland" and "Xorg" appear in no earlier article in either language. "X11" appears in nine Chinese articles, but every one of them is the substring "DX11" in a DirectX 11 context — read and verified, none of them is the Linux X11 display server. Article #492 checks the driver in a live environment with glxinfo and says nothing about switching sessions; article #240 is about the Windows desktop compositor.

Auxiliary observations (not counted among the four tests)

  • Reinstall the distribution package. sudo apt purge nvidia-* to clear the old driver, then install the driver the distribution recommends — ubuntu-drivers devices shows the recommended version. Deliberately not counted as a fifth test: it is a cleanup and reinstall step, not a diagnostic comparison. If it works, it does not say which variable was fixed.
  • Boot an older kernel. In GRUB, choose Advanced options and boot the previous kernel. If the black screen disappears, that points at the layer T3 covers. Deliberately not counted: it varies the same variable as T3 (the kernel version) and is only a quicker version of T3, not an independent variable.
  • Check the nouveau blacklist. Look in /etc/modprobe.d/ for a nouveau blacklist file, and run lsmod | grep nouveau to see whether nouveau has loaded. Deliberately not counted: it is a prerequisite check for T1, not an independent comparison.

Seven-step diagnosis flow

  1. Qualify the shape. Note the timing: black immediately after installing the driver, or only after a kernel update? Can the login screen be reached? What does nvidia-smi report from a text terminal? Already black at boot, before any login screen — go to step 2. Reaches the login screen, then goes black or flickers after logging in — go to step 5.
  2. nomodeset boot comparison (T1). Add nomodeset at GRUB and boot. Reaches the desktop or a text terminal — the driver-loading layer; go to step 3. Still black, not even a text terminal — not the driver-loading layer; go to step 7 and stop.
  3. Secure Boot signing comparison (T2). Read mokutil --sb-state, lsmod | grep nvidia, and nvidia-smi together. Secure Boot on and the module not loaded — disable Secure Boot and retest, or sign the module and retest. Works again — the signing layer is confirmed, done. Not a signing problem — go to step 4.
  4. DKMS kernel update comparison (T3). Ask about timing and read dkms status. Black after a kernel update and the module state is not installed — install the kernel headers and rebuild, or upgrade the driver branch. Rebuild succeeds and nvidia-smi works again — the DKMS layer is confirmed, done. Not a DKMS problem — go to step 5.
  5. Wayland versus Xorg session comparison (T4). At the login screen, switch to the Xorg session. Reaches the desktop — the display server layer is confirmed, done. Both sessions go black — not the display server layer; re-check steps 2–4.
  6. Rule out the other layers. A laptop with Optimus dual graphics — check nvidia-prime and prime-run as in article #492, and the assignment layer in article #150. A Live USB that works while Windows fails — the cross-system comparison in article #492. A WSL or Docker shape — articles #573 and #554. None of those — go to step 7.
  7. Stop. All four tests done and still no separation: write down the distribution and version, the kernel version (uname -r), the driver version, the full dkms status output, the mokutil --sb-state result, the full nvidia-smi error text, and which session fails — seven items — and bring them to a check. Do not keep reinstalling the driver or reinstalling the system one item at a time: reinstalling will not change a module signing problem or a broken DKMS chain.

Boundary cases: what this article is not

SituationWhich route to takeWhy it is not this article
Live USB works, Windows fails (cross-system comparison)Article #492Only the operating system changes, same machine and same card; this article is about the native Linux installation's own driver loading
nvidia-smi finds no card inside WSLArticle #573The WSL driver is installed on the Windows side and no Linux driver may be installed inside WSL; this article is about native Linux installing a driver
Card not found inside a Docker containerArticle #554Container runtime and Container Toolkit layer; this article is about native Linux booting
Virtual machine passthrough does not recognise the card, or Code 43Article #204IOMMU isolation and driver binding layer; this article is about a native installation
Screen works at boot, goes black on entering Windows (Safe Mode has a picture)Article #141Windows Safe Mode and basic display driver layer; this article is about Linux kernel parameters
AMD or Intel card with the open-source Mesa driver failsMesa and distribution documentationOpen-source driver mechanism is different, with no proprietary module signing or DKMS layer
Laptop Optimus tests the wrong card (running on the integrated GPU)Article #492 second layer and article #150nvidia-prime and prime-run check layer; this article is written mainly for a desktop with a single discrete card
Driver installed, then crashes only while gaming, fine otherwiseArticles #147 and #466Load, TDR, and VRAM layer; this article's entry point is a black screen at boot or a module that has not loaded

Six common misconceptions

  1. "Installing the driver means the driver has loaded." Wrong. The proprietary driver is an out-of-tree kernel module that must pass three gates — compile, sign, and load — before it counts. Only nvidia-smi working proves it has loaded; the package being installed does not.
  2. "A black screen means the card is dead." Wrong. Run T1 first — if nomodeset reaches the desktop, the fault is in the driver-loading layer, not dead hardware. Only when not even a text terminal can be reached should the hardware or boot layer be considered.
  3. "Secure Boot must be turned off." Wrong. Disabling Secure Boot is only a diagnostic comparison; signing the module with MOK is the approach that keeps the security feature. A comparison must not be written as a recommendation.
  4. "Reinstalling the driver fixes everything." Wrong. Reinstalling will not fix a signing problem (the module is still unsigned) and will not fix a broken DKMS chain (the headers are still missing). Locate the layer with T2 and T3 first; do not reinstall blindly.
  5. "After a kernel update the screen went black, so the new kernel is broken." Wrong. Most of the time DKMS simply has not rebuilt the module. Booting the older kernel and getting a picture immediately is the evidence — the problem follows the module, not the kernel.
  6. "Wayland and Xorg are the same display." Wrong. The two sessions take different paths, and a given driver version can fail on one and work on the other. If the black screen only appears after logging in, T4 must separate them; the driver cannot be declared broken directly.

Prevention

The failures in this article are mostly repeatable, which means most of them are preventable. Before installing a driver, note the kernel version (uname -r) and the driver version, and check the current NVIDIA release notes for whether that branch supports that kernel. Install the driver from the distribution's package where possible, so that DKMS registration and nouveau handling are done by the package rather than by hand; if the .run installer is used, choose DKMS registration during installation, or the driver will need manual reinstalling after every kernel update. Before a kernel update, check that the kernel headers for the new kernel are installed — a missing headers package is the most common reason DKMS silently fails to rebuild. After a kernel update, run dkms status (or check akmods on Fedora) and nvidia-smi before assuming the machine will boot cleanly. And after any driver change, test both sessions if the machine offers both: a driver that works on Xorg and fails on Wayland is a session problem, not a broken card, and knowing that before the next reboot saves a round of blind reinstalling.

When to bring it in for a check

If all four tests have been run and the layer is still not separated, or if the machine cannot reach even a text terminal with nomodeset, the next step is a hands-on check rather than another round of reinstalling. Bring the seven items from step 7 — distribution and version, kernel version, driver version, the full dkms status output, the mokutil --sb-state result, the full nvidia-smi error text, and which session fails. A check follows the site's published three-tier inspection pricing of HK$400–2,800, with a quotation after the check based on the actual situation. The shop is at Room 1209, Dali Plaza, Shek Mun (石門達利廣場 1209 室); telephone 2186 8010; WhatsApp 6558 6806. There is no on-site service.

FAQ

1. The screen went black right after I installed the NVIDIA driver. What should I do first? Run T1 first: at boot, press e at the GRUB menu, add nomodeset to the end of the linux line, then press Ctrl+X or F10 to boot. If the desktop (at low resolution) or a text terminal appears, the card initialises and the fault is in the driver-loading layer, not dead hardware — go to T2 or T3. If it still goes black and not even a text terminal can be reached, the fault is not in the driver-loading layer; use the stop point in step 7. nomodeset applies to this one boot only and is not a fix: it only proves that "with no GPU driver loaded, the machine boots".

2. How do I tell whether Secure Boot is blocking the module or DKMS has not rebuilt it? Look at the timing and read the commands together. A black screen immediately after installing the driver points at T2: run mokutil --sb-state for the Secure Boot state, lsmod | grep nvidia for whether the module loaded, and nvidia-smi for whether the driver recognises the card. A black screen that started only after a kernel update points at T3: run uname -r for the running kernel and dkms status for whether the module is installed against that kernel. The two tests vary different variables and cannot stand in for each other.

3. Secure Boot is on and nvidia-smi says no device. Must I turn Secure Boot off? No. Turning Secure Boot off is one branch, and it is only a diagnostic comparison. The other branch is signing the module yourself with a Machine Owner Key (MOK) enrolment, which keeps Secure Boot working. On Fedora-based systems akmods handles signing automatically; on Ubuntu-based systems the flow is DKMS plus the MOK procedure. The two branches must not be mixed, and disabling Secure Boot must not be written as a permanent recommendation.

4. The black screen started after a kernel update, not right after installing the driver. What does that mean? The timing points at the DKMS rebuilding layer. Run uname -r and then dkms status: if the module is not installed against the running kernel, the chain is broken. The two common break points are missing kernel headers (linux-headers-$(uname -r) not installed) and a driver branch too old for the new kernel. Rebuild, and if nvidia-smi works again, the DKMS layer is confirmed.

5. I use Fedora, not Ubuntu. Do the commands in this article still apply? The comparison design applies; the tool names do not. Ubuntu and Debian-based systems use DKMS (dkms status, dkms autoinstall); Fedora-based systems use akmods (akmods --force to rebuild), which also signs modules automatically when a new kernel is installed. This article gives both where they differ and never presents one distribution's commands as the universal path.

6. I reach the login screen, but the screen goes black after I log in. Is that the same problem? No, it is a different layer. A black screen before the login screen belongs to the boot, signing, or rebuilding layers (T1–T3). A black screen after logging in belongs to the display server layer: use T4 and switch from the Wayland session to the Xorg session at the login screen. If Xorg works and Wayland does not, the display server layer is confirmed.

7. I ran all four tests and still cannot separate the layers. What next? Write down the seven items from step 7 — distribution and version, kernel version (uname -r), driver version, the full dkms status output, the mokutil --sb-state result, the full nvidia-smi error text, and which session fails — and bring them to a check. Do not keep reinstalling the driver or reinstalling the system one item at a time: reinstalling will not change a module signing problem or a broken DKMS chain.

Sources

Related Articles

Related Services

Looking for Display output repair? Explore our service guides: