Author Topic: Problem with suspend and sleep using ASUS U52F Laptop resolved!!!  (Read 835 times)

Offline kever

  • Full Member
  • ***
  • Posts: 53
  • It's me
 8)
Here is the link to the article or Forum that fixed my problem with my laptop ( ASUS U52F) which would hang every time I went in to suspend or sleep.

http://ubuntuforums.org/archive/index.php/t-1444822.html

I used the following information and remember to make as root and executable too.
John Dias
April 27th, 2010, 02:16 AM
Hi ipsi (http://art.ubuntuforums.org/member.php?u=285138),
I'm Brazilian, so my english....
I have the same problem of you with an Asus n71Jq-x1. I'm pretty sure you're succeed like me. I try with this versions of Ubuntu, and all worked fine:

* Ubuntu 9.10 64bits
* Ubuntu 10.4 R3 64bits
* Ubuntu Studio 10.4 R3 64bits

The problem is about the ehci builtin controller and xhci module.
The better solutions is to disable all devices that uses ehci_hcd from Kernel, and to unload module xhci, before suspend/hibernate. For the last, you can use the nuage6's solution, but I prefer to use the "config.d", as I describe in section 2. Another solution is to complete disable usb support in BIOS, but I guess you don't need to do this.

1. Unbind ehci_hcd from kernel:

First, verify what devices you need to unload from kernel. Simple list the directory "/sys/bus/pci/drivers/ehci_hcd/" and pick all devices id that has names like "0000:00:1a.0". You may have more than one device listed.


# ls /sys/bus/pci/drivers/ehci_hcd/
0000:00:1a.0 bind new_id uevent
0000:00:1d.0 module remove_id unbind

I picked "0000:00:1a.0" and "0000:00:1d.0".

Because newer version of Ubuntu came with ehci_hcd builtin kernel, you have to unbind all devices. For this, create a file "/etc/pm/sleep.d/20_custom-ehci_hcd", with the following content:

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

Obs.: For this work for you, you have to substitue "XXXX:XX:XX.X" with your settings.

2. Unload modelue xhci (usb3):

Create a file "/etc/pm/config.d/usb3-suspend-workaround", with the following content:

#File: "/etc/pm/config.d/usb3-suspend-workaround".
SUSPEND_MODULES="xhci"


Done. Good luck!:P

This does work, I have mine working like a charm now.
Thanks to John Dias