Important: You are required to change your passwords used for Gentoo services and set an email address for your Wiki account if you haven't done so. See the full announcement and Wiki email policy change for more information.

Hardware detection

From Gentoo Wiki
Jump to: navigation, search

This article lists and describes the setup of tools to detect hardware.

Complete hardware list

lshw

lshw generates a structured list of detected hardware and their featues. Just install sys-apps/lshw:

→ Information about USE flags
USE flag Default Recommended Description
gtk No Adds support for x11-libs/gtk+ (The GIMP Toolkit)
sqlite No Adds support for sqlite - embedded sql database
static No  !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically
root # emerge --ask lshw

hwinfo

hwinfo is the hardware detection of OpenSUSE and shows a lot details. Just install sys-apps/hwinfo:

root # emerge --ask hwinfo

kudzu

kudzu is the hardware detection of Red Hat. Just install sys-apps/kudzu:

root # emerge --ask kudzu

Specific hardware

lspci

lspci lists all PCI devices. Just install sys-apps/pciutils:

→ Information about USE flags
USE flag Default Recommended Description
static-libs No Build static libraries
zlib Yes Support compressed pci.ids database
root # emerge --ask pciutils

lspci detects the devices based on an ID database provided by sys-apps/hwids. To get a more recent database install a new version of hwids.

lsusb

lsusb lists all USB devices. Just install sys-apps/usbutils:

→ Information about USE flags
USE flag Default Recommended Description
python Yes Adds optional support/bindings for the Python language
zlib Yes Support compressed pci.ids database
root # emerge --ask usbutils

lsusb detects the devices based on an ID database provided by sys-apps/hwids. To get a more recent database install a new version of hwids.

lpinfo

lpinfo (part of CUPS) lists all printers and the used drivers.

  • List all connected printers:
root # lpinfo -v
  • Lists all available drivers:
root # lpinfo -m

scanModem

scanModem finds for a connected modem a suited driver. scanModem is not in the Portage tree, so you have to download it yourself and extract it:

user $ wget http://linmodems.technion.ac.il/packages/scanModem.gz
user $
gunzip scanModem.gz
user $
chmod +x scanModem
user $
./scanModem

It will create a folder Modem and the file scanout.something contains the wanted informations. If a modem is detected, the driver is named next to Drivers, e.g. for a HSF modem:

File./Modem/scanout.something

Driver=hsfmodem-drivers