Skip to content

Instantly share code, notes, and snippets.

@Anakiev2
Anakiev2 / How to install the Nvidia legacy driver (340xx or 390xx) on Debian 13 Trixie.md
Last active September 28, 2025 19:20
How to install the Nvidia legacy driver (340xx or 390xx) on Debian 13 Trixie

How to install the Nvidia legacy driver (340xx or 390xx) on Debian 13 Trixie

This guide will show you how to compile and install the legacy Nvidia driver on Debian. The steps bellow are compatible with both nvidia-legacy-340xx-driver and nvidia-legacy-390xx-driver and can be installed on Debian 13 (Trixie) as well as Debian 12 (Bookworm) or Debian 11 (Bullseye) in both 64-bit and 32-bit version. Execute the lines one by one and wait for every line to finish before proceeding to next. Only the lines starting with sudo should be executed as root. The lines with sudo pbuilder will take a lot of time.

To install the nvidia-legacy-390xx-driver version replace 340xx with 390xx everywhere bellow.
To install both 64-bit and 32-bit libraries for wine/steam you should run Step 2. twice.

Step 1. Prepare:

Update, upgrade and install the required packages.
If you use 32-bit system do not install linux-headers-amd64.

@Anakiev2
Anakiev2 / How to install nvidia-legacy-340xx-driver (or nvidia-legacy-390xx-driver) on Debian 12 Bookworm.md
Last active September 4, 2025 08:50
How to install nvidia-legacy-340xx-driver on Debian 12 Bookworm

OUTDATED

Although this guide still works and even works on Debian 13 it's deprecated.

It's replaced by this new guide which supports both 64-bit and 32-bit libraries.

I will keep it because the information here is useful.

OUTDATED

 
 

How to install nvidia-legacy-340xx-driver on Debian 12 Bookworm

This guide will show you how to download, compile and install the nvidia-legacy-340xx-driver on Debian 12. Some people install the driver directly from sid but this will mix packages from both stable and unstable which may create issues. It's recommended to update and upgrade your system before you start.