Fix Kernel Oops on Driver Fault in Ubuntu 22.04 LTS
Kernel oops triggered by a faulty driver (often NVIDIA or wireless). I'll show you how to identify the bad driver and blacklist or update it safely.
When This Kernel Oops Hits You
You're working on your Ubuntu 22.04 LTS machine—maybe rendering a 3D model or just browsing the web—and the screen freezes. Then you see a wall of cryptic text on a black background, ending with something like Oops: 0000 [#1] SMP. The system is dead. You can't even switch to a TTY with Ctrl+Alt+F2. This usually happens when a driver (often the NVIDIA proprietary driver or a Realtek wireless card) tries to access memory or hardware in a way the kernel doesn't allow.
Root Cause: The Driver Goes Rogue
A kernel oops is the kernel's way of saying "I can't continue safely." It's not a panic—it's a warning that something bad happened, but the kernel tries to keep running (often unsuccessfully). The #1 means it's the first oops since boot. The driver module at fault tries to read or write to an invalid memory address, or it passes a bad parameter to a kernel function. In my years running a help desk blog, the most common culprits were:
- NVIDIA drivers (especially the open-source
nouveauon newer GPUs) - Realtek wireless drivers like
rtl8821ce - VirtualBox host modules after a kernel update
The Fix: Find and Blacklist the Bad Driver
Here's how I'd fix this on a fresh boot. You'll need to get to a recovery shell first.
- Boot into recovery mode
Reboot your machine. When the GRUB menu appears, pressShift(orEscon some systems) to hold it. Select "Advanced options for Ubuntu" then "Recovery mode" for the latest kernel. From the recovery menu, choose root (Drop to root shell prompt). - Remount the filesystem as read-write
Recovery mode mounts the filesystem read-only by default. Run:
mount -o remount,rw / - Check the kernel log for the driver name
Run this command to see the last oops messages:
Look for a line likedmesg | grep -A 20 "Oops"CPU: 0 PID: 1234 Comm: Xorg Tainted: Pand then a stack trace. The driver name is often in theCall Trace:section, something likenouveauornvidia. For example, if you seenouveau: [ DRM] ..., it's the nouveau driver. - Blacklist the offending driver
Create a blacklist file to prevent the driver from loading at boot:
Replaceecho "blacklist nouveau" > /etc/modprobe.d/blacklist-nouveau.confnouveauwith the actual driver name you found. If it'srtl8821ce, use that instead. - Update initramfs
This makes the blacklist take effect on next boot:
update-initramfs -u - Reboot
Your system should now boot without the bad driver. You'll likely fall back to an open-source alternative (likerebootnouveaufor NVIDIA or a generic wireless driver).
If the Driver Is Essential
If you can't simply blacklist the driver (e.g., you need the NVIDIA GPU for CUDA work), you have two options:
- Update the driver to a newer version that fixes the bug. For NVIDIA, install the latest proprietary driver from the official PPA:
(Replaceadd-apt-repository ppa:graphics-drivers/ppa
apt update
apt install nvidia-driver-535535with the latest version for your GPU.) - Downgrade the kernel if the driver works fine on an older kernel. Boot into an older kernel from GRUB and pin it in
/etc/apt/preferences.
What If It Still Crashes?
If the oops persists even with the driver blacklisted, you might be dealing with a hardware issue. Try these:
- Remove all non-essential hardware—PCIe cards, USB devices, etc. Boot with only the motherboard, one stick of RAM, and your boot drive.
- Run a memory test from the GRUB menu (select "Test memory"). Bad RAM can cause kernel oops too.
- Check for BIOS updates—especially on laptops, outdated BIOS can cause driver conflicts.
I've seen this exact error on a Dell XPS 13 with a Realtek wireless card. Blacklisting the rtl8821ce and using the built-in iwlwifi driver fixed it instantly. If you're stuck, drop the full dmesg output into a pastebin and I'll help you dig through it.
Pro tip: After blacklisting, you can temporarily load a driver with modprobe to test if it crashes again. That way you don't waste time rebooting.Was this solution helpful?