LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   which module and firmware, a device is currently using?? (https://www.linuxquestions.org/questions/linux-hardware-18/which-module-and-firmware-a-device-is-currently-using-772577/)

firewiz87 11-30-2009 11:09 PM

which module and firmware, a device is currently using??
 
Is there any way to know which module and firmware, a device is currently using??

Electro 11-30-2009 11:32 PM

Try searching through /proc and /sys. Another way is to use lshw.

firewiz87 12-01-2009 12:23 AM

what should i look for in /proc and /sys??

thorkelljarl 12-01-2009 07:15 AM

Command...

The command "lsmod" will tell you what modules are loaded. See "man lsmod".

"lshw" is not on all distributions, but can usually be obtained and installed. It gives a very good report of the system hardware and its software support. It should also give you a listing of the firmware of the hardware devices.

I obtained my openSUSE RPM here.

http://rpm.pbone.net/

onebuck 12-01-2009 08:12 AM

Hi,

Quote:

Originally Posted by firewiz87 (Post 3775196)
Is there any way to know which module and firmware, a device is currently using??

Code:

snippet;

~#lspci -vv
00:13.0 USB Controller: ATI Technologies Inc SB600 USB (OHCI0) (prog-if 10 [OHCI])
        Subsystem: Dell Device 01f5                                             
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 64, Cache Line Size: 32 bytes                                                               
        Interrupt: pin A routed to IRQ 16                                                                   
        Region 0: Memory at c0005000 (32-bit, non-prefetchable) [size=4K]                                   
        Kernel driver in use: ohci_hcd                                                                       
        Kernel modules: ohci-hcd

You should 'man lspci' to get a little more information.

:hattip:

Electro 12-01-2009 07:18 PM

The utility lspci will only show you PCI related devices that are installed and looks up the vendor ID and product ID to state the name of the device by searching through the pci.ids file. If you insist on using lspci, type "lspci -knn" to only post modules used for devices that are installed, but it will not tell you the firmware of the device. Again search through /proc and /sys. Sorry can not give you the full path where the information is located because not all modules or drivers places the data in the same place. All I can say you have to be curious and browse through all the directories and cat a few files in them. If BASH turns to gibberish, type in reset and hit enter.

The utility lshw is never installed in any distribution. You always have to install it separately.

onebuck 12-01-2009 08:10 PM

Hi,

I agree with what you say. I normally use 'lspci -vv' to show for those devices. I will use the other commands and methods to identify for particular devices. But most of the problems that I experience are for 'pci' devices. Most of my usb and subsystems identify without error (so far). :)

Loads of people fail to really identify their systems and components to ease their work with device drivers/handlers. Of course the '/proc' & '/sys' are the locations to look for information. But as I said users should identify their systems components so as to understand what should be used. By using 'dmidecode' the system components can be identified thus leading one to selection of potential drivers/handlers. Heck, loads of users don't even spec their system documentation to identify components.

Quote:

excerpt 'man dmidecode';
NAME
dmidecode - DMI table decoder

SYNOPSIS
dmidecode [OPTIONS]

DESCRIPTION
dmidecode is a tool for dumping a computer's DMI (some say SMBIOS) table contents in a human-readable
format. This table contains a description of the system's hardware components, as well as other useful
pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve
this information without having to probe for the actual hardware. While this is a good point in terms of
report speed and safeness, this also makes the presented information possibly unreliable.
:hattip:

firewiz87 12-02-2009 04:30 AM

Thanks for the quick response guys...

The main reason for such a question is to find a solution (easily) when
1. one distro supports a hardware out-of-the-box and another does nt
2. The distro installer detects the device but the installed system does not
and so on

@onebuck: Thanks for the example
By the way the xample shows, "driver in use" and "kernel module" separately. I am curious to know the difference between a Device Driver and a Module (or Kernel module).I understand the purpose of a device driver, can you refer to a module interchangeably?

That settles the "find the module part" finding the firmware is another problem...
There should be some record which indicates which firmware is to be used by a hardware, right??

onebuck 12-02-2009 08:08 AM

Hi,
Quote:

Originally Posted by firewiz87 (Post 3776827)
<snip>

@onebuck: Thanks for the example
By the way the xample shows, "driver in use" and "kernel module" separately. I am curious to know the difference between a Device Driver and a Module (or Kernel module).I understand the purpose of a device driver, can you refer to a module interchangeably?

That settles the "find the module part" finding the firmware is another problem...
There should be some record which indicates which firmware is to be used by a hardware, right??

'Loadable Kernel Module (LKM)' is a module that extends the running kernel to allow services to a device or filesystem. A device driver or software driver is nothing more than the means of a program to allow higher level programs to interact with hardware.

'Firmware' is the means for a small fixed interactive program to control hardware internally to that same hardware. Most manufactures provide the program information, parameters and keywords which provides the means to interactively control via the low level control of the hardware. Physical control is via the 'firmware' of the device.

As for identification of firmware, that's the manufactures responsibility. You identify the hardware then insure that the proper firmware is implemented. If not then a firmware upgrade/downgrade would be necessary. From the user implemented aspect you are lucky if the means for a open source are available.

The above is a rather broad description but you can read or research further via Google, books or tutorials. Look at 'Linux Books & Online Magazines' and 'Tutorials' sections of 'Slackware-Links' to select additional information.

:hattip:

The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

Electro 12-02-2009 05:43 PM

Quote:

The main reason for such a question is to find a solution (easily) when
1. one distro supports a hardware out-of-the-box and another does nt
2. The distro installer detects the device but the installed system does not
and so on
All distributions are Linux. If you pick one distribution and you think it does not support your hardware. Think again. You can always download the modules or drivers to support your hardware with your desire distribution. The installers for each distribution are using a database system to find out what module should work with your hardware.



Quote:

Originally Posted by onebuck (Post 3777078)
'Loadable Kernel Module (LKM)' is a module that extends the running kernel to allow services to a device or filesystem. A device driver or software driver is nothing more than the means of a program to allow higher level programs to interact with hardware.

'Firmware' is the means for a small fixed interactive program to control hardware internally to that same hardware. Most manufactures provide the program information, parameters and keywords which provides the means to interactively control via the low level control of the hardware. Physical control is via the 'firmware' of the device.

As for identification of firmware, that's the manufactures responsibility. You identify the hardware then insure that the proper firmware is implemented. If not then a firmware upgrade/downgrade would be necessary. From the user implemented aspect you are lucky if the means for a open source are available.

You describe a device driver and module wrong for Linux. A module is the same as a driver when dealing with Linux.

There is a simpler terms for firmware which is the main brains of the hardware that is not controlled by the OS. It is more like a BIOS.

The dmidecode depends on the BIOS. If it is buggy, most are, the information printed is questionable. I strongly recommend lshw because it does a more thorough scan even if the BIOS is buggy and it prints information that is easier to read. When Windows users comes over to Linux and they want something similar to what they use in Windows, lshw does just that. The utility lshw includes GUI to make it easier for Windows users to look at their setup.

onebuck 12-02-2009 05:55 PM

Hi,

Quote:

Originally Posted by Electro (Post 3777717)
<snip>

You describe a device driver and module wrong for Linux. A module is the same as a driver when dealing with Linux.

There is a simpler terms for firmware which is the main brains of the hardware that is not controlled by the OS. It is more like a BIOS.

The dmidecode depends on the BIOS. If it is buggy, most are, the information printed is questionable. I strongly recommend lshw because it does a more thorough scan even if the BIOS is buggy and it prints information that is easier to read. When Windows users comes over to Linux and they want something similar to what they use in Windows, lshw does just that. The utility lshw includes GUI to make it easier for Windows users to look at their setup.

Electro, again?

No pissing contest.

Re-define it then!

How is it wrong? What's a 'LKM' to you? What's a device driver but a software driver thus a program that is used to allow interaction or interface to hardware/filesystem? Polish it or spin it your way.

Quote:

'Loadable Kernel Module (LKM)' is a module that extends the running kernel to allow services to a device or filesystem. A device driver or software driver is nothing more than the means of a program to allow higher level programs to interact with hardware.
Not in understandable terms?

Semantics or just not understanding others point of view or definitions?

Enough!

firewiz87 12-02-2009 10:20 PM

Quote:

Originally Posted by Electro (Post 3777717)
All distributions are Linux. If you pick one distribution and you think it does not support your hardware. Think again.

I did not say that one distro supports a hardware and another distro does not... what i said is one distro may support a hardware "out of the box" and another does not support the hardware out of the box... hope u got the difference...

Quote:

Originally Posted by Electro (Post 3777717)
You can always download the modules or drivers to support your hardware with your desire distribution.

Thats exactly what i do... and that is also the reason why i posed the question....
For example, my wireless card is supported out of the box (without any configuration) by fedora where as I have to manually configure the card to make it run on openSUSE.... so if i could get the card's module and firmware details from fedora, it would be easy to setup the card in openSUSE.

Quote:

Originally Posted by Electro (Post 3777717)
A module is the same as a driver when dealing with Linux.

That is something i want to clarify.... so can the terms module and driver be used used interchangeably??

The firmware is also something i need clarification... i thought firmware would be something that is closer to the hardware... like a piece of software that exists within the hardware like in a ROM or something... something that has to be "flashed"...
The concept of installing a firmware to the system does nt make sense to me....

Electro 12-03-2009 01:59 AM

Quote:

Originally Posted by firewiz87 (Post 3777903)
I did not say that one distro supports a hardware and another distro does not... what i said is one distro may support a hardware "out of the box" and another does not support the hardware out of the box... hope u got the difference...


Thats exactly what i do... and that is also the reason why i posed the question....
For example, my wireless card is supported out of the box (without any configuration) by fedora where as I have to manually configure the card to make it run on openSUSE.... so if i could get the card's module and firmware details from fedora, it would be easy to setup the card in openSUSE.

Some distributions includes a utility to check the hardware and look it up in its database. Other distributions may not have it. If this is too hard to understand go back to Mac or Windows.

When dealing with devices like wireless NIC, it is different the the module version and additional firmware version have to be compatible. The module developer for the wireless NIC will or should tell you what firmware version works with what module version.

Quote:

Originally Posted by firewiz87 (Post 3777903)
That is something i want to clarify.... so can the terms module and driver be used used interchangeably??

You can interchange module and driver, but it is module if you dealing with Linux and driver for Windows. Though printers and scanners uses a layer system of general purpose module and libraries to control them.

Quote:

Originally Posted by firewiz87 (Post 3777903)
The firmware is also something i need clarification... i thought firmware would be something that is closer to the hardware... like a piece of software that exists within the hardware like in a ROM or something... something that has to be "flashed"...
The concept of installing a firmware to the system does nt make sense to me....

Yes the firmware is on-board each device in a computer to give it enough brains to do its job, so the main computer does not have to do it. Some devices may need additional firmware to be compatible with software like a module or driver. The additional firmware is just a temporarily upgrade.


All times are GMT -5. The time now is 01:22 AM.