暂停无法与华硕正常配合使用。

暂停无法与华硕正常配合使用。

我尝试了很多解决方案来修复 ASUS 上的 Suspen,但似乎都没有帮助。我尝试了这里,这没有帮助。该脚本似乎在 Ubuntu 11.10 上运行,但在 12.04 上运行不起来。

  #!/bin/sh
# File: "/etc/pm/sleep.d/20_custom-ehci_hcd".
case "${1}" in
        hibernate|suspend)
              # Unbind ehci_hcd for first device 0000:00:1a.0:
               echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
              # Unbind ehci_hcd for second device 0000:00:1d.0:
               echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
        ;;
        resume|thaw)
              # Bind ehci_hcd for first device 0000:00:1a.0:
              echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci_hcd/bind
              # Bind ehci_hcd for second device 0000:00:1d.0:
              echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci_hcd/bind
        ;;
esac

现在有了这些答案,我得到的只是使用鼠标时屏幕变黑或变白。然后我添加了,nolapicGRUB_CMDLINE_LINUX_DEFAULT似乎有点帮助,因为它恢复到使用鼠标时的原始状态,但系统变得无响应。我不得不执行 SysRq 才能安全地重启我的电脑。如果它有帮助,我在 Ubuntu 12.04 上。内核 3.2.0-30-generic-pae。华硕 X52F。英特尔 P6100 和 2GB RAM。

答案1

您必须更改 20_custom-ehci_hcd 的代码

#!/bin/sh 
VERSION=1.1
DEV_LIST=/tmp/usb-dev-list
DRIVERS_DIR=/sys/bus/pci/drivers
DRIVERS="ehci xhci" # ehci_hcd, xhci_hcd
HEX="[[:xdigit:]]"
MAX_BIND_ATTEMPTS=2
BIND_WAIT=0.1

unbindDev() {
  echo -n > $DEV_LIST 2>/dev/null
  for driver in $DRIVERS; do
    DDIR=$DRIVERS_DIR/${driver}_hcd
    for dev in `ls $DDIR 2>/dev/null | egrep "^$HEX+:$HEX+:$HEX"`; do
      echo -n "$dev" > $DDIR/unbind
      echo "$driver $dev" >> $DEV_LIST
    done
  done
}

bindDev() {
  if [ -s $DEV_LIST ]; then
    while read driver dev; do
      DDIR=$DRIVERS_DIR/${driver}_hcd
      while [ $((MAX_BIND_ATTEMPTS)) -gt 0 ]; do
          echo -n "$dev" > $DDIR/bind
          if [ ! -L "$DDIR/$dev" ]; then
            sleep $BIND_WAIT
          else
            break
          fi
          MAX_BIND_ATTEMPTS=$((MAX_BIND_ATTEMPTS-1))
      done  
    done < $DEV_LIST
  fi
  rm $DEV_LIST 2>/dev/null
}

case "$1" in
  hibernate|suspend) unbindDev;;
  resume|thaw)       bindDev;;
esac

相关内容