Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: suspend works, resume on usb does not

  1. #1
    Join Date
    Jul 2008
    Beans
    24

    suspend works, resume on usb does not

    I upgraded two almost identical systems:
    ubuntu 11.10 -> ubuntu 12.04
    mythbuntu 11.10 -> mythbuntu 12.04

    On both I had suspend/wake on usb working in 11.10. The prior on wireless mouse/keyboard and the latter on a usb ir/mce remote.

    Now after the upgrade wake on usb does not work. I have to wake things up with the power button. The light on my ir receiver does not flash either.

    The original settings in the /etc/rc.local have not changed:



    Code:
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    
    sudo sh -c "echo USB0 > /proc/acpi/wakeup"
    sudo sh -c "echo USB1 > /proc/acpi/wakeup"
    sudo sh -c "echo USB2 > /proc/acpi/wakeup"
    sudo sh -c "echo USB3 > /proc/acpi/wakeup"
    sudo sh -c "echo enabled > /sys/bus/usb/devices/3-1/power/wakeup"
    
    exit 0
    lsusb gives

    Code:
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 007 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 002: ID 0471:0815 Philips (or NXP) eHome Infrared Receiver
    Bus 003 Device 003: ID 195d:7777 Itron Technology iONE Scorpius wireless keyboard
    cat /proc/acpi/wakeup gives:

    Code:
    Device	S-state	  Status   Sysfs node
    P0P1	  S4	*disabled  pci:0000:00:1e.0
    P0P4	  S4	*disabled  pci:0000:00:1c.0
    P0P5	  S4	*disabled  pci:0000:00:1c.1
    P0P6	  S4	*disabled  pci:0000:00:1c.2
    P0P7	  S4	*disabled  
    P0P8	  S4	*disabled  
    P0P9	  S4	*disabled  
    USB0	  S3	*enabled   pci:0000:00:1d.0
    USB1	  S3	*enabled   pci:0000:00:1d.1
    USB2	  S3	*enabled   pci:0000:00:1d.2
    USB3	  S3	*enabled   pci:0000:00:1d.3
    EUSB	  S3	*enabled   pci:0000:00:1d.7
    Any ideas how to get things working?
    Last edited by ederopaa; May 1st, 2012 at 02:05 PM. Reason: typo

  2. #2
    Join Date
    Apr 2012
    Beans
    2

    Re: suspend works, resume on usb does not

    You are not alone.
    I don't really understand the wakeup systems (12.04 or prior) but was using a similar script that checks the USB device for my keyboard and enables it if it was disabled. initially this script looked like it was failing to update /proc/acpi/wakeup but when I poked a little more I also noted that most of the devices in /proc/acpi/wakeup were now enabled by default instead of disabled. so I wonder if there is now setting(s) elsewhere that prevent wakeup from working.

    I'll poke back here in the next couple days when I have more time to invest.

  3. #3
    Join Date
    Apr 2012
    Beans
    2

    Re: suspend works, resume on usb does not

    just glanced through your info again... I noted that you are updating a wakeup in path /sys/bus/usb/devices/*/power/wakeup
    mine is "disabled" ATM
    I will play with that when I get a chance ... thanks

  4. #4
    Join Date
    Jul 2008
    Beans
    24

    Re: suspend works, resume on usb does not

    Quote Originally Posted by pammo View Post
    just glanced through your info again... I noted that you are updating a wakeup in path /sys/bus/usb/devices/*/power/wakeup
    mine is "disabled" ATM
    I will play with that when I get a chance ... thanks
    Hey pammo, I have understood that you are supposed to enable the wakeup...but who knows. Let's hope there is a easy and fast solution to this.

  5. #5
    Join Date
    Jul 2008
    Beans
    24

    Re: suspend works, resume on usb does not

    Got it to work by Googeling and error.

    On my Ubuntu and Wireless keyboard/mouse setup:

    Created a new rule:

    Code:
    $ sudo gedit /etc/udev/rules.d/90-keyboardwakeup.rules
    Entered this in with the correct product and vendor id's (with the help of lsusb):

    Code:
    SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52e" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"
    After a reboot it worked.

    On my Mythbuntu and MCE remote setup:

    Created a new rule:

    Code:
    $ sudo gedit /etc/udev/rules.d/90-mcewakeup.rules
    Entered this in with the correct product and vendor id's (with the help of lsusb):

    Code:
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", ATTRS{idProduct}=="0815" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"
    Edited one line in my grub (added "usbcore.autosuspend=-1 acpi_enforce_resources=lax"):

    Code:
    sudo gedit /etc/default/grub
    Code:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1 acpi_enforce_resources=lax"
    Then:

    Code:
    sudo update-grub
    Then after a reboot tested it and it worked.

    I don't know why the MCE needed the grub line?

  6. #6
    Join Date
    Sep 2009
    Beans
    32

    Re: suspend works, resume on usb does not

    Just upgraded from 11.10 to 12.04 in-line.

    Contents of the /etc/rc.local are the same as before the upgrade:

    Code:
    echo US15 > /proc/acpi/wakeup
    echo enabled > /sys/bus/usb/devices/4-3/power/wakeup
    But unable to wake from USB.

    Checking the 2 files I am editing, the /sys/usb/...../wakeup contents is "enabled".
    The /proc/acpi/wakeup contents for US15 is "*disabled"

    I can manually run the other to enable it, prefixing with a "sudo sh -c...." to the command.

    I edited the contents to the following, but no further progress:

    Code:
    sudo sh -c "echo US15 > /proc/acpi/wakeup"
    sudo sh -c 'echo "US15" > /proc/acpi/wakeup'
    Can anyone suggest alterations that might be needed? Or how to trap further errors that are happening?

    I thought that /etc/rc.local would be being executed as root on startup, so I should not need to elevate with the "sudo" call.

    I know this file is being executed, as I commented out the 2nd line, and on reboot, the /sys/usb/..../wakeup file shows as "disabled"


    Many thanks

  7. #7
    Join Date
    Jul 2008
    Beans
    24

    Re: suspend works, resume on usb does not

    jingo_man,

    From your /etc/rc.local try to comment out the first line:

    Code:
    #echo US15 > /proc/acpi/wakeup
    echo enabled > /sys/bus/usb/devices/4-3/power/wakeup
    Then check you devices vendor and product id's with

    Code:
    $lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 007 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 005: ID 046d:09a5 Logitech, Inc. Quickcam 3000 For Business
    Bus 003 Device 002: ID 046d:c52e Logitech, Inc.
    and create a new rule with

    Code:
    $ sudo gedit /etc/udev/rules.d/90-keyboardwakeup.rules
    to insert them in the file. In my case 046d and c52e:

    Code:
    SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52e" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"
    reboot and try it.

  8. #8
    Join Date
    Sep 2009
    Beans
    32

    Re: suspend works, resume on usb does not

    @ederopaa

    thanks, that worked like a charm, when i plugged in the values for my MCE receiver device.

    have they deprecated the older method? why the change to this style?

  9. #9
    Join Date
    May 2012
    Beans
    1

    Re: suspend works, resume on usb does not

    cheers, great post.

  10. #10
    Join Date
    Jul 2007
    Beans
    18

    Re: suspend works, resume on usb does not

    CHeers for this solution man.

    I wonder why they made it so much harder.

    Be nice if this was configurable through power settings to be honest, it's got to be a good thing to have for a lot of people with HTPC's or wireless keyboards / mice.

Page 1 of 3 123 LastLast

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
  •