/etc/default/acpi-support 第89行
MODULES_WHITELIST=""
你可以把usb controller对应的内核模块加进去
linux的说明文档之所以永远2b的地放在于尽管你知道了你要做什么,但是你仍然不知道怎么做,比如说现在你要把
某些内核模块加进去,你就需要知道它们的名字,但是你不知道,好像也没有什么文档告诉过你。
首先,我不认为你挂起无法恢复的原因在于usb,我觉得是电源管理与其他硬件的冲突,例如显卡驱动。关于这部分,你可以到
/var/log下去看看有关系统错误的日志,大概10分钟就能找到原因了。
其次,你可以试试modinfo这个命令,例如
代码: 全选
modinfo usb-storage
filename: /lib/modules/3.2.0-23-generic/kernel/drivers/usb/storage/usb-storage.ko
license: GPL
description: USB Mass Storage driver for Linux
author: Matthew Dharm <
[email protected]>
srcversion: 5CCA4DDD8CDB238F75CB1F7
depends:
intree: Y
vermagic: 3.2.0-23-generic SMP mod_unload modversions
parm: option_zero_cd:ZeroCD mode (1=Force Modem (default), 2=Allow CD-Rom (uint)
parm: swi_tru_install:TRU-Install mode (1=Full Logic (def), 2=Force CD-Rom, 3=Force Modem) (uint)
parm: delay_use:seconds to delay before using a new device (uint)
parm: quirks:supplemental list of device IDs and their quirks (string)
那如何找到内核模块的名字呢,这个好办,lsmod命令会列出所有当前载入的内核模块,在我这里是这样
Module Size Used by
rfcomm 47604 0
parport_pc 32866 0
ppdev 17113 0
bnep 18281 2
bluetooth 180104 10 rfcomm,bnep
nvidia 11213999 44
snd_hda_codec_hdmi 32474 4
arc4 12529 2
acer_wmi 28418 0
sparse_keymap 13890 1 acer_wmi
snd_hda_codec_realtek 223867 1
joydev 17693 0
uvcvideo 72627 0
snd_hda_intel 33773 5
snd_hda_codec 127706 3 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel
snd_hwdep 13668 1 snd_hda_codec
videodev 98259 1 uvcvideo
snd_seq_midi 13324 0
v4l2_compat_ioctl32 17128 1 videodev
snd_rawmidi 30748 1 snd_seq_midi
snd_pcm 97188 3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_seq_midi_event 14899 1 snd_seq_midi
psmouse 87603 0
serio_raw 13211 0
snd_seq 61896 2 snd_seq_midi,snd_seq_midi_event
snd_seq_device 14540 3 snd_seq_midi,snd_rawmidi,snd_seq
snd_timer 29990 2 snd_pcm,snd_seq
mac_hid 13253 0
ath9k 132390 0
snd 78855 20 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_rawmidi,snd_pcm,snd_seq,snd_seq_device,snd_timer
mac80211 506816 1 ath9k
ath9k_common 14053 1 ath9k
ath9k_hw 411112 2 ath9k,ath9k_common
ath 24067 3 ath9k,ath9k_common,ath9k_hw
cfg80211 205544 3 ath9k,mac80211,ath
soundcore 15091 1 snd
snd_page_alloc 18529 2 snd_hda_intel,snd_pcm
mei 41616 0
lp 17799 0
parport 46562 3 parport_pc,ppdev,lp
vesafb 13844 1
usbhid 47199 0
hid 99559 1 usbhid
video 19596 0
tg3 152032 0
wmi 19256 1 acer_wmi
你可能会觉得这个办法太笨,其实还好,仔细数数,内核里加载的模块也不多。我这里没有出现usb-storage这个模块,
这表示当前我的电脑上没有插入usb设备。
最后,还有一个很好的办法可以确定一些内核模块的名字,在所有的内核模块中,有一部分是负责提供硬件驱动的,例如硬盘,声卡,usb等。
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)
Subsystem: Acer Incorporated [ALI] Device 0370
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 12)
Kernel driver in use: pcieport
Kernel modules: shpchp
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)
Subsystem: Acer Incorporated [ALI] Device 0370
Kernel driver in use: mei
Kernel modules: mei
00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
Subsystem: Acer Incorporated [ALI] Device 0370
Kernel driver in use: ehci_hcd
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
Subsystem: Acer Incorporated [ALI] Device 0370
Kernel driver in use: snd_hda_intel
Kernel modules: snd-hda-intel
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05)
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05)
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
Subsystem: Acer Incorporated [ALI] Device 0370
Kernel driver in use: ehci_hcd
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)
Subsystem: Acer Incorporated [ALI] Device 0370
Kernel modules: iTCO_wdt
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 05)
Subsystem: Acer Incorporated [ALI] Device 0370
Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)
Subsystem: Acer Incorporated [ALI] Device 0370
Kernel modules: i2c-i801
02:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 310M] (rev a2)
Subsystem: Acer Incorporated [ALI] Device 0370
Kernel driver in use: nvidia
Kernel modules: nvidia, nouveau, nvidiafb
02:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
Subsystem: Acer Incorporated [ALI] Device 0370
Kernel driver in use: snd_hda_intel
Kernel modules: snd-hda-intel
03:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57780 Gigabit Ethernet PCIe (rev 01)
Subsystem: Acer Incorporated [ALI] Aspire 7740G
Kernel driver in use: tg3
Kernel modules: tg3
05:00.0 Network controller: Atheros Communications Inc. AR928X Wireless Network Adapter (PCI-Express) (rev 01)
Subsystem: Foxconn International, Inc. T77H047.31 802.11bgn Wireless Half-size Mini PCIe Card [AR9283]
Kernel driver in use: ath9k
Kernel modules: ath9k
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)
Subsystem: Intel Corporation Device 8086
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)
Subsystem: Intel Corporation Device 8086
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
Subsystem: Intel Corporation Device 8086
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)
Subsystem: Intel Corporation Device 8086
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
Subsystem: Intel Corporation Device 8086
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
Subsystem: Intel Corporation Device 8086
看到了吗,在我的电脑上有两个USB controller,负责控制它们的那个内核模块的名字是ehci_hcd。在你那里呢?
jsxlop 写了:我找到了问题所在,但是没法解决。
在 /ect/default/acpi-support 文件中有这么一段:
代码: 全选
Note that newwork cards and USB controllers will automaticalyy be unloaded unless they're listed in MODULES_WHITELIST
也就是挂起的时候会先卸载我的USB移动硬盘,而我的Ubuntu系统就是装在移动硬盘上。这个肯定会有问题。
但是 USB controllers 有哪些module是我需要添加到MODULES_WHITELIST呢?
求高手指点!