Results 1 to 7 of 7

Thread: Suspend fix for Asus U36JC (k)ubuntu 12.04

  1. #1
    Join Date
    Apr 2011
    Beans
    14

    Lightbulb Suspend fix for Asus U36JC (k)ubuntu 12.04

    Found a working suspend fix for Asus U36JC;

    Code:
    #!/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
    sudo nano /etc/pm/sleep.d/20_custom-ehci_hcd

    Paste the script above and save. Make it executable.

    sudo chmod +x /etc/pm/sleep.d/20_custom-ehci_hcd

    Suspend should now work

  2. #2
    Join Date
    May 2012
    Beans
    2

    Re: Suspend fix for Asus U36JC (k)ubuntu 12.04

    Fantastic! This works a treat on my Asus X73S. Thanks.

    Edit: I found the original post here:

    http://thecodecentral.com/2011/01/18...ot-working-bug

    Lots of people commented saying it fixed the problem. My question as a new Ubuntu user:

    How does a bug like this not get fixed in 12.04 when it has been happening for > 18 months and affects so many people???
    Last edited by toolio; May 20th, 2012 at 11:58 PM.

  3. #3
    Join Date
    Apr 2011
    Beans
    14

    Re: Suspend fix for Asus U36JC (k)ubuntu 12.04

    I think the suspend/hibernate problem has to do with Asus? Seems like lots of Asus users have problem with this. Hope this fix is more permanent for future updates to

    Anyone tried if hibernate works with this fix? Have no swap, so I can't test it
    Last edited by zynex; May 24th, 2012 at 09:38 PM.

  4. #4
    Join Date
    May 2012
    Beans
    2

    Re: Suspend fix for Asus U36JC (k)ubuntu 12.04

    No swap here either!

  5. #5
    Join Date
    Jun 2010
    Beans
    116
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Suspend fix for Asus U36JC (k)ubuntu 12.04

    Doesn't work for me. I have a 6.2 GB swap with an encrypted home directory. Suspend will work once, but then it will stop working again.

  6. #6
    Join Date
    Oct 2012
    Beans
    2

    Re: Suspend fix for Asus U36JC (k)ubuntu 12.04

    OP works for K53e (all models afai can tell) on Mint13. Didn't have this problem with SolusOS.
    Not tested with encrypted disc yet.

    Multiple suspends fine.
    Incidentally, this is exactly the same solution as I'd written for a bunch of the eeePC's.
    Anyone know wtf's up with Asus's EHCI that's different from everyone else?

  7. #7
    Join Date
    Apr 2011
    Beans
    14

    Re: Suspend fix for Asus U36JC (k)ubuntu 12.04

    Just tested this on Kubuntu 12.10 that I just installed, and it works there to.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •