レジューム後、USB が使えなくなる (ThinkPad T40, X31, R40で Plamo 4.01/02のとき) 2005.8.14 原因 根本的な原因は不明。 起動時にロードされている USBドライバモジュール(ehci-hcd)が、 レジューム後に機能しなくなるために起こるようである。 対処法 USBドライバモジュール(ehci-hcd)をアンロードして、再度、ロードする。 # /sbin/rmmod ehci-hcd # /sbin/insmod ehci-hcd リジューム後の、 USBドライバモジュールのアンロード+ロードを簡単に行なう方法(2方法) [1] レジューム毎に行なうスクリプトを作成する 1. root以外の者がモジュールのロード、アンロードが行なえるようにする: # chmod 4755 /sbin/rmmod # chmod 4755 /sbin/insmod 2. usb というファイル名で、以下のスクリプトを作成する: --------------------------------- #!/bin/tcsh /sbin/rmmod ehci-hcd sleep 1 /sbin/insmod ehci-hcd --------------------------------- 3. (使用法)レジューム後に % usb USB機器(デバイス)を装着したままでも行なえる。 [2] 以下のように /etc/apmd_proxy に書き込み(書き込むのは、==> で記した2箇 所)、次のようにリンクをはることによって、自動的にアンロード+ロードを行 なう。 # ln -s /usr/sbin/apmd /etc/rc.d/init.d/apmd 再起動 ただし、R40 ではこの方法をとると、レジュームの後、X画面が固まることがあ る。 /etc/apmd_proxy # ----------------------- SUSPEND and STANDBY ---------------------- # Handle customized behavior for APM standby and suspend events # here. Depending on your system, you may wish to enable some of # the example actions that follow. "suspend"|"standby") # Activate this segment if you wish to disable normal suspend # events when you are on AC power. This segment only works if # your APM BIOS sends "suspend system" events after an idle # period. Also, you must be running a Linux kernel APM # driver version 1.10 or higher (run "apm" to find out). # if [ $SUSPEND_ON_AC = false -a $2 = system ]; then if on_ac_power >/dev/null; then exit 1 # Reject (NOTE kernel support must be enabled) fi fi if [ $1 = standby ]; then exit 0 fi # Standby events typically do not go past this point, but can # if you comment out the above lines. # Activate this segment if you wish to disable PCMCIA services # upon suspend events. The PCMCIA driver nominally will # suspend all cards before reaching this point, but certain # cards cannot be suspended properly (notably, SCSI cards). # These cards must be forcefully software-ejected. If you # uncomment this code, then be sure to also uncomment the # corresponding segment under RESUME. Calling "cardctl # suspend" is needed for systems whose PCMCIA modules are # available but not APM-aware. Calling it more than once is # not harmful. # if [ -x /sbin/cardctl ]; then if [ $PCMCIA_EJECT_ON_SUSPEND = true ]; then /sbin/cardctl eject else /sbin/cardctl suspend fi fi # Uncomment this segment if your graphics card does not resume # in graphics mode properly (ie, in X windows). This action # changes the screen to virtual console number 1, which is # usually a text console. Upon resume, you will need to # change back to your X console manually. # # if [ -x /usr/bin/chvt ]; then # /usr/bin/chvt 1; sleep 1 # fi # other common actions: unload troublesome drivers # EXAMPLE: OSS sound may not suspend/resume properly # - Unload the drivers here and then reload upon resume # Path may vary. Be sure to enable "soundon" below. # /usr/local/bin/soundoff ==> /sbin/rmmod ehci-hcd ;; # ------------------------------- RESUME --------------------------- # Resume ... from standby is a NOP, except the clock update. "resume") # Typically the Linux system clock needs to be reset. update_clock # Activate this segment if you "ejected" PCMCIA cards above. # The default operation is to "resume", which is required for # systems whose PCMCIA modules are not APM-aware. # if [ $2 = suspend -a -x /sbin/cardctl ]; then if [ $PCMCIA_EJECT_ON_SUSPEND = true ]; then /sbin/cardctl insert else /sbin/cardctl resume fi fi # Drives can forget their time-out setting after suspend, # so we may have to reprogram the drive. if on_ac_power >/dev/null; then power_performance else power_conserve fi # other common actions: reload troublesome drivers # EXAMPLE: reload OSS sound drivers. Path may vary. # /usr/local/bin/soundon ==> /sbin/insmod ehci-hcd ;;