Hardware and drivers
Taking control of hardware drivers
LINUX BASICS
Nick Peers discovers how to use your distro and third-party tools to help profile your hardware, find missing drivers and more…
Part Eight!
Don’t miss next issue, subscribe on page 16!
OUR EXPERT
Nick Peers
is grateful for the efforts of thousands of developers and enthusiasts in ensuring most hardware works without a hitch on his PC.
One of the most critical components in your Linux installation is its collection of drivers. O These are responsible for recognising all the hardware connected to your PC, from internal components like motherboards, network adaptors and graphics cards to external peripherals such as your allin-one device and USB Wi-Fi adaptor. Without the correct drivers in place, your PC can’t communicate with these components, rendering them useless.
Once upon a time, getting drivers working on your Linux PC was a real pain, but these days, thanks to the efforts of developers, enthusiasts and – yes, we’ll admit it – hardware manufacturers, it’s possible to install a fresh version of Linux on your PC and never have to worry about plugging anything in for the first time. Yep, plug and play is a real thing in today’s Linux distros.
But like all OSes, things aren’t always perfect, with obscure chipsets and obsolete hardware capable of causing problems. And that’s where we come in…
Drivers are part of the kernel, the core Linux system, and bridge your hardware to your OS. Like everything else in the Linux filesystem, hardware devices are treated as files, and these can be viewed in the /dev directory. There are three broad types of device driver: character, block and network. They refer to how data is read and written – examples of each type include keyboard and mice (character), any storage device, like a hard drive (block), and your Wi-Fi adaptor (network).
As with Windows and Mac OS, many hardware drivers are bundled with the OS itself – in the case of Linux, they’re included as part of the kernel. Each kernel update not only updates existing drivers, but adds support for the latest hardware devices, too.
Identify hardware
In an ideal world, your PC should know everything about its hardware components, including any devices attached to it. But how do you confirm this and find out what hardware has been recognised by your system?
One option is to trawl through your distro’s Settings app – we covered both Ubuntu and Mint in LXF318’s Basics column. But if you’d like a handy summary of key hardware, one tool places it all at your fingertips: System Profiler & Benchmark. Install it via the terminal: $ sudo apt update && sudo apt install hardinfo The annotation (right) reveals how to use this to navigate your hardware and glean all kinds of useful data about how it’s performing. One particularly handy section is Boots, which displays a list of boot times and which kernel version was used. As we’ll see, this can be helpful when determining if a new driver installed as part of a kernel update is the cause of your problem.