Debian Has a Terrible Out-of-the-Box Experience

In an earlier article I mentioned that I was going to switch to Linux and I’d selected KDE Neon as my distro of choice. After some thought I came to the conclusion that I’d be better off just going with Debian. Debian 12 (bookworm) has just been released and it comes with very nearly the latest version of KDE so there’s nothing to really be gained right now by using Neon. Additionally, I’ve used Debian as my daily driver before so I’m somewhat family with the tools. Neon’s weird rules about package installation were bugging me.

So, installation of Debian was easy enough. It’s far from the best looking installer but it gets the job done. Pretty much everything after that has been difficult though. As I have an nVidia graphics card I decided to install the Nvidia driver. I already knew this was going to be tougher on Debian than many other systems but I was relieved to find a guide. The first lspci command worked just fine, it then suggests using the nvidia-detect script. That’s not on my freshly installed system so I go to install it.

$ sudo apt install nvidia-detect
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package nvidia-detect

I concluded that non-free must not be switched on. I opened Discover to check and there were ticks next to, what I assumed were, the non-free repositories non-free-firmware. I would show you a screen shot, but at the time of writing Discover has decided it won’t open (all I did was install the Firefox update and even that crashed Firefox). Now, looking a second time (I killed plasma-discover and that seemed to get it working again) I see that non-free and non-free-firmware are different things. In Discover I tried clicking “… Software Sources” to see if I could add non-free that way but apparently that button doesn’t do anything.

After some more digging around I cam across this question which helped me understand why nvidia-detect wasn’t listed. It seems non-free-firmware is there to help new users with the installation of drivers as it allows the system to install them automatically. Since nvidia-detect isn’t a driver it’s not available there so I need to add non-free to my sources list. I popped open a command prompt and entered sudo nano /etc/apt/sources.list. At this point I scrolled down the nVidia driver installation guide and I found that it does actually talk a little about how to do this, it seems I need contrib as well. My sources list ended up looking like this

deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware

After a sudo apt update I was able to install nvidia-detect. It correctly detected my card too which was good

$ nvidia-detect 
Detected NVIDIA GPUs:
09:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU104 [GeForce RTX 2070 SUPER] [10de:1e84] (rev a1)

Checking card:  NVIDIA Corporation TU104 [GeForce RTX 2070 SUPER] (rev a1)
Your card is supported by all driver versions.
Your card is also supported by the Tesla drivers series.
Your card is also supported by the Tesla 470 drivers series.
It is recommended to install the
    nvidia-driver
package.

The guide then tells me I should run sudo apt install nvidia-driver firmware-misc-nonfree which installs an absolute ton of packages (over 700MB worth). During the installation of the packages I was informed that a reboot would be required to replace the nouveau kernel module.

After a reboot I want to log in and… nothing. After a brief blank screen the system went back to the login screen. After some head scratching I guessed that this might be to do with Wayland so I switched to X11 and tried again, yay, I could log in. A bit of quality time with Google turned up this page (linked from here) which talks about getting Plasma to worth with Wayland and the proprietary nVidia drivers.

Following the instructions on the page linked above it seems Debian 12 with the nVidia drivers installed meets the package version requirements but it failed the modeset requirement as the suggested command returned N. Searching for how to switch on mode setting in Debian turned up this page which just tells me it’s turned on by default when using the nouveau driver – great. Much digging later I found this page.

sudo nano /etc/modprobe.d/nvidia-options.conf

Add the line:

options nvidia-drm modeset=1

Reboot and select Wayland at the log in screen, it should now work. Why this change isn’t made by the system during installation is beyond me. I was running Wayland and Plasma when I installed the nVidia drivers, it was obvious this setting was needed. Anyway, it works now.