The USB port is the standard for connecting additional hardware to PCs and notebooks. Most of the devices connected there run as expected under Linux, but there are exceptions and restrictions.
Not every external device always runs immediately under Linux.
There are not only data carriers for the USB port, but also WLAN and Ethernet adapters, Bluetooth and TV adapters, printers, scanners and multifunctional devices. Linux support is usually good when it comes to widespread devices. As with other hardware, however, very new devices are sometimes not recognized and require more up-to-date kernels. In some cases, manufacturers also provide their own drivers.
1. USB devices and Linux support
External hard drives and USB sticks are largely standardized and do not cause any problems under any operating system. There is support for printers, scanners and multifunctional devices if the devices come from a well-known manufacturer and are widely used. However, we do not recommend using particularly inexpensive devices from the discounter around the corner. In any case, you should obtain information on Linux compatibility before buying a new one.
WLAN and TV adapters belong more to the category of problematic devices. Often different chips are installed within a model series and the manufacturers make special adaptations. Even if the chipset is in principle supported by Linux, the device will still not work. Sometimes only the necessary firmware file is missing, which can then be easily fixed. However, despite all efforts, some devices cannot be used under Linux. The same applies here: Before buying, find out about other users’ experiences with Linux. Even with devices that the manufacturer advertises with Linux support, caution is required.
If “Linux” appears in the list of systems under the prerequisites, it is often not clear what exactly is meant by it. Often there is the source code of a driver that you have to compile yourself. However, this only works from or up to a certain kernel version.
2. Analyze connected USB devices
Hardware detection: The output of dmesg shows that the driver mt76x0u for the AVM WLAN-Stick AC 430 is loaded, but errors occur.
As soon as a USB device is connected to the PC, the kernel tries to recognize it and load the appropriate driver. You can find out exactly what is going on via a command in the terminal (Ctrl-Alt-T):
The window fills with the kernel messages and the last lines contain information about the newly connected device. If the device was already connected, unplug it and then plug it in again. Scroll up the window to see older messages. Press Ctrl-C to cancel the output. The relevant messages begin with “New USB device found”, followed by lines that refer to the newly loaded driver, such as “registered new driver interface” [Treiber]” or similar. With a USB hard drive, you will see messages such as “USB Mass Storage device detected” and “sd 8: 0: 0: 0: [sdb] Attached SCSI disk “. “Direct firmware load […] failed “indicates a missing firmware file. As a rule, the name of the firmware file is also shown near the line. Go to https://packages.ubuntu.com (“Searching the Contents of Packages”) to see if the file is in a package in the distribution. If not, search for it using an internet search engine.
3. Find drivers for Linux
If dmesg returns error messages or there is no indication of a loaded driver, then the kernel does not support the device. In the terminal you can find out with
the connected USB devices and with
modprobe -c | grep -i "[Hersteller- ID].*[Product-ID]"
find out whether no driver has actually been loaded. Search the Internet for the USB ID for more information.
At https://wiki.ubuntuusers.de/WLAN/Karten you will find a list of WLAN sticks from many well-known manufacturers. Look for the USB ID or model name on the page. There are indications as to the Ubuntu version from which an adapter is directly supported, whether a newer kernel is required (see article from page 96) or a driver must be installed manually.
However, the instructions are not always up-to-date or do not fit every device despite the identical USB ID. The WLAN stick AC 430 from AVM (057c: 8502), for example, should be supported by the mainline kernel 5.3rc3 according to https://wiki.ubuntuusers.de. This was not the case with our test device, possibly due to changes during the production period. At this point you should consider whether it is worth investing more time or whether it is better to buy a supported WLAN adapter for 20 euros.
For TV cards and TV USB adapters, there is more information at https://wiki.ubuntuusers.de/TV-Karten and inuxtv.org. Often an additional firmware file is required, sometimes there are also drivers directly from the manufacturer, e.g. for the USB adapter TBS-5520 SE and similar models.
4. Printer and scanner
Printing without problems: Ubuntu usually recognizes printers automatically and sets up the necessary software. Only in individual cases do you have to manually add printers and install drivers.
Ubuntu and Linux Mint make it easy for users. As soon as you connect the printer to the PC with a USB cable, the search for the appropriate driver begins automatically. Printers already registered via the WLAN are also found automatically.
If not, go to Ubuntu 20.04 in the “Settings” to “Printer”, under Linux Mint in the menu to “System Management -› Printer ”and add a new printer.
If no standard driver is available, but the download is possible, a dialog appears in which you confirm the download and installation.
Some manufacturers offer their own driver packages and software for Linux. At HP, for example, you can find a list of supported devices and functions as well as the required driver version at https://www.developers.hp.com/hp-linux-imaging-and-printing. The software package “HP Linux Imaging and Printing” (HPLIP) set up Ubuntu and Linux Mint automatically. However, there is usually a more up-to-date version for newer devices on the HP website. Brother, Canon, and Epson also have good Linux support. Here you can find drivers via the support area.