My objective was to be able to enjoy some recent games, which on the Linux platform is usually done via Steam. If there’s something better, I’m all ears.
While games like Lara Croft: Tomb Raider; Deus Ex: Mankind Divided; Shadow of Mordor … work beautifully, I wanted to run Mass Effect 3, Destiny 2, Disintegration, Crysis 3, Halo Infinite, The Last of Us, …
I’ve also tried to run e.g. ESO in a Bottle, but that failed with an error whining about DirectX being unsupported. So I took a step back and looked at whether I even had the most recent driver for my nvidia card —actually I took several steps back and updated my BIOS as well though that be a tale for another day. It turns out Debian’s packages only go up to v470:
When checking apt, make sure all necessary repos are listed.
$ cat /etc/apt/sources.list deb http://deb.debian.org/debian/ bullseye main non-free contrib deb-src http://deb.debian.org/debian/ bullseye main non-free contrib deb http://security.debian.org/debian-security bullseye-security main contrib non-free deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free deb http://deb.debian.org/debian bullseye-backports main contrib non-free deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
Check for driver availability:
$ apt search nvidia-driver nvidia-driver/stable 470.161.03-1 amd64 NVIDIA metapackage nvidia-driver-bin/stable 470.161.03-1 amd64 NVIDIA driver support binaries nvidia-driver-libs/stable 470.161.03-1 amd64 NVIDIA metapackage (OpenGL/GLX/EGL/GLES libraries) nvidia-kernel-dkms/stable 470.161.03-1 amd64 NVIDIA binary kernel module DKMS source nvidia-kernel-source/stable 470.161.03-1 amd64 NVIDIA binary kernel module source
It’s that or the 390 driver …
Just in case we forgot which card we have in the first place, check your hardware:
$ lspci | grep -i nvidia 01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile] (rev a1) 01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)
Next, take a look at NVIDIA‘s Linux support:
Excellent. Now you can’t just install the driver, you have to (1) remove the existing driver, (2) disable the default Nouveau driver, (3) make sure kernel sources and headers are installed, (4) reboot into runlevel 3, (5) install the vendor’s driver from CLI, …
Step by Step
Prepare the System
- Remove existing NVIDIA driver
- Deactivate the NOUVEAU driver
- Update initramfs
- Ascertain necessary sources are installed
- Set runlevel 3
- Install the new driver
- Set runlevel 5
- BOOM DONE!
Remove the driver and any residual files # apt purge nvidia* # apt autoremove —resist the urge to purge *nouveau*! Disable default NOUVEAU driver # nano /etc/modprobe.d/blacklist-nouveau.conf blacklist nouveau options nouveau modeset=0 CTRL-o y; CTRL-x # nano /usr/lib/modprobe.d/nvidia-installer-disable-nouveau.conf blacklist nouveau options nouveau modeset=0 CTRL-o y; CTRL-x Update initram # update-initramfs -u Install kernel and header source files # apt install source linux-image-$(uname -r) # apt install source linux-headers-$(uname -r) Change runlevel from 5 to 3 else the installer won't run # systemctl set-default multi-user.target # systemctl reboot
If you’re running a custom kernel or your system requires packages signature, or some other devil is in the details I’m not covering here, you’ll need to do a little homework i.e. read NVIDIA’s docs. To do that, run the driver script with the extract only parameter.
It'll create a directory by the same name - prerequisite is presence in the directory containing the script $ bash ./NVIDIA-Linux-x86_64-525.89.02.run --extract-only
The system will now boot into CLI. Login …
Prerequisite is presence in the directory containing the script # bash ./NVIDIA-Linux-x86_64-525.89.02.run Follow the bouncing ball (on-screen instructions) … Revert to GUI runlevel 5 # systemctl set-default graphical.target # systemctl reboot
.. and Voilà, there you go.
One oddity I noticed is that in my XFCE4 DE, nvidia-settings did not show up in any of my application menus. No matter, it should be in your path. I don’t run it often so I care not to futz with HOW TO get it into the menu system.
In the end, I’m writing this a couple of days after going through these steps so you may want to check my logic, understand what each command does and consider that against your specific setup and adjust accordingly.
nvidia-settings now shows more Graphics Clock levels than I recall seeing before. More significantly, the clock adjusts much more quickly than in previous versions such as the v390 I was running on my laptop (GeForce 780M). The GPU fan for the GTX 1060 also doesn’t come on as often … there are less graphical artifacts on the screen when watching youtube.
Most importantly, one mission accomplished: ESO in a Bottle now works!!
$ flatpak run com.usebottles.bottles
Initially, the game defaults to mouse & keyboard input, but after you login, you can go into the Settings and enable your gamepad.
The verdict is still out on getting Windoze games to work in Steam.