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 - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-13-2013, 10:46 PM   #1
Farkuldi
LQ Newbie
 
Registered: Nov 2012
Posts: 17

Rep: Reputation: Disabled
How to find out what module a device needs?


Hi,

I'm sure this is a simple question, but when I google something like "how to find out what kernel module I need linux," everything that comes up answers a slightly different question. I know how to use lsmod and modinfo to get information about modules that are already loaded, but what if I have a device that uses a module I do not have loaded? How do I find out what kernel module it is supposed to be using?

Say I have lspci output including the following

Code:
00:1b.0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 2 (rev c4)
00:1d.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation Panther Point 6 port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04)
00:1f.6 Signal processing controller: Intel Corporation Panther Point Thermal Management Controller (rev 04)
02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6235 (rev 24)
What is the best way to look up what driver I need for my network card,for instance, or my audio controller?

Information appreciated.
 
Old 08-14-2013, 04:09 AM   #2
Drumachine
Member
 
Registered: Aug 2013
Distribution: Debian/LFS
Posts: 32
Blog Entries: 3

Rep: Reputation: 5
Quote:
Originally Posted by Farkuldi View Post
What is the best way to look up what driver I need for my network card,for instance, or my audio controller?
I think the only real way to find out is by visiting the device manufacturer's website And finding the driver required from there.

Last edited by Drumachine; 08-14-2013 at 03:23 PM.
 
Old 08-14-2013, 09:24 AM   #3
Farkuldi
LQ Newbie
 
Registered: Nov 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
So you're saying that manufacturers routinely list which linux kernel module their device is going to use? Somehow I don't think so. I would think there would be something in the kernel documentation about which devices are supported by the modules these guys write. But I can't find it.
 
Old 08-14-2013, 09:31 AM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
What is the output from:

Code:
cat /proc/asound/card0/codec* | grep -i codec
Or similar, this is for *buntu
 
Old 08-14-2013, 07:25 PM   #5
Darth Maul
LQ Newbie
 
Registered: Aug 2013
Distribution: PClinuxOS 2013.7 KDE
Posts: 28

Rep: Reputation: Disabled
Quote:
Originally Posted by Farkuldi View Post
Hi,

I'm sure this is a simple question, but when I google something like "how to find out what kernel module I need linux," everything that comes up answers a slightly different question. I know how to use lsmod and modinfo to get information about modules that are already loaded, but what if I have a device that uses a module I do not have loaded? How do I find out what kernel module it is supposed to be using?

Say I have lspci output including the following
I don't have the answer you are looking for but you can use
Code:
lspci -vv
for a more verbose output of your devices.

This will show the devices and the kernel drivers and modules being used for that device.

There could be a possibility it may also show a device and a module it is trying to load. But don't quote me on that.
 
Old 08-15-2013, 01:46 AM   #6
Madhu Desai
Member
 
Registered: Mar 2013
Distribution: Rocky, Fedora, Ubuntu
Posts: 541

Rep: Reputation: 153Reputation: 153
Quote:
Originally Posted by Farkuldi View Post
"how to find out what kernel module I need linux,"
I'm not sure about that too... but as Drumachine has mentioned, probably should check device manufacturer's website.
Quote:
Originally Posted by Farkuldi View Post
what if I have a device that uses a module I do not have loaded? How do I find out what kernel module it is supposed to be using?
To get a complete list of all existing kernel module dependencies (regardless of whether kernel modules are loaded or not):
Code:
$ cat /lib/modules/$(uname -r)/modules.dep
More: http://xmodulo.com/2013/01/how-to-ch...-on-linux.html
 
Old 08-15-2013, 03:03 AM   #7
Drumachine
Member
 
Registered: Aug 2013
Distribution: Debian/LFS
Posts: 32
Blog Entries: 3

Rep: Reputation: 5
If you're running a distribution like Ubuntu, they have a list of all their available kernel modules listed here (this particular link is for Quantal).

http://packages.ubuntu.com/quantal/kernel/

Quote:
Originally Posted by Farkuldi View Post
I would think there would be something in the kernel documentation about which devices are supported by the modules these guys write. But I can't find it.
I think it depends on the module.

ndiswrapper for example, has a list on their website of supported and unsupported devices:

http://sourceforge.net/apps/mediawik...itle=Main_Page

Unfortunately, there doesn't seem to be this central database of kernel modules you're looking for. Instead, you'll need to investigate each device you have manually, using Google, and see if anything has been written.

P.S. Don't look a gift horse in the mouth.

Last edited by Drumachine; 08-15-2013 at 03:11 AM.
 
Old 08-15-2013, 05:10 AM   #8
Madhu Desai
Member
 
Registered: Mar 2013
Distribution: Rocky, Fedora, Ubuntu
Posts: 541

Rep: Reputation: 153Reputation: 153
you can also do the following do find all kernel modules (loaded/unloaded) for particular pci card. In this example, i am using audio controller.

Code:
#### Update from /usr/share/hwdata/pci.ids 
$ sudo update-pciids
Downloaded daily snapshot dated 2013-08-09 03:15:02
	
#### Find device code:
$ lspci -nn | grep -i audio
00:1b.0 Audio device [0403]: Intel Corporation NM10/ICH7 Family High Definition Audio Controller [8086:27d8] (rev 01)
	
#### Find kernel module for that device code:
$ lspci -vd 8086:27d8 | grep -i kernel
	Kernel driver in use: snd_hda_intel
	
#### Find module path and depended kernel modules that are loaded:
$ modinfo snd_hda_intel | grep -i 'filename\|depends'
filename:       /lib/modules/3.8.0-27-generic/kernel/sound/pci/hda/snd-hda-intel.ko
depends:        snd-hda-codec,snd-pcm,snd,snd-page-alloc
	
#### Find all modules (main/dependent and loaded/unloaded):
$ grep -i 'snd-hda-intel.ko' /lib/modules/$(uname -r)/modules.dep
kernel/sound/pci/hda/snd-hda-intel.ko: kernel/sound/pci/hda/snd-hda-codec.ko kernel/sound/core/snd-hwdep.ko kernel/sound/core/snd-pcm.ko kernel/sound/core/snd-page-alloc.ko kernel/sound/core/snd-timer.ko kernel/sound/core/snd.ko kernel/sound/soundcore.ko

Last edited by Madhu Desai; 08-15-2013 at 05:14 AM.
 
  


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
find association between HW device and driver/module m4rtin Linux - Hardware 5 10-18-2011 09:07 AM
[SOLVED] partport module is seing my parallel port but lp module doesn´t found any device... fcintron Linux - Hardware 3 03-07-2011 09:45 AM
How do I find out which module drives which device? baldy3105 Linux - General 13 04-07-2008 08:02 AM
How to find loaded module for device? kmokrzcyki Linux - Hardware 1 04-13-2007 11:19 AM
device eth0 entered prominous mode & modprobe:pppt0 Module can't find out !! AZIMBD03 Linux - Hardware 0 06-01-2004 02:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:19 PM.

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