You are not logged in.

#1 2010-06-30 03:31:55

abraham10
Member
Registered: 2010-04-20
Posts: 77

Hwdetect - Question

Ok when I execute hwdetect I get this:

hwdetect --modules
MODULES=(ac battery button fan processor thermal video agpgart intel-agp tpm_bios tpm tpm_tis tpm_tis drm_kms_helper drm i915 i2c-algo-bit i2c-i801 i2c-core evdev joydev pcspkr psmouse serio_raw led-class uvcvideo v4l1-compat videodev pci_hotplug shpchp wmi rtc-cmos rtc-core rtc-lib output snd-mixer-oss snd-pcm-oss snd-hwdep snd snd-page-alloc snd-pcm snd-timer snd-hda-codec snd-hda-intel soundcore scsi_mod ahci atl1c mac80211 rfkill ath9k_common ath9k_hw ath9k ath cfg80211 usbcore ehci-hcd uhci-hcd option usbserial sd_mod st)

but when I execute this:

lspci
00:00.0 Host bridge: Intel Corporation Pineview DMI Bridge
00:02.0 VGA compatible controller: Intel Corporation Pineview Integrated Graphics Controller
00:02.1 Display controller: Intel Corporation Pineview Integrated Graphics Controller
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation Tigerpoint LPC Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801GR/GH (ICH7 Family) SATA AHCI Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
01:00.0 Ethernet controller: Atheros Communications Atheros AR8132 / L1c Gigabit Ethernet Adapter (rev c0)
02:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

What I don't get is why are so many modules detected for loading when I don't see that much hardware for it... also why is it that it detects mac80211 ath9k_common ath9k_hw ath9k ath cfg8021, when all I need is the ath9k modules and that's it. There are some modules that extra I think.

Last edited by abraham10 (2010-06-30 03:32:47)


Most of the question asked can be solved just by reading:
Beginner's Wiki.
Pacman Man.
AUR.

Offline

#2 2010-06-30 03:59:51

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: Hwdetect - Question

"lspci" is a utility for displaying information about PCI buses in the system and devices connected to them, whereas "lsmod" or "hwdetect --modules" are utilities for showing you what kernel modules are loaded on your system. Read "man lspci" and "man lsmod" for more info.

Sometimes certain modules are dependant upon others to run effectively - I suspect this is the case with the ath9 modules.


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#3 2010-06-30 04:21:31

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,348

Re: Hwdetect - Question

Well, I see a few  things right off the bat.

Not all hardware exists on the PCI bus.  ac battery button fan processor thermal are all ACPI.  Depending on the system, ACPI functions may or may not be read across the PCI bus from one of the bridge chips.  Regardless, these functions are abstractions to provide a common API for a particular sub function. 

agpgart intel-agp are definitely not PCI functions.  These high bandwidth ports exist straight off of the Northbridge specifically to keep video off of the PCI bus.

i2c-algo-bit i2c-i801 i2c-core functions exist on an i2c bus (i squared c)  or Inter-Intetegrated Circuit bus, a two wire, low bandwidth bus used simple communications between chips where speed is not required (temp sensors, LED controls, etc.)  Again, to reach the controller for the bus, the system may talk across one of the bridge chips, and it may even exist on your ISA bus.  It does not matter how the bus is reached, because the kernel module abstracts that away such that there exists an API appropriate for talking to things on the I2C bus.

Other things, such as your sound modules provide function specific layers on top of underlying layers.  The core and codecs stuff drive the PCI hardware, but other modules such as the PCM OSS and Mixer OSS provide function specific APIs that layer on top of the core stuff.  If you don't want a mixer, you can block that module from loading, but the other APIs will still load and exist.

Lastly, it appears you have at least one serial device hanging on a USB bus that does not show up in your lspci.  This connection might be internal to the machine or, of course, it could be plugged into a USB port somewhere


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2010-06-30 17:34:54

abraham10
Member
Registered: 2010-04-20
Posts: 77

Re: Hwdetect - Question

@ewaller I see what you mean about the command lsmod.

lsmod
Module                  Size  Used by
binfmt_misc             8356  1 
ppdev                   6688  0 
snd_hda_codec_realtek   203328  1 
snd_hda_intel          27016  2 
snd_hda_codec          75708  2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep               7200  1 snd_hda_codec
snd_pcm_oss            37920  0 
snd_mixer_oss          16028  1 snd_pcm_oss
fbcon                  36640  71 
tileblit                2460  1 fbcon
font                    8124  1 fbcon
bitblit                 5372  1 fbcon
softcursor              1756  1 bitblit
snd_pcm                75296  3 snd_hda_intel,snd_hda_codec,snd_pcm_oss
arc4                    1660  2 
ecb                     2524  2 
joydev                 10240  0 
snd_seq_dummy           2656  0 
snd_seq_oss            28576  0 
snd_seq_midi            6464  0 
ath9k                 307864  0 
snd_rawmidi            22176  1 snd_seq_midi
snd_seq_midi_event      6940  2 snd_seq_oss,snd_seq_midi
snd_seq                50224  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
mac80211              211628  1 ath9k
snd_timer              22276  2 snd_pcm,snd_seq
ath                     8444  1 ath9k
i915                  226120  3 
snd_seq_device          6920  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
drm                   160032  3 i915
snd                    59204  16 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
uvcvideo               59080  0 
acer_wmi               15936  0 
cfg80211              130632  3 ath9k,mac80211,ath
i2c_algo_bit            5760  1 i915
videodev               36736  1 uvcvideo
atl1c                  30880  0 
soundcore               7264  1 snd
v4l1_compat            14336  2 uvcvideo,videodev
led_class               4096  2 ath9k,acer_wmi
intel_agp              27676  2 i915
agpgart                34988  2 drm,intel_agp
video                  19380  1 i915
psmouse                57332  0 
snd_page_alloc          9156  2 snd_hda_intel,snd_pcm
output                  2780  1 video
serio_raw               5280  0 
lp                      8964  0 
parport                35340  2 ppdev,lp

@lagagnon and thanks for the explanation.


Most of the question asked can be solved just by reading:
Beginner's Wiki.
Pacman Man.
AUR.

Offline

#5 2010-07-01 01:02:35

abraham10
Member
Registered: 2010-04-20
Posts: 77

Re: Hwdetect - Question

So is it safe to say that I can put the modules that are displayed by hwdetect in my rc.conf and disable MOD_AUTOLOAD. If I were to do this what would be the cons?


Most of the question asked can be solved just by reading:
Beginner's Wiki.
Pacman Man.
AUR.

Offline

#6 2010-07-01 03:07:13

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,348

Re: Hwdetect - Question

I am not the expert on this, but I would say that it is okay.  The only drawback I can see is if something in your system changes -- you would have to update your module list.  Another consideration, I don't know if the kernel guys ever refactor things and change the module names from kernel to kernel.  It too would be something to watch for.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB