Skip to main content
Engineering LibreTexts

09-D.4: Troubleshooting: Hardware Issues

  • Page ID
    40080
  • EXAM OBJECTIVES COVERED
    2.7 Explain the use and operation of Linux devices.
    4.4 Given a scenario, analyze and troubleshoot application and hardware issues.

    Troubleshooting Hardware Issues

    Linux servers run mission-critical business applications in many different types of infrastructures including physical machines, virtualization, private cloud, public cloud, and hybrid cloud. It's important for Linux sysadmins to understand how to manage Linux hardware infrastructure, including software-defined functionalities related to networking, storage, Linux containers, and multiple tools on Linux servers.

    It can take some time to troubleshoot and solve hardware-related issues on Linux. Even highly experienced sysadmins sometimes spend hours working to solve mysterious hardware and software discrepancies.

    There are a lot of issues that can appear, seemingly out of nowhere. It is often due to incompatibilities or incorrect configurations of:

    • WiFi drivers
    • Printer drivers
    • Video issues
    • Audio problems

    WiFi drivers (especially Broadcom chips)

    Generally speaking, WiFi drivers—and Broadcom cards in particular—continue to be one of the most problematic technical issues facing Linux. There were hundreds of posts about this topic on LQ alone in 2016, and myriad more elsewhere. Dozens of Broadcom wireless cards are available, and detailed instructions for getting them to work with each distribution is far too involved for a single article, but the basic troubleshooting steps are the same:

    • ascertain exactly which Broadcom card you have by using lspci to find out the PCI ID
    • determine whether the distribution you use supports that card
    • and if it does, identify the proper way to get the card working

    For example, if you have a 14e4:4315 PCI ID and are using Ubuntu, then you know the BCM4312 card is supported by installing the firmware-b43-installer package. The other option you have is to research the WiFi card before your purchase to ensure it's fully supported by your distribution of choice out of the box.

    Printer drivers (especially Canon and Lexmark)

    Printers also continue to be problematic, with Canon and Lexmark repeatedly cited for being an issue. If you're purchasing a new printer, research compatibility before you buy. But if you are migrating from another operating system, that may not be an option. If you are doing research, the OpenPrinting database and the official support channel for your distribution are the two best places to start. Note that you should ensure all functionality of a device is fully compatible, especially if it's a multifunction product. One common complaint with Canon printers is that the drivers are often only available on non-English and sometimes obscure sites.

    Memory

    Memory issues can cause a variety of problems in a computer. Looking from a software perspective, if a process fails to free up allocated memory when it is no longer needed, this is called a memory leak. The available memory on the system can be used up. This can lead to poor performance and can cause system instability since other software is not able to access the memory it needs to execute properly. The use of memory monitoring tools like free as well as system process monitoring tools such as top can help identify the problem.

    Some memory issues are caused by a fault in the physical RAM modules or the motherboard. Linux has ways of detecting these faults. If a system log file records a "Machine Check Exception" error message this normally indicates an issue with RAM. The mcelog command can retrieve and print these error messages for easier analysis. If the messages contain error-correcting code (ECC) errors, one of the memory modules has probably failed.

    Video

    Video is a nuanced topic, as simple straightforward video works extremely well out of the box on Linux. Where the issues pop up are video accelerators/​acceleration; the latest video cards and newest technologies, such as NVIDIA Optimus and ATI dynamic GPU switching; installation and stability of proprietary drivers; efficient power management; and reliable suspend and resume. If you're not a gamer, do not need high-end graphics for another reason, and are not on a laptop, then you probably don't have to worry about this. If you're looking for a new laptop, be sure to research compatibility before your purchase.

    Audio

    Once again, for simple setups, audio has been easy to configure and reliable under Linux for a while. As soon as you get into professional production, echo cancelation, audio routing, unified mixing, and other complex setups, however, it can go south pretty quickly. My suggestion is to use one of the dedicated audio-related distributions if you need high-end real-time audio.

    The lshw Command

    The lshw command stands for “list hardware.” It's a Linux tool which is used to generate the detailed information of the system’s hardware configuration from various files in the /proc directory. lshw can also report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache memory configuration, bus speed, etc on DMI-capable x86 or IA-64 (Itanium family of 64 microprocessors) system and some PowerPC machine. This command needs root permission to show full information or else partial information will be displayed.

    Syntax:

    lshw [-format] [ OPTIONS ]

    Options:

    Options Options Meaning
    -html Outputs the device tree as an HTML page.
    -xml Outputs the device tree as an XML tree.
    -short Outputs the device tree showing hardware paths, very much like the output of HP-UX's ioscan.
    -businfo Outputs the device list showing bus information, detailing SCSI, USB, IDE and PCI addresses.
    -class class Only show the given class of hardware. Class can be found using lshw -short or lshw -businfo.
    -C class Alias for -class class.

    The example shown below is also showing the concept of device classes. In this instance the input calls, as shown by the -c option. The second USB device shows that it is a keyboard, but it is actually the USB wireless receiver for a mouse. The second lshw command shows the short listing of the disk class; -c and -class options are synonymous.

    pbmac@pbmac-server $ sudo lshw -c input
      *-usb                     
           description: Keyboard
           product: Dell USB Keyboard Hub
           vendor: Dell
           physical id: 1
           bus info: usb@4:1.1
           version: 48.00
           capabilities: usb-1.10
           configuration: driver=usbhid maxpower=90mA speed=2Mbit/s
      *-usb:1
           description: Keyboard
           product: USB Receiver
           vendor: Logitech
           physical id: 2
           bus info: usb@4:2
           version: 12.11
           capabilities: usb-2.00
           configuration: driver=usbhid maxpower=98mA speed=12Mbit/s
    pbmac@pbmac-server $ sudo lshw -short -class disk
    H/W path           Device      Class       Description
    ======================================================
    /0/1/0.0.0         /dev/sda    disk        500GB ST3500630AS
    /0/2/0.0.0         /dev/cdrom  disk        DVD+-RW TS-H653H
    

    The dmidecode Command

    The dmidecode command (Desktop Management Interface table decoder) records data from DMI table and produces human readable output. It is useful to retrieve the system’s hardware related information such as processor, RAM (DIMMs), BIOS details, memory, serial numbers etc.

    Syntax:

    dmidecode [ OPTIONS ]

    Options:

    Options Option Meaning
    -d, --dev-mem FILE Read memory from device FILE (default: /dev/mem)
    -q, --quiet Be less verbose. Unknown, inactive and OEM -specific entries are not displayed. Meta-data and handle references are hidden.
    -s, --string KEYWORD Only display the value of the DMI string identified by KEYWORD. KEYWORD must be a keyword from a known list (see the man page for the list).
    -t, --type TYPE Only display the entries of type TYPE. TYPE can be either a DMI type number, a comma-separated list of type numbers, or a keyword from the following list: bios, system, baseboard, chassis, processor, memory, cache, connector, slot.
    pbmac@pbmac-server $ sudo dmidecode -t processor 
    # dmidecode 3.1
    Getting SMBIOS data from sysfs.
    SMBIOS 2.5 present.
    Handle 0x0400, DMI type 4, 40 bytes
    Processor Information
        Socket Designation: CPU
        Type: Central Processor
        Family: Core 2 Duo
        Manufacturer: Intel
        ID: 7A 06 01 00 FF FB EB BF
        Signature: Type 0, Family 6, Model 23, Stepping 10
    

    The ABRT Utility

    ABRT is the Automatic Bug Reporting Tool. ABRT consists of a daemon, abrtd, which runs silently in the background most of the time. It springs into action when an application crashes, or a kernel oops is detected. The daemon then collects the relevant problem data such as a core file if there is one, the crashing application's command line parameters, and other data of forensic utility.

    ABRT is capable of reporting problems to a remote issue tracker. Reporting can be configured to happen automatically whenever an issue is detected, or problem data can be stored locally, reviewed, reported, and deleted manually by a user. The reporting tools can send problem data to a Bugzilla database, a Red Hat Technical Support (RHTSupport) site, upload it using FTP/SCP, email it, or write it to a file.

    The part of ABRT which handles already-existing problem data (as opposed to, for example, creation of new problem data) has been factored out into a separate project, libreport. The libreport library provides a generic mechanism for analyzing and reporting problems, and it is used by applications other than ABRT. However, ABRT and libreport operation and configuration is closely integrated. They are therefore discussed as one in this document.

    The ABRT packages provide the following crucial components, among others:

    • abrtd — The ABRT daemon which runs under root as a background service.
    • abrt-applet — The program that receives messages from abrtd and informs you whenever a new problem occurs.
    • abrt-gui — The GUI application that shows collected problem data and allows you to further process it.
    • abrt-cli — The command line interface, which provides similar functionality to the GUI.
    • abrt-ccpp — The ABRT service that provides the C/C++ problems analyzer.
    • abrt-oops — The ABRT service that provides the kernel oopses analyzer.

    Adapted from:
    "Troubleshooting tips for the 5 most common Linux issues" by Jeremy Garcia, OpenSource.com is licensed under CC BY-SA 4.0
    "dmidecode command in Linux with Examples" by Suraj1994, Geeks for Geeks is licensed under CC BY-SA 4.0
    "Chapter 20. Automatic Bug Reporting Tool (ABRT)" by Multiple Contributors, Fedora Project & Community is licensed under CC BY-SA 3.0

    • Was this article helpful?