LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-30-2009, 11:09 PM   #1
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Rep: Reputation: 37
which module and firmware, a device is currently using??


Is there any way to know which module and firmware, a device is currently using??
 
Old 11-30-2009, 11:32 PM   #2
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Try searching through /proc and /sys. Another way is to use lshw.
 
Old 12-01-2009, 12:23 AM   #3
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Original Poster
Rep: Reputation: 37
what should i look for in /proc and /sys??
 
Old 12-01-2009, 07:15 AM   #4
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
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/

Last edited by thorkelljarl; 12-01-2009 at 09:32 AM.
 
Old 12-01-2009, 08:12 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Quote:
Originally Posted by firewiz87 View Post
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.

 
Old 12-01-2009, 07:18 PM   #6
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 12-01-2009, 08:10 PM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
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.
 
Old 12-02-2009, 04:30 AM   #8
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Original Poster
Rep: Reputation: 37
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??
 
Old 12-02-2009, 08:08 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,
Quote:
Originally Posted by firewiz87 View Post
<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.



The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
Old 12-02-2009, 05:43 PM   #10
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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 View Post
'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.
 
Old 12-02-2009, 05:55 PM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Quote:
Originally Posted by Electro View Post
<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!
 
Old 12-02-2009, 10:20 PM   #12
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by Electro View Post
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 View Post
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 View Post
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....
 
Old 12-03-2009, 01:59 AM   #13
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
Originally Posted by firewiz87 View Post
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 View Post
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 View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Failure to find E100 firmware even though present in /lib/firmware afhartman Linux - Networking 2 07-27-2009 07:31 AM
loading firmware on USB device with udev 559jmp Linux - General 2 11-09-2008 10:50 PM
trying to index firmware device # strawbee Fedora 1 06-02-2006 11:11 AM
flash cdrom device firmware from linux reddazz Linux - Hardware 2 03-16-2005 05:33 AM
SCSI Device unavailable after firmware download. Redhat or "sg" issue? jrvance Linux - Hardware 2 10-21-2003 01:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration