Common Driver Issues
Driver Troubleshooting Workflow
Step 1: Identify the Hardware
# Full hardware overview
sudo lshw -short
# PCI devices (graphics cards, network cards, sound cards, etc.)
lspci -nn
# USB devices
lsusb
# Detailed hardware report
sudo lshw -html > hardware-report.htmlStep 2: Check Kernel Logs
# Current boot log
sudo dmesg | less
# Filter errors and warnings
sudo dmesg --level=err,warn
# Real-time monitoring (use when plugging in devices)
sudo dmesg -wStep 3: View Loaded Modules
# List all loaded kernel modules
lsmod
# View information about a specific module
modinfo MODULE_NAME
# View module dependencies
modprobe --show-depends MODULE_NAMEUsing the ubuntu-drivers Tool
# Detect devices that need additional drivers
sudo ubuntu-drivers devices
# Automatically install recommended drivers
sudo ubuntu-drivers autoinstall
# Install a specific driver (use the version recommended by `ubuntu-drivers devices`, e.g. 580/590)
sudo ubuntu-drivers install nvidia-driver-580DKMS Driver Management
DKMS (Dynamic Kernel Module Support) ensures third-party drivers are automatically recompiled after kernel updates.
# View DKMS-managed modules
dkms status
# Manually rebuild modules
sudo dkms autoinstall
# If a module fails to build
sudo dkms remove MODULE_NAME/VERSION --all
sudo dkms install MODULE_NAME/VERSIONCommon Issues and Solutions
Driver stops working after kernel update
# Check DKMS status
dkms status
# Ensure build tools are installed
sudo apt install build-essential dkms linux-headers-$(uname -r)
# Rebuild all DKMS modules
sudo dkms autoinstallDriver module is blacklisted
# Check blacklists
grep -r "blacklist" /etc/modprobe.d/
# Temporarily load a blacklisted module
sudo modprobe MODULE_NAME
# Permanently remove blacklist entry
sudo nano /etc/modprobe.d/blacklist.conf
# Comment out the relevant line, then regenerate the initramfs (Ubuntu 26.04 uses Dracut by default):
sudo dracut -f
# On legacy initramfs-tools systems use instead: sudo update-initramfs -uMissing firmware files
# Check for firmware missing warnings
sudo dmesg | grep -i firmware
# Install the full firmware package (all of Ubuntu's binary firmware lives in linux-firmware)
sudo apt install linux-firmwareNote
Ubuntu does not have Debian’s split packages such as firmware-misc-nonfree; all required firmware is bundled in linux-firmware. Starting with 26.04, linux-firmware is split into finer vendor-specific subpackages, but installing the umbrella package still pulls in all firmware.
Device not recognized
- Confirm the device is physically connected properly
- Check if the device is enabled in BIOS/UEFI
- Try a different USB port or cable
- Update the kernel version:
sudo apt install linux-generic-hwe-26.04Manually Compiling and Installing Drivers
When no pre-built driver package is available:
# Install build dependencies
sudo apt install build-essential linux-headers-$(uname -r) git
# Typical workflow
git clone <DRIVER_REPOSITORY_URL>
cd <DRIVER_DIRECTORY>
make
sudo make install
sudo modprobe <MODULE_NAME>
# Set up automatic loading at boot
echo "MODULE_NAME" | sudo tee /etc/modules-load.d/MODULE_NAME.confRolling Back to an Older Kernel
If a new kernel causes hardware issues:
# View installed kernels
dpkg --list | grep linux-image
# Select an older kernel at the GRUB menu during boot
# Hold Shift (BIOS) or Esc (UEFI) to enter the GRUB menu
# Select "Advanced options for Ubuntu" > older kernel version
# Pin a specific kernel version (use with caution)
sudo apt-mark hold linux-image-7.x.x-xx-genericGenerating a Hardware Diagnostic Report
When seeking help from the community, provide the following information:
# Generate a complete hardware report
sudo apt install inxi
inxi -Fxxxz
# Or use hw-probe
sudo apt install hw-probe
sudo hw-probe -all -uploadThe output link can be shared directly with those helping you.
Last updated on