Skip to content

About

Install NVIDIA .run drivers on Linux without leaving your desktop

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Green Light

A Linux desktop app for installing NVIDIA drivers from the official .run files. Written in Rust with GPUI Kit, so it draws its own window and looks the same on every desktop.

I run NVIDIA's .run drivers instead of the packaged ones because the repos lag behind and I sometimes need a specific version. The usual routine for that is dropping to a TTY, stopping the display manager, running the installer blind, and hoping the desktop comes back. This app skips all of that. It installs the new driver to disk the same way a package manager does, while the current driver keeps running. The swap happens on your next reboot and your desktop never goes down.

Screenshots

System Browse
System tab showing GPU, driver, kernel module, kernel, DKMS, Secure Boot, module signing, disk space and reboot status Browse tab showing the version list with branch labels, installed/older status, a filter and the selected version
Configure Log
Configure tab showing the selected driver, pre-install checks and install options: DKMS, kernel module and Block Distro Driver Packages Log tab showing driver query and version fetch output
About
About dialog showing the app version

What it does

  • Lists every driver version on download.nvidia.com, newest first, and marks the one you're currently running
  • Labels each version's release branch from NVIDIA's own data (Production, New Feature, Older Production, or Legacy); without that data it shows no labels
  • Downloads and verifies against NVIDIA's published SHA256 sums. If the checksum can't be fetched it offers to retry; installing unverified is offered only when NVIDIA publishes none
  • Opens local .run files too, so Vulkan beta drivers or anything else you downloaded by hand work the same way
  • Shows your GPU, running driver, kernel, DKMS status, Secure Boot state, and free disk space in one place
  • Knows when a reboot is pending by comparing the kernel module on disk against the one that's loaded
  • Registers the driver with DKMS so the module rebuilds itself on kernel updates
  • Verifies the .run archive before changing anything, so a corrupt download stops the install with your current driver untouched
  • Lets you choose open or proprietary kernel modules (Automatic by default) and refuses combinations that cannot work, such as open modules on a pre-Turing GPU
  • Lists the distro driver packages the install will remove, and can block apt or dnf5 from installing the distro's NVIDIA driver over yours later
  • Signs the kernel module with your machine's existing module-signing key; Set Up Signing creates and enrolls one if you have none (see below)
  • Checks the result after install (nouveau and nova-core blacklist, initramfs, DKMS build, module signer) and shows the findings in the Log tab, with the DKMS build log tail if a build fails
  • The GUI never runs as root. Only the install script does, through polkit, and you can read every line of it in scripts/privileged-install.sh

Requirements

  • x86_64 Linux with systemd and polkit
  • Either an apt-based distro (Ubuntu, Debian, Mint) or a dnf-based distro (Fedora, RHEL, Nobara). The install script detects which one you have and uses the right package manager. Anything else, the GUI runs fine through the AppImage but the install script will refuse to run.
  • glibc 2.39 or newer, the X11 and Wayland client libraries every desktop has (libxcb, libxkbcommon), and a Vulkan or OpenGL ES (EGL) driver to draw the window with. No GTK or libadwaita is needed. If one of those is missing, Green Light names it, with the command that installs it, before it asks for a password
  • It works while the NVIDIA driver is broken or missing. The window is drawn with whatever works: the NVIDIA driver's Vulkan, or Mesa's software renderers (lavapipe for Vulkan, llvmpipe for OpenGL ES), which most desktops install by default (mesa-vulkan-drivers / libegl-mesa0 on Debian and Ubuntu, mesa-vulkan-drivers / mesa-libEGL on Fedora, vulkan-swrast / mesa on Arch). So you can still reinstall a driver after a failed update or a kernel change left the old one unloadable. With no working renderer at all, Green Light says so in a desktop dialog instead of showing nothing
  • Kernel headers and DKMS, which the script installs for you if missing (linux-headers/build-essential on apt, kernel-devel/kernel-headers on dnf)

Developed and tested on Ubuntu 26.04, GNOME on Wayland, RTX 5070, with drivers 615.78.08 and 620.70.06. Fedora support added in 2.4.0, less battle-tested than the Ubuntu path — if something's off on Fedora, open an issue.

Tested desktops: GNOME, KDE Plasma, Hyprland and COSMIC (Wayland), and X11; with the NVIDIA driver and with software rendering only (lavapipe, llvmpipe). The window is drawn the same way everywhere, so other Wayland and X11 desktops should work too. It follows your desktop's light or dark setting and, on GNOME, KDE Plasma and COSMIC, its accent colour.

Install

Download the AppImage from Releases:

chmod +x green-light-*-x86_64.AppImage
./green-light-*-x86_64.AppImage

The first launch asks for your password once so it can place the install helper at /usr/lib/green-light/, register its polkit policy and enable the boot-time restore service (green-light-recover.service). After that it starts like any other app. If you later download a newer AppImage, it detects the change and refreshes those files on its own. If that password prompt is cancelled or can't appear, the window shows a banner with the reason; restart Green Light to try again. Each release also ships a .zsync file, so AppImageUpdate can update the AppImage in place.

Using it

  1. The System tab shows your hardware and current driver state.
  2. On the Browse tab, pick a version and hit Download, or use Open .run File if you already have one.
  3. On the Configure tab, leave DKMS on, optionally turn on Block Distro Driver Packages, and hit Install Driver.
  4. Enter your password and wait a few minutes while the kernel module builds. The desktop stays up the whole time.
  5. Reboot whenever it suits you. The System tab shows Reboot Required: Yes until you do.

Module signing and Secure Boot

With Secure Boot on, the kernel only loads modules signed by a key it trusts. Green Light signs the NVIDIA module with your machine's existing module-signing key, the same one DKMS uses: the key named by mok_signing_key/mok_certificate in /etc/dkms/framework.conf (or framework.conf.d/), otherwise Ubuntu's /var/lib/shim-signed/mok/MOK.priv and MOK.der, otherwise DKMS's /var/lib/dkms/mok.key and mok.pub, otherwise Fedora's akmods key (/etc/pki/akmods/private/private_key.priv and /etc/pki/akmods/certs/public_key.der). DKMS installs are signed by DKMS while it builds the module; without DKMS, the key is passed to NVIDIA's installer. A key kept on a hardware token (pkcs11:) can only sign through DKMS, so keep DKMS on.

The Module Signing row on the System tab shows the key, whether it's enrolled, and who signed the installed module. Set Up Signing is a one-time step: it creates a key if your machine has none (update-secureboot-policy --new-key on Ubuntu, otherwise DKMS's own) and queues it for enrollment with a one-time password you choose (8 to 16 printable ASCII characters, no spaces; MOK Manager reads it with a US keyboard layout). Keys other apps have already queued for enrollment, such as a kernel-signing key, stay in the same request, so the one password enrolls them all; running setup again replaces the password. A waiting request that holds anything setup can't carry over (a hash entry, or an entry it can't read) is left alone: finish it at the next reboot, then set up again. If the new request can't be written, setup tries once more; if that fails too, the log names every key that is no longer waiting, with its SHA1 fingerprint, and you run Set Up Signing again. On the next reboot a blue MOK Manager screen appears; choose Enroll MOK and type that password. Setup doesn't touch the installed driver, so if the module on disk is unsigned, reinstall the driver once to sign it. Once the key is enrolled, the button is hidden and the Secure Boot row says signed modules will load.

Only root can read the waiting request, so setup writes the keys it queued to /var/lib/mok-pending/list, a list shared with other apps that queue keys in the same request. The System tab trusts it only while the request is unchanged since then: once the keys are enrolled at boot, or the request is replaced by other means, the list is ignored, and an enrolled key always shows as enrolled. If the EFI variables are not mounted (some chroot tools unmount them on exit), the System tab says so, and Set Up Signing mounts them before it looks at the waiting request.

Without setup, and with no key on the machine, installs work exactly as before and nothing is signed.

With Secure Boot on (and shim still checking signatures: after mokutil --disable-validation unsigned modules load, so nothing is refused), Green Light won't start an install whose module the firmware would refuse: when your machine has no signing key, the DKMS config names one that doesn't exist, the key is neither enrolled nor waiting for enrollment, or it is on a hardware token and DKMS is off. Installing would remove your distribution's signed driver and leave the next boot with no NVIDIA driver, so it stops before the password prompt and points you to Set Up Signing; nothing is changed. A key waiting for enrollment is fine: enroll it at the MOK Manager screen on that reboot. When Green Light can't read the enrollment itself (EFI variables not mounted, or mokutil missing), the install script checks again as root before changing anything and refuses the same way.

Headless servers

The GUI is optional. The install script is standalone bash and works the same on apt or dnf systems:

wget https://download.nvidia.com/XFree86/Linux-x86_64/595.84/NVIDIA-Linux-x86_64-595.84.run
wget https://download.nvidia.com/XFree86/Linux-x86_64/595.84/NVIDIA-Linux-x86_64-595.84.run.sha256sum
sha256sum -c NVIDIA-Linux-x86_64-595.84.run.sha256sum
sudo ./privileged-install.sh "$PWD/NVIDIA-Linux-x86_64-595.84.run" \
    "$(cut -d' ' -f1 NVIDIA-Linux-x86_64-595.84.run.sha256sum)" --dkms

The first two arguments are the absolute path of the .run file and its SHA256; the script verifies its own private copy against that hash before running anything. The file must be owned by root or you, and not writable by other users.

Flags:

Flag Effect
--dkms Register the module with DKMS (recommended)
--block-distro-driver Keep the package manager from installing the distribution's NVIDIA driver packages over this driver later: an apt pin on apt, an excludepkgs drop-in on dnf5 (not available with dnf4). An install without it removes the block
--kernel-module-type=open|proprietary Pick the kernel module flavor. Without it, NVIDIA's installer chooses from the detected GPUs (open for Turing and newer). Drivers 515 to 555 get it in the older form they understand
--discard-recovery Drop recovery data from an earlier interrupted install that no longer matches the system, then install

Two modes take no .run file: --recover puts back the previous driver after an install that was cut off (what the boot-time service runs), and --discard-recovery on its own only drops stale recovery data.

Exit codes: 0 success, 1 failed with nothing changed, 2 bad arguments or a refused file, 3 failed and everything was put back, 4 putting it back failed too (don't reboot), 5 installed but the initramfs rebuild failed, 6 stale recovery data (nothing done), 7 Secure Boot would refuse the new module (nothing changed; set up signing first).

Used on its own, the script doesn't install green-light-recover.service (the AppImage's first launch does), so an interrupted headless install isn't restored at boot: run sudo ./privileged-install.sh --recover afterwards.

Reboot afterward to switch drivers, same as the GUI flow.

Module-signing setup runs headless too; the script reads the one-time MOK password from stdin:

sudo ./privileged-install.sh --setup-signing

Known issues

  • While a dialog is open, move the window by the dialog's title; the window's own title bar does not respond until the dialog is closed. Dialogs don't dim the window behind them and don't close when you click outside them.
  • The file dialog shows every file, not only .run files. Picking anything else is refused with a message.
  • The Log tab's text can't be selected with the mouse. Copy Log copies all of it.
  • The font is one your system already has (Ubuntu, Adwaita Sans, Cantarell, Noto Sans or DejaVu Sans, whichever is found first), not necessarily the one your desktop is set to.
  • Screen readers. Buttons, rows and the text in dialogs are exposed, and notifications are announced. A dialog itself has no name: its title names the group that holds its content, where the keyboard focus goes when it opens. The window's minimise, maximise and close buttons and the two links in About are not exposed (close the window with your desktop's shortcut, such as Alt+F4). These are limits of the UI toolkit, GPUI Kit.
  • Starting Green Light a second time shows the window that is already open, without asking for a password again. On Wayland it comes to the front when the second start came from your launcher, dock or menu (GNOME shows a "Green Light is ready" notice instead, as it does for other apps); started from a terminal, the desktop only marks the window as wanting attention. If the open copy is still starting, the second start says so, and its window appears when it is ready. If the open copy has stopped responding, the second start says so, with the PID to close.

Logs and troubleshooting

Two files tell you everything:

  • /var/log/green-light.log is written by this app's install script, step by step
  • /var/log/nvidia-installer.log is NVIDIA's own installer log

If an install fails, the reason is in one of those, and the Log tab shows the script's output as it runs. The most common cause is missing kernel headers for a brand new kernel, which resolves once your distro publishes them; the script checks for headers and a compiler before it removes anything, and stops without changes if they're missing. Before it removes anything it also test-builds the new driver's kernel module for your kernel. Before the first change it saves everything needed to undo it, including copies of the packages it is about to remove. If NVIDIA's installer then fails, or the install is stopped before the installer has run, the script removes what the installer had put in place, reinstalls the removed packages (and the packages that depend on them) from those copies, puts back holds, block and boot configuration, and checks that the previous driver is back (signed, under Secure Boot) before it says so; if it can't confirm that, it says not to reboot yet. If the computer loses power or the install is killed after NVIDIA's installer has finished, the next boot finishes the install's last steps instead (the kernel modules for your other kernels, the initramfs), keeping the new driver (the app offers Finish Install for it; if the driver was changed since, there is nothing left to finish). If it is killed before that, the same rollback happens at the next boot (green-light-recover.service), or from Restore Previous Driver in the app, or at the start of the next install. Closing Green Light or logging out doesn't interrupt an install, and while it is changing the system, shutting down or suspending is blocked (an administrator can still force it). If the driver was changed by other means after an install was cut off, Green Light leaves that alone and offers to discard the old recovery data instead.

If a password dialog never appears and Green Light says that no polkit authentication agent is running, start one and try again. KDE, GNOME and COSMIC include one; on Hyprland use hyprpolkitagent, on sway or i3 use polkit-gnome (policykit-1-gnome on Debian/Ubuntu) or lxqt-policykit. If it says that pkexec is not installed (some minimal Hyprland or sway installs have no polkit at all), install the package it names (polkit, or pkexec on Debian and Ubuntu) and an agent.

Uninstalling

To remove the driver itself:

sudo nvidia-uninstall

To get nouveau, nova-core or the distro's driver back afterwards, also delete /etc/modprobe.d/blacklist-nouveau.conf and any block file (/etc/apt/preferences.d/green-light-nvidia or /etc/dnf/libdnf5.conf.d/90-green-light-nvidia.conf), then rebuild the initramfs.

To remove this app, delete the AppImage and optionally the helper files it installed:

sudo systemctl disable green-light-recover.service
sudo rm /etc/systemd/system/green-light-recover.service
sudo rm -rf /usr/lib/green-light /var/lib/green-light
# shared with other apps that queue Secure Boot keys; remove it only if none is left
sudo rm -rf /var/lib/mok-pending
sudo rm /usr/share/polkit-1/actions/io.github.labj1987.GreenLight.policy
sudo rm -f /etc/apt/preferences.d/green-light-nvidia /etc/dnf/libdnf5.conf.d/90-green-light-nvidia.conf
sudo rm -f /var/log/green-light.log
sudo systemctl daemon-reload

Building from source

Needs Rust 1.100 (pinned in rust-toolchain.toml, which rustup picks up; a distro's cargo/rustc may be older), build-essential, pkg-config, and the headers the UI toolkit links against: libxcb1-dev, libxkbcommon-dev, libxkbcommon-x11-dev and libfontconfig1-dev. The packaging step also needs wget, file, desktop-file-utils and zsync. Release builds run on Ubuntu 24.04, whose glibc sets the floor above. The AppImage carries the licence notices of every Rust crate built into it. The build script runs as an ordinary user; only on a machine with no toolchain does it install these through apt, and that one case needs root.

bash build-appimage.sh

The output lands in the project directory. Cargo.lock is committed, so builds are reproducible.

How the install actually works

The script runs NVIDIA's installer with --allow-installation-with-running-driver, which is the same behavior your package manager relies on: files and the DKMS module go to disk, nothing touches the loaded driver, and the new one takes over at boot. Before that it verifies the archive with --check, makes sure headers, the kernel's compiler and make (and DKMS when that option is on) are present (and stops if they aren't), test-builds the module, clears any conflicting distro driver packages, blacklists nouveau and nova-core (the in-kernel Rust NVIDIA driver in Linux 6.15+), signs the module with your machine's signing key if it has one, builds it for every installed kernel that has headers (with DKMS on, DKMS builds and signs it; without DKMS, NVIDIA's installer builds it for each kernel), and rebuilds the initramfs afterward. A kernel that gets no module, or a running kernel whose module couldn't be rebuilt, is shown as a warning when the install finishes. All plain bash, all readable.

Acknowledgements

Development assistance: Claude Code (Anthropic) and Codex (OpenAI).

License

AGPL-3.0-or-later. See LICENSE.

Code at or before commit fe3a6c563bfeff0391e0f9bab21f60533721cb7a remains available under the MIT License per its original release. From this commit forward, AGPL-3.0-or-later.

Linnard Alex Brown Jr.

About

Install NVIDIA .run drivers on Linux without leaving your desktop

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages