← Back to team overview

hybrid-graphics-linux team mailing list archive

Re: Anyone have problems with suspend?

 

I have not tried getting this to work since installing Kubuntu, but I
was previously running Arch Linux and was able to fix suspend issues by
following a guide from a forum. I don't have time to try it on Kubuntu
now but following are the notes on the subject that I saved when I was
working on it. The issue was the USB3 drivers, and the workaround
involved unloading the drivers before suspending and reloading them
after resume. This process can be automated, since there is a folder
containing scripts (sort of like init scripts) which run on hibernate,
suspend, resume, and thaw. I also had a script that unloaded and
reloaded the wireless driver, I can't remember if that actually messed
up my suspend/resume or if it was just that the wireless didn't work
right after resuming, so I forced it to reload.

==== Exhibit 1 of 2 (Suspend/resume wifi): ====

#!/bin/sh
# File: "/etc/pm/sleep.d/20_u33jc_ethernet".
case "${1}" in
        hibernate|suspend)
                modprobe -r atl1c
        ;;
        resume|thaw)
                modprobe -i atl1c
        ;;
esac

==== Exhibit 2 of 2 (Suspend/resume USB): ====

I replaced the suspend section of /etc/pm/sleep.d/20_custom-ehci_hcd with:
modprobe -r ehci_hcd
modprobe -r xhci_hcd
and the resume section with:
modprobe -i ehci_hcd
modprobe -i xhci_hcd
==================================================

>From UbuntuForums http://ubuntuforums.org/showthread.php?t=1444822:

Re: Cannot suspend or hibernate Asus N61J Laptop
Hi ipsi,
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.

Code:
# 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:
Code:
#!/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:
Code:
#File: "/etc/pm/config.d/usb3-suspend-workaround".
SUSPEND_MODULES="xhci"
Done. Good luck!





Good luck! Oh and if you get it working in Ubuntu could you post any
config changes you had to make :)
-Andrew

On 03/09/2011 01:45 AM, Peter Goodall wrote:
> Hi all,
>
> I have an Asus U33Jc with Intel HD55 + NVidia 310M graphics.  Is
> anyone else seeing problems w/ suspend?  I've been trying to
> troubleshoot through this and it seems the problem may be the
> graphics.  The problem is that the video locks up immediately so
> troubleshooting is very difficult.  I'm curious if the suspend issue
> is a problem w/ all hybrid graphics systems or if it is unique to my
> notebook.  In the last few years I have rarely found a system that
> doesn't suspend, so I'm a bit at a loss.
>
> - Pete
>
>




References