Vic's Blog
Upgrading NVIDIA Drivers on Debian: A Sequel to Ollama Installation
Warning
This guide covers proprietary NVIDIA driver installation and upgrade procedures. Always backup your system before making driver changes.
Welcome back!
╰(°▽°)╯
This is a sequel to my NVIDIA driver installation guide, where we'll dive deep into properly upgrading NVIDIA drivers on Debian. After getting your NVIDIA drivers working with the correct resolution setup, you might find yourself needing to upgrade your drivers for better performance or compatibility. This guide will walk you through the entire process, including solutions to common issues you might encounter along the way.
Table of Contents #
- Prerequisites
- Checking Your Current Setup
- Finding the Latest Driver Version
- The Upgrade Process
- Fixing Common Issues
- Verification and Testing
- Conclusion
Prerequisites #
Before we start, make sure you have:
- A Debian system with KDE Plasma desktop
- Existing NVIDIA proprietary drivers installed
- Basic knowledge of terminal commands
- Administrative (sudo) access
Checking Your Current Setup #
Let's first check what we're working with. Run the following command to see your current NVIDIA setup:
nvidia-smiYou should see output similar to this:
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3080 ... Off | 00000000:01:00.0 On | N/A |
| N/A 59C P8 22W / 90W |
Also check your kernel version to ensure compatibility:
uname -aExpected output:
Linux debian 6.12.32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.32-1 (2025-06-07) x86_64 GNU/Linux
Finding the Latest Driver Version #
Head over to NVIDIA's Unix drivers page to check the latest production branch version. As of this writing, the latest is 570.169.
You can also check the specific driver details at the NVIDIA driver details page which shows:
- Driver Version: 570.169
- Release Date: Tue Jun 17, 2025
- Operating System: Linux 64-bit
- File Size: 375.82 MB
Before proceeding, verify your system meets the minimum requirements by checking the README requirements. The key requirements include:
- Linux kernel 4.15 and newer ✓
- X.Org xserver 1.7+ ✓
- glibc 2.11+ ✓
Our Debian system with kernel 6.12.32 easily meets these requirements.
The Upgrade Process #
System Update and Preparation #
First, let's ensure your system is up to date:
sudo apt update
sudo apt upgradeUpdate your sources list to use the testing repository if needed:
sudo nano /etc/apt/sources.listPerform a distribution upgrade:
sudo apt update && sudo apt dist-upgradeInstall necessary headers:
sudo apt install linux-headers-amd64Removing Existing NVIDIA Packages #
This is the crucial step that mirrors the technique from our previous NVIDIA driver installation guide. We need to completely wipe the existing NVIDIA installation to avoid conflicts:
sudo apt-get remove *nvidia*Downloading and Installing New Driver #
Download the latest driver:
wget https://us.download.nvidia.com/XFree86/Linux-x86_64/570.169/NVIDIA-Linux-x86_64-570.169.runBefore installation, we need to disable the display manager temporarily. Switch to a terminal using CTRL+ALT+F1-F7 and disable SDDM:
sudo systemctl disable sddm.service
sudo systemctl stop sddm.serviceMake the installer executable and run it:
chmod +x NVIDIA-Linux-x86_64-570.169.run
sudo ./NVIDIA-Linux-x86_64-570.169.runFollow the installer prompts, accepting the license and allowing it to build kernel modules.
Post-Installation Configuration #
Reboot your system:
sudo rebootAfter reboot, re-enable SDDM:
sudo systemctl enable sddm.serviceFixing Common Issues #
KDE Plasma Wayland Sleep/Wake Crashes #
After upgrading, you might encounter the infamous KDE Plasma Wayland sleep/wake crash bug. This is a known issue with NVIDIA drivers and KDE Plasma 6.1.2+ on Wayland.
The Fix: Enable NVIDIA's preserve video memory option.
First, verify the setting is available:
cat /proc/driver/nvidia/params | sortLook for these lines:
PreserveVideoMemoryAllocations: 1TemporaryFilePath: "/var/tmp"
If PreserveVideoMemoryAllocations is not set to 1, you'll need to add the kernel parameter. Edit your GRUB configuration:
sudo nano /etc/default/grubAdd or update the following line:
GRUB_CMDLINE_LINUX='quiet video=1024x768 nvidia-drm.modeset=1 nvidia.NVreg_PreserveVideoMemoryAllocations=1'
Update GRUB:
sudo update-grub2The necessary systemd services (nvidia-suspend.service, nvidia-hibernate.service, and nvidia-resume.service) should be enabled by default on supported drivers. Verify with:
systemctl status nvidia-suspend.service
systemctl status nvidia-hibernate.service
systemctl status nvidia-resume.serviceReboot to apply the changes:
sudo rebootScreen Sharing Problems #
If you encounter screen sharing issues in Discord, Firefox, or other applications with the error "Failed to start screencasting" or "Failed to create PipeWire context", this is due to missing PipeWire on a standard Debian 12 KDE installation.
The Fix: Install and start PipeWire:
sudo apt install pipewire
systemctl --user start pipewire
systemctl --user enable pipewireVerification and Testing #
After completing the upgrade and fixes, verify everything is working:
Check NVIDIA driver version:
nvidia-smiTest GPU acceleration:
glxinfo | grep "OpenGL renderer"Verify sleep/wake functionality:
- Put your system to sleep
- Wake it up and check if Plasma remains stable
Test screen sharing:
- Open Discord or Firefox
- Try to share your screen
- Verify it works without errors
Configure NVIDIA settings:
nvidia-settingsSave your configuration to
~/.nvidia-settings-rcand/etc/X11/xorg.conf.
Additional Configuration #
Disable KDE's KSCREEN2 Service #
To prevent conflicts with NVIDIA settings, disable KDE's automatic display management:
- Open System Settings
- Go to "Background Services"
- Disable "KSCREEN2"
Create an Autostart Script #
Create a script to load NVIDIA settings on startup:
mkdir -p ~/.local/state
nano ~/.local/state/nvidia-setting.shAdd the following content:
#!/bin/bash
nvidia-settings --load-config-onlyMake it executable:
chmod +x ~/.local/state/nvidia-setting.shAdd this script to your KDE Autostart settings through System Settings.
Conclusion #
Congratulations! You've successfully upgraded your NVIDIA drivers on Debian and resolved the common issues that plague many users. The key takeaways from this process are:
- Always clean-install drivers by removing existing packages first
- Enable preserve video memory to fix Wayland sleep/wake issues
- Install PipeWire for proper screen sharing functionality
- Verify compatibility before upgrading
This upgrade process ensures you get the latest performance improvements and bug fixes while maintaining system stability. Your Ollama setup should now run even more smoothly with the updated drivers!
Remember to bookmark this guide for future driver upgrades, as the same technique applies each time NVIDIA releases new drivers.
Happy computing! 🚀