-1

I have tried tons of solutions to fix Suspen on ASUS, but none of them seem to help. I have tried the answer from here, which doesn't help.This script seemed to work on Ubuntu 11.10 but not on 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

With these answers now, all I every got on resume was either a Black or a White screen with mouse. Then I added nolapic on the GRUB_CMDLINE_LINUX_DEFAULT which seemed to help a little because it resumed to my original state with mouse but the system becomes unresponsive. I had to do a SysRq to safely restart my PC. If it helps, I'm on Ubuntu 12.04 . Kernel 3.2.0-30-generic-pae. ASUS X52F. Intel P6100 and 2GB RAM.

Steiger
  • 7,567

1 Answers1

-1

You must change the code for the 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