« 1.2 Gestion des modules » : différence entre les versions

De UnixWiki
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
 
(Aucune différence)

Dernière version du 2 août 2014 à 22:50

Lister les modules

 # lsmod
 Module                  Size  Used by
 aes_x86_64              7340  1 
 aes_generic            25714  1 aes_x86_64
 cbc                     2539  1 
 ums_cypress             2461  0 
 usb_storage            39961  2 ums_cypress
 acpi_cpufreq            5571  0 
 cpufreq_powersave        902  0 
 cpufreq_stats           2659  0 
 cpufreq_userspace       1992  0 
 cpufreq_conservative     5162  0 
 xt_multiport            2267  2 
 sco                     7209  2 
 bnep                    9427  2 
 rfcomm                 29613  0 
 l2cap                  24736  4 bnep,rfcomm
 bluetooth              41827  6 sco,bnep,rfcomm,l2cap
 xt_tcpudp               2319  174 
 nf_conntrack_ipv4       9833  3 
 nf_defrag_ipv4          1139  1 nf_conntrack_ipv4
 xt_state                1303  3 
 nf_conntrack           46535  2 nf_conntrack_ipv4,xt_state
 ipt_ULOG                7129  4 
 iptable_filter          2258  1 
 ip_tables              13899  1 iptable_filter
 x_tables               12845  5 xt_multiport,xt_tcpudp,xt_state,ipt_ULOG,ip_tables
 binfmt_misc             6431  1 
 bridge                 39630  0 
 stp                     1440  1 bridge
 fuse                   50892  3 
 hwmon_vid               1828  0 
 dm_mirror              10923  1 
 dm_region_hash          6680  1 dm_mirror
 dm_log                  7381  3 dm_mirror,dm_region_hash
 coretemp                4325  0 
 radeon                574188  0 
 ttm                    40146  1 radeon
 drm_kms_helper         20065  1 radeon
 drm                   142359  3 radeon,ttm,drm_kms_helper
 i2c_algo_bit            4225  1 radeon
 kvm_intel              38146  0 
 kvm                   214088  1 kvm_intel
 loop                   11799  0 
 firewire_sbp2          11514  0 
 dm_crypt               10664  1 
 snd_hda_codec_atihdmi     2251  1 
 snd_hda_codec_realtek   235602  1 
 snd_hda_intel          20035  8 
 snd_hda_codec          54244  3 snd_hda_codec_atihdmi,snd_hda_codec_realtek,snd_hda_intel
 snd_hwdep               5380  1 snd_hda_codec
 arc4                    1274  2 
 snd_pcm_oss            32591  0 
 snd_mixer_oss          12606  1 snd_pcm_oss
 ecb                     1841  2 
 snd_pcm                60503  4 snd_hda_intel,snd_hda_codec,snd_pcm_oss
 snd_seq_midi            4400  0 
 ath5k                 112242  0 
 mac80211              137340  1 ath5k
 snd_rawmidi            15515  1 snd_seq_midi
 ath                     8006  1 ath5k
 snd_seq_midi_event      4628  1 snd_seq_midi
 cfg80211              101496  3 ath5k,mac80211,ath
 snd_seq                42881  3 snd_seq_midi,snd_seq_midi_event
 snd_timer              15582  3 snd_pcm,snd_seq
 rfkill                 13044  3 bluetooth,cfg80211
 led_class               2433  1 ath5k
 snd_seq_device          4493  3 snd_seq_midi,snd_rawmidi,snd_seq
 fglrx                2452362  248 
 joydev                  8459  0 
 evdev                   7352  17 
 snd                    46446  26 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
 serio_raw               3752  0 
 pcspkr                  1699  0 
 i2c_i801                7830  0 
 i2c_core               15819  5 radeon,drm_kms_helper,drm,i2c_algo_bit,i2c_i801
 soundcore               4598  1 snd
 snd_page_alloc          6249  2 snd_hda_intel,snd_pcm
 asus_atk0110            7670  0 
 button                  4650  0 
 processor              29935  1 acpi_cpufreq
 ext4                  289033  8 
 mbcache                 5050  1 ext4
 jbd2                   67015  1 ext4
 crc16                   1319  2 l2cap,ext4
 usbhid                 33292  0 
 hid                    63257  1 usbhid
 dm_mod                 53706  37 dm_mirror,dm_log,dm_crypt
 sg                     18744  0 
 sr_mod                 12602  0 
 cdrom                  29415  1 sr_mod
 sd_mod                 29921  7 
 crc_t10dif              1276  1 sd_mod
 ata_generic             3047  0 
 uhci_hcd               18521  0 
 firewire_ohci          19676  0 
 ahci                   32374  0 
 ata_piix               21124  4 
 thermal                11674  0 
 floppy                 49087  0 
 pata_jmicron            2280  0 
 libata                133632  4 ata_generic,ahci,ata_piix,pata_jmicron
 firewire_core          36848  2 firewire_sbp2,firewire_ohci
 crc_itu_t               1307  1 firewire_core
 atl1                   26034  0 
 mii                     3210  1 atl1
 scsi_mod              122149  7 ums_cypress,usb_storage,firewire_sbp2,sg,sr_mod,sd_mod,libata
 thermal_sys            11942  2 processor,thermal
 ehci_hcd               32081  0 
 usbcore               122386  6 ums_cypress,usb_storage,usbhid,uhci_hcd,ehci_hcd
 nls_base                6377  1 usbcore

Charger un modules

 # modprobe usbcore

Ou

 #insmod [ filename ] [ module options ... ]

Décharger un module

 #rmmod usbcore

ou

 #modprobe -r usbcore

Pour charger automatiquement les modules au boot, il faut les inscrire dans /etc/modules

 #cat /etc/modules 
 # /etc/modules: kernel modules to load at boot time.
 #
 # This file contains the names of kernel modules that should be loaded
 # at boot time, one per line. Lines beginning with "#" are ignored.
 # Parameters can be specified after the module name.
firewire-sbp2 loop kvm kvm-intel radeon
# Generated by sensors-detect on Fri Nov 12 21:23:10 2010 # Chip drivers coretemp w83627ehf

Config des modules dans /etc/modprobe.d/$fichier

 # more radeon-kms.conf
 options radeon modeset=1

Blacklister un module l'inscrire dans /etc/modprobe.d/blacklist.conf

 #more blacklist.conf
 # This file lists modules which will not be loaded as the result of
 # alias expansion, with the purpose of preventing the hotplug subsystem
 # to load them. It does not affect autoloading of modules by the kernel.
 # This file is provided by the udev package.
# evbug is a debug tool and should be loaded explicitly blacklist evbug
# these drivers are very simple, the HID drivers are usually preferred blacklist usbmouse blacklist usbkbd

Compiler un modules simplement (Debian)

 m-a a-i -t nvidia madwifi

Ou pour un autre kernel que celui booter

m-a a-i -l 2.6.29-1-amd64 -t nvidia madwifi

ou

dkms build -m fglrx -v 13.12 -k 3.14-0.bpo.1-amd64

Trouver sans se prendre la tête la liste des modules utiles: kmuto