I've found the complete solution!

It's at http://ubuntuforums.org/archive/index.php/t-1444822.html, in
John Dias's April 27th, 2010, 02:16 AM comment. Just in case that goes
away, and in the hope of bumping the information in Google's ranking
(that link is on something like page 6 of my Google search results),
I'll reproduce the information here:

===========================================================
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"
===========================================================

NOTE: In file usb3-suspend-workaround, I used "xhci_hcd" not "xhci",
since that seems to be the correct module name in Ubuntu Maverick
(10.10)

NOTE: When testing, use the Gnome suspend/hibernate menu options; don't
just run "sudo pm-suspend", since the latter appears not to run all the
suspend scripts given in the instructions above.

NOTE: "XXXX:XX:XX.X" are "0000:00:1a.0" and "0000:00:1d.0" on my HW
(Asus G73JW)

Question: Is it possible for Ubuntu to include those quirks in the
distribution somehow, based on the machine ID it's running on?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/695249

Title:
  ASUS G73JW fails to suspend or hibernate: "pm_op(): usb_dev_suspend+0x0/0x20 
returns -2"

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to