drivers - Finding hardware information on linux without lspci

08
2014-07
  • tudor

    I have an ARM device running ArchLinux. The device doesn't appear to have any PCI bus, even though it has USB.

    [root@alarm ~]# lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
    [root@alarm ~]# lspci
    pcilib: Cannot open /proc/bus/pci
    lspci: Cannot find any working access method.
    [root@alarm ~]# 
    

    I want to find what other chipsets there are. For example, I know there is a soundcard and video card capable of HDMI. Such a chip wouldn't be put on a USB line.

    I looked at the kernel config that is currently working on the device at /proc/config.gz, it lists this:

    #
    # Bus support
    #
    CONFIG_ARM_AMBA=y
    # CONFIG_PCI_SYSCALL is not set
    # CONFIG_ARCH_SUPPORTS_MSI is not set
    # CONFIG_PCCARD is not set
    

    I don't know what AMBA is. A thorough search of google returns this entry in the kernel database but with no actual explanation, other than not to use it if you don't know what you're doing.

    Using lshw doesn't show much more either:

    [root@alarm ~]# lshw
    alarm                     
        description: Computer
        width: 32 bits
      *-core
           description: Motherboard
           physical id: 0
         *-memory
              description: System memory
              physical id: 0
              size: 307MiB
         *-cpu
              physical id: 1
              bus info: cpu@0
              size: 1008MHz
              capacity: 1008MHz
              capabilities: cpufreq
      *-network
           description: Ethernet interface
           physical id: 1
           logical name: eth0
           serial: 00:01:02:03:04:05
           size: 10Mbit/s
           capacity: 100Mbit/s
           capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
           configuration: autonegotiation=off broadcast=yes driver=wemac driverversion=1.01 duplex=half ip=192.168.1.1 link=yes multicast=yes port=MII speed=10Mbit/s
    [root@alarm ~]# 
    

    There appear to be no modules in this kernel loaded:

    [root@alarm ~]# lsmod
    Module                  Size  Used by
    [root@alarm ~]# 
    

    Furthermore, hwinfo doesn't seem to be available:

    [root@alarm ~]# pacman -Syu
    :: Synchronizing package databases...
     core is up to date
     extra is up to date
     community is up to date
     alarm is up to date
     aur is up to date
    :: Starting full system upgrade...
     there is nothing to do
    [root@alarm ~]# pacman -S hwinfo
    error: target not found: hwinfo
    [root@alarm ~]# hwinfo
    -bash: hwinfo: command not found
    [root@alarm ~]# 
    

    I need to know what chips are used on this system so that I can compile in the right video driver modules, how do I find out what that is on a system with no working lspci?

  • Answers
  • ultrasawblade

    Here is my official answer after your answering my comments. I could be quite wrong about some of this and welcome corrections.

    I'm not sure when Intel began incorporating PCIe (which is a software-compatible extension of PCI) into their CPUs. However, it hasn't been this way for the majority of the time x86 has been around. PCI is really part of the whole "PC platform" which includes a number of other things that are standard and expected, like standard ISA ports/I/O address/IRQs for devices and things like that.

    Rollback a bit to before PCI was around - basically, except with the abortive attempt to introduce a PnP standard with ISAPNP, you didn't really "probe" for some devices. You generally would need to assume they existed beforehand. You could, of course, test registers and what not to see if things respond as expected, but you then get in trouble if a different device is there, possibly resulting in hangs, etc. There really wasn't a way to "scan" the ISA bus. Or really any other bus that doesn't support PnP concepts in a standardized way.

    One of the things ACPI was supposed to solve was to provide some tables of information that told you what ISA devices were built-in. Even before ACPI the BIOS would be consulted to decide how many floppy drives were in the system. This is why on older systems, even if you have no floppy connected, you'll see an A: drive in Windows if you have the BIOS set to say there is one.

    So you may ask how modern OS's determine or interface with a PCI chipset. Most of the time the chipset appears as a device on the PCI bus itself. The PCI interface registers "pre-exist" at known standard locations in the PC platform. A programmatic scan through all device and function slots in the PCI space is possible here. Nothing like that exists for ISA. If the device is on the bus with ISA, it's registers respond when loaded/stored to, and that's it. You can't really talk to the bus itself.

    Incidentally, the PCI chipset might even have the capability to control a "PCI-ISA" bridge and bring some of the PnP functionality to the ISA (or now, LPC) bus. On it's own, ISA says you're on your own, though.

    There is no such standard platform for ARM. Not yet, anyway. There are many unique platforms that ARM CPUs run on. PCI, I2C and SDIO buses (and possibly more I don't know of) are a commonality between some of them, but again, there are ARM platforms that have none of those. ACPI is not implemented on ARM AFAIK except on the Microsoft Surface RT. Without working with a standardized bus that supports some notion of PnP there really is no way to "probe" for anything. You need to have foreknowledge outside of the system of the hardware that is supposed to be there. U-Boot is a commonly used ARM bootloader that requires support for and to be built for the specific platform it is meant to run on. It's something like a standard, but even then, it's usually built per-platform from my understanding.

    Some brief Googling reveals that this device has a "Mali 400" video chipset. Further searching brings the Mali GPU driver source code site. I'm a little rusty on my C, but I looked at it. It seems what you are supposed to do is, when you build the driver, tell it the addresses it needs to hit in order to talk to the GPU. I really didn't immerse myself into the source too deeply but it wouldn't surprise me if it's not talking to a bus, but just loading/storing from memory-mapped I/O directly.

    So I don't think there is a generic answer for all ARM platforms, unfortunately.

  • ssmy

    You can try hwinfo. It's in the Arch repos.

    $ hwinfo --gfxcard
    08: PCI 02.0: 0300 VGA compatible controller (VGA)              
    [Created at pci.318]
    Unique ID: _Znp.jjHn_gm8Jz5
    SysFS ID: /devices/pci0000:00/0000:00:02.0
    SysFS BusID: 0000:00:02.0
    Hardware Class: graphics card
    Model: "Intel VGA compatible controller"
    Vendor: pci 0x8086 "Intel Corporation"
    Device: pci 0x0162 
    SubVendor: pci 0x1849 "ASRock Incorporation"
    SubDevice: pci 0x0162 
    Revision: 0x09
    Driver: "i915"
    Driver Modules: "drm"
    Memory Range: 0xf7800000-0xf7bfffff (rw,non-prefetchable)
    Memory Range: 0xe0000000-0xefffffff (ro,non-prefetchable)
    I/O Ports: 0xf000-0xf03f (rw)
    IRQ: 57 (6 events)
    Module Alias: "pci:v00008086d00000162sv00001849sd00000162bc03sc00i00"
    Driver Info #0:
    Driver Status: i915 is active
    Driver Activation Cmd: "modprobe i915"
    Config Status: cfg=new, avail=yes, need=no, active=unknown
    
    Primary display adapter: #8
    
  • rzr

    dmesg can provide some infos

    and

    cat /proc/devices
    find /proc
    

    lshw should worth a try to be rebuilt


  • Related Question

    Zotac WiFi Drivers - No Linux Support
  • Questioner

    I built my own computer, and the motherboard is a Zotac ITX GeForce 9300. The Wi-Fi adapter doesn't work and the CD it came with has no Linux drivers. I am using the latest stable release of Linux Mint 7.

    Are there any Linux drivers for this adapter, or at least generic Wi-Fi drivers that can work on my adapter?

    Here are the results of running lspci:

    00:00.0 Host bridge: nVidia Corporation MCP79 Host Bridge (rev b1)
    00:00.1 RAM memory: nVidia Corporation MCP79 Memory Controller (rev b1)
    00:03.0 ISA bridge: nVidia Corporation MCP79 LPC Bridge (rev b2)
    00:03.1 RAM memory: nVidia Corporation MCP79 Memory Controller (rev b1)
    00:03.2 SMBus: nVidia Corporation MCP79 SMBus (rev b1)
    00:03.3 RAM memory: nVidia Corporation MCP79 Memory Controller (rev b1)
    00:03.4 RAM memory: nVidia Corporation Device 0a98 (rev b1)
    00:03.5 Co-processor: nVidia Corporation MCP79 Co-processor (rev b1)
    00:04.0 USB Controller: nVidia Corporation MCP79 OHCI USB 1.1 Controller (rev b1)
    00:04.1 USB Controller: nVidia Corporation MCP79 EHCI USB 2.0 Controller (rev b1)
    00:06.0 USB Controller: nVidia Corporation MCP79 OHCI USB 1.1 Controller (rev b1)
    00:06.1 USB Controller: nVidia Corporation MCP79 EHCI USB 2.0 Controller (rev b1)
    00:08.0 Audio device: nVidia Corporation MCP79 High Definition Audio (rev b1)
    00:09.0 PCI bridge: nVidia Corporation MCP79 PCI Bridge (rev b1)
    00:0a.0 Ethernet controller: nVidia Corporation MCP79 Ethernet (rev b1)
    00:0b.0 IDE interface: nVidia Corporation MCP79 SATA Controller (rev b1)
    00:0c.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
    00:10.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
    00:15.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
    00:16.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
    00:17.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
    00:18.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
    03:00.0 VGA compatible controller: nVidia Corporation GeForce 9300 / nForce 730i (rev b1)
    

    Update: Someone said the WiFi module connects to the board via a USB header. Here are the results of running lsusb:

    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 002: ID 0518:0001 EzKEY Corp. USB to PS2 Adaptor v1.09
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 002: ID 160a:3184
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 002: ID 045e:00e1 Microsoft Corp. Wireless Laser Mouse 6000 Receiver
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    

    ndiswrapper doesn't help at all.

    Update 2: I installed the VT6656 Linux driver CesarB posted, but I can only access the network and not the Internet. In addition, every time I boot the system doesn't recognize the adapter. I can reinstall the driver with every boot, but it will still only connect to the network.


  • Related Answers
  • CesarB

    Your lspci output shows only one Ethernet controller (the wired one, a MCP79 which should be supported by the forcedeth driver). Doing a web search, I found a curious piece of information in a review of your motherboard: "The WiFi module [...] connects to the board via a USB header". If that is true, the information you want will be found not in lspci, but in lsusb.

    After finding the correct line in the lsusb output, you can do a search for the ID (which will be something like 1d6b:0002) to find other people discussing the same hardware (people usually post the USB ID in that format when asking for help).

    It seems Linux Mint is based on Ubuntu 9.04, which uses a 2.6.28 kernel. You could try a more recent kernel (Ubuntu 9.10, which should be released late this month, uses 2.6.31) to see if there is a driver for your device.

    EDIT: Now that you posted the lsusb output, I can see that 160a:3184 is your wireless card. A quick search shows it is a VIA wireless card, apparently called VT6656. It seems there is a driver from VIA for it, and it seems to have been added to the staging tree for cleanup and possible future inclusion in the Linux kernel. See also Ubuntu bug #162671.

  • quack quixote

    To get devices to work properly, you need to identify the chipsets they use. You can do this by visually inspecting the motherboard and recording identifying codes on the physical chips, by searching the 'net for other people who have documented the chipsets on your model of motherboard, and by using linux tools like "lspci".

    Once you've identified the chipsets, you can use that to search for what other linux users are using to configure that hardware. Ubuntu forums are a good place to start.

    Here's what my Ubuntu 9.04 system looks like from lspci:

    $ lspci 
    00:00.0 Host bridge: VIA Technologies, Inc. VT8378 [KM400/A] Chipset Host Bridge
    00:01.0 PCI bridge: VIA Technologies, Inc. VT8237/VX700 PCI Bridge
    00:08.0 Mass storage controller: Silicon Image, Inc. SiI 3124 PCI-X Serial ATA Controller (rev 02)
    00:0a.0 Ethernet controller: VIA Technologies, Inc. VT6120/VT6121/VT6122 Gigabit Ethernet Adapter (rev 11)
    00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
    00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
    00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
    00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800/K8T890 South]
    00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
    01:00.0 VGA compatible controller: nVidia Corporation NV44A [GeForce 6200] (rev a1)
    

    You should be able to spot the audio chipset in there, for example. If you can run lspci on your system and post the output into your question, that will help us help you.

  • Andy

    I'm not sure about the audio side of things, but I've used ndiswrapper to use Windows Wifi drivers within Linux at times.

    If you don't have any luck finding slightly more native drivers that should hopefully be able to give you your wireless (though it can sometimes take a bit of work).

  • CarlF

    The GeForce 9300 chipset should be supported by a modern Linux distro, e.g. Ubuntu 9.04. What distro are you using? Have you added the repositories for commercial (non-Free) software and updated? If you give more information on your OS we can be more helpful.

    EDIT: Original poster edited the question to include his distro.

    I don't know Mint. Have you added that distribution's versions of the multiverse repository to /etc/apt/sources.list? If you do, the necessary drivers should be installed automatically. If not, download the appropriate driver directly from nVidia here: http://www.nvidia.com/object/unix.html.