Bug 798628 - can't suspend/resume Fedora 16 on Asus UX21 without custom script
can't suspend/resume Fedora 16 on Asus UX21 without custom script
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
http://lkml.org/lkml/2011/11/30/456
: Patch
: 819128 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-29 07:34 EST by Loris Santamaria
Modified: 2012-11-14 15:48 EST (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 697150
Environment:
Last Closed: 2012-11-14 15:48:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Linux Kernel 42728 None None None 2012-06-08 09:45:00 EDT

  None (edit)
Description Loris Santamaria 2012-02-29 07:34:53 EST
+++ This bug was initially created as a clone of Bug #697150 +++

This is a fresh install of Fedora 16 x86_64 on an Asus UX21. All peripherals work perfectly except that suspending the laptop by closing the lid or pressing the suspend button consistently freezes the machine.

By following the advice on an Ubuntu forum ( http://ubuntuforums.org/showthread.php?t=1865577 ) I added this script to /etc/pm/sleep.d/20_custom_asus, and now suspend/resume works perfectly:

#!/bin/sh
EHCI_BUSES="0000:00:1d.0 0000:00:1a.0"
XHCI_BUSES="0000:03:00.0"
case "${1}" in
    hibernate|suspend)
        # Switch USB buses off
        for bus in $EHCI_BUSES; do
            echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind
        done
        for bus in $XHCI_BUSES; do
            echo -n $bus | tee /sys/bus/pci/drivers/xhci_hcd/unbind
        done
        ;;
    resume|thaw)
        # Switch USB buses back on
        for bus in $EHCI_BUSES; do
            echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind
        done
        for bus in $XHCI_BUSES; do
            echo -n $bus | tee /sys/bus/pci/drivers/xhci_hcd/bind
        done
        ;;
esac
Comment 1 James 2012-05-05 09:54:36 EDT
*** Bug 819128 has been marked as a duplicate of this bug. ***
Comment 2 James 2012-05-05 09:57:47 EDT
Still in Fedora 17, kernel-3.3.4-4.fc17.x86_64. I see this also on my new notebook: suspend hangs just after turning off the hard disc. In my case, controllers are:

00:1a.0 USB Controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1d.0 USB Controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
03:00.0 USB Controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)

Using the above script works around the issue. Wonder what its state is upstream.
Comment 3 Jaroslav Škarvada 2012-05-09 09:06:49 EDT
AFAIK xhci suspend support is in upstream kernel for a while, thus it should work out of the box. Some backtrace would probably help here, could you boot with kernel boot parameters (e.g. add to grub):
debug no_console_suspend ignore_loglevel

and try to suspend from text console (no X) by:
# pm-suspend
Comment 4 James 2012-05-09 09:40:19 EDT
(In reply to comment #3)
> AFAIK xhci suspend support is in upstream kernel for a while, thus it should
> work out of the box. Some backtrace would probably help here, could you boot
> with kernel boot parameters (e.g. add to grub):
> debug no_console_suspend ignore_loglevel
> 
> and try to suspend from text console (no X) by:
> # pm-suspend

After further investigation, it turns out I only need to unbind the EHCIs, so xhci is probably not to blame. I'm currently following https://bugzilla.kernel.org/show_bug.cgi?id=42728 which might be related to what I see (suspend fails but I don't get memory corruption) -- I believe my notebook has the same chipset.

I understand a patch to resolve kbz 42728 was included in kernel 3.3.5, but I think it's Asus-specific so doesn't work on my machine. I've reported this upstream, so I'll probably send further feedback there. Thanks for pointing out the debug options -- I'll try them at the next opportunity.
Comment 5 Michal Jaegermann 2012-05-09 12:20:58 EDT
(In reply to comment #3)
> AFAIK xhci suspend support is in upstream kernel for a while,

An extra "hook" script 
https://bugzilla.redhat.com/attachment.cgi?id=492542
from the original bug 697150 which was "cloned" here did not even bothered to
touch xhci devices (and also was not hardwiring PCI identifiers).  AFAICT I do not have anything served by xhci drivers so these developments are not really relevant as far as the original report is concerned.
Comment 6 James 2012-05-10 15:13:44 EDT
It turns out on my machine, this is solved by the patch:

http://marc.info/?l=linux-kernel&m=133582194609000&w=2

solves this (linked via kbz 42728 above). Any chance this could be included in the Fedora kernels until it's included from the upstream?
Comment 7 Jaroslav Škarvada 2012-05-10 15:29:14 EDT
James, thanks for info, reassigning to kernel guys for review / inclusion.
Comment 8 James 2012-05-10 15:34:41 EDT
(In reply to comment #7)
> James, thanks for info, reassigning to kernel guys for review / inclusion.

Nice. According to comment on the kernel bugzilla, it should be in 3.3-stable soon anyway.
Comment 9 James 2012-05-19 19:48:06 EDT
Well the patch for my particular case hasn't showed up in 3.3.6... any chance of it being included in the Fedora build until it's upstream?
Comment 10 Josh Boyer 2012-06-08 09:45:00 EDT
The kernel bugzilla is still being worked.  Thus far it resulted in commit dbe9a2edd17d which will be in the 3.5-rc2 kernel (or a git snapshot after -rc1), but that isn't marked for stable yet.
Comment 11 Dave Jones 2012-10-23 11:25:24 EDT
# Mass update to all open bugs.

Kernel 3.6.2-1.fc16 has just been pushed to updates.
This update is a significant rebase from the previous version.

Please retest with this kernel, and let us know if your problem has been fixed.

In the event that you have upgraded to a newer release and the bug you reported
is still present, please change the version field to the newest release you have
encountered the issue with.  Before doing so, please ensure you are testing the
latest kernel update in that release and attach any new and relevant information
you may have gathered.

If you are not the original bug reporter and you still experience this bug,
please file a new report, as it is possible that you may be seeing a
different problem. 
(Please don't clone this bug, a fresh bug referencing this bug in the comment is sufficient).
Comment 12 Michal Jaegermann 2012-10-23 20:41:08 EDT
(In reply to comment #11)

> Kernel 3.6.2-1.fc16 has just been pushed to updates.
> This update is a significant rebase from the previous version.
> 
> Please retest with this kernel, and let us know if your problem has been
> fixed.

My original report was bug 697150 on Asus K52Jc (and for unclear reasons that was cloned to talk about Asus UX21).  I tested 3.6.2-1.fc16 on K52Jc and there indeed suspend and hibernate now work without a need of additional configuration and/or "hook" scripts such as detailed in bug 697150.

Once a weird thing happened in testing, though.  After an attempt to hibernate my laptop failed to do that but instead presented "unlock" alert.  After a password was supplied it went back to a desktop and immediately after that, without any
intervention, performed "hibernate".  After a resumption it went immediately back to a hibernate again, without asking for a password, and only on the second try to resume it started to behave like expected.  It looks like a weird race but I have no idea where really.  I was unable to repeat that.  Also in my older setup I never seen anything of that sort despite of rather extensive use of hibernation on this laptop.

No idea about UX21 and other Asus models.

Note You need to log in before you can comment on or make changes to this bug.