Linux and Drivers: How Hardware Support Works
In this article
Linux supports a huge range of hardware, but the way drivers work is fundamentally different from Windows: most drivers are built into the kernel itself, and many devices work out of the box without any installation. For the rest, Linux offers a mix of in-kernel drivers, loadable kernel modules, and a small number of user-space drivers or firmware packages. Understanding this model explains why some hardware works instantly, some needs a little configuration, and a few devices still require proprietary drivers or don't work at all.
Why Linux Drivers Are Different
On Windows, you typically download a driver package from the manufacturer and install it. On Linux, the kernel source tree contains drivers for most common hardware, and distributions ship a prebuilt kernel with those drivers enabled. When you plug in a device, the kernel detects it and loads the appropriate module automatically. This is why a fresh Linux install often has working Wi-Fi, graphics, sound, and USB without any manual driver hunting.
The trade-off is that support depends on kernel version. New hardware may need a newer kernel than your distribution ships. Conversely, very old hardware may have its driver removed if no one maintains it. The Linux kernel community maintains drivers collectively, and manufacturers sometimes contribute code directly, but not all vendors do.
How Driver Support Works in Practice
Linux drivers fall into three broad categories:
- In-kernel drivers: Compiled into the kernel or available as loadable modules. Most storage, network, USB, and input drivers are here. They are maintained as part of the kernel source.
- Proprietary drivers: Supplied by manufacturers as binary blobs, often for graphics cards (Nvidia) or Wi-Fi chips (Broadcom). Distributions may offer them through a restricted repository or a driver manager tool.
- User-space drivers: Some devices are driven from user space via libraries such as libusb or specialised frameworks (e.g., CUPS for printers, SANE for scanners). These don't require kernel modules.
Firmware is a related concept: many devices need a firmware file loaded by the driver at runtime. Distributions typically package these in a linux-firmware package. If firmware is missing, the device may not initialise even if the driver is present.
Checking and Installing Drivers
Most drivers are already installed. To check what hardware is detected and which kernel modules are in use, you can use command-line tools. Here are common steps:
- Identify your hardware:
lspcifor PCI devices,lsusbfor USB devices. - See loaded modules:
lsmodlists currently loaded kernel modules. - Check kernel messages:
dmesgshows hardware detection and driver loading messages, useful for troubleshooting. - For graphics,
glxinfoorinxi -Gshows which driver is active. - If a proprietary driver is needed, use your distribution's driver manager (e.g., Additional Drivers on Ubuntu, or a package like
akmod-nvidiaon Fedora).
Installing a driver usually means installing a package. For example, on Debian/Ubuntu, sudo apt install nvidia-driver installs the proprietary Nvidia driver. On Fedora, sudo dnf install akmod-nvidia builds the module for your kernel. Always reboot after installing a kernel module driver.
Common Driver Problems and Fixes
Even with good support, issues arise. Here are typical ones:
- Wi-Fi not working: Often due to missing firmware or a Broadcom chip needing a proprietary driver. Check
dmesgfor firmware errors. Installlinux-firmwareor the appropriatefirmware-b43-installerpackage. - Screen resolution wrong or tearing: Usually a graphics driver issue. Ensure the correct driver is loaded (open-source vs proprietary). For Nvidia, the proprietary driver often performs better; for AMD, the open-source
amdgpudriver is standard. - Printer not detected: Install
cupsand the appropriate driver package (e.g.,printer-driver-gutenprint). Many modern printers are driverless via IPP Everywhere. - Sound not working: Check
alsamixerfor muted channels. PipeWire or PulseAudio usually handles routing; ensure the correct output device is selected.
When troubleshooting, the kernel log (dmesg) and distribution forums are your best resources. Avoid random scripts from the internet; prefer packages from your distribution's repositories.
Open-Source vs Proprietary Drivers
Open-source drivers are developed collaboratively and shipped with the kernel or as part of the distribution. They are generally more stable across kernel updates and respect software freedom. Proprietary drivers are closed-source binaries from vendors; they may offer better performance or features (e.g., Nvidia's CUDA, or newer Wi-Fi support) but can break after kernel updates and are harder to debug.
For graphics, AMD and Intel provide open-source drivers that are well-regarded. Nvidia offers both an open-source (Nouveau) and proprietary driver; the proprietary one is often needed for gaming or compute. For Wi-Fi, Intel and Atheros chips usually work well with open-source drivers; Broadcom is more hit-or-miss.
Hardware Compatibility: What to Look For
Before buying hardware for Linux, check community resources. The Linux Hardware Database (linux-hardware.org) and distribution wikis list tested devices. For laptops, check if the Wi-Fi card and graphics are known to work. Some vendors (e.g., System76, Purism) sell Linux-preinstalled machines with guaranteed support. For peripherals, class-compliant USB devices (keyboards, mice, storage) almost always work without drivers.
If you rely on a specific application that needs proprietary drivers (e.g., Adobe software via Wine, or CUDA), verify driver availability for your distribution.
Frequently Asked Questions
Do I need to install drivers on Linux?
Usually not. Most drivers are included in the kernel. You may need to install firmware packages or proprietary drivers for certain hardware, but a typical desktop or laptop works out of the box.
Why doesn't my Wi-Fi work after installing Linux?
Many Wi-Fi chips need firmware that may not be installed by default, or they use a proprietary driver. Check dmesg for errors, and install the linux-firmware package or the specific driver for your chipset.
Can I use Windows drivers on Linux?
No. Linux uses its own driver model. However, some projects like NDISwrapper allow using Windows Wi-Fi drivers, but this is rarely recommended and often unnecessary.
How do I update drivers?
Drivers are updated with kernel updates. Keep your system updated via your package manager. Proprietary drivers are updated through the same package manager or vendor repositories.
What is a kernel module?
A kernel module is a piece of code that can be loaded into the kernel at runtime to add support for hardware or features. Most drivers are built as modules.
Are proprietary drivers safe?
They are closed-source, so they cannot be audited. They are generally safe when obtained from official repositories, but they may introduce instability or security risks. Prefer open-source drivers when possible.