14

How do I configure Wake-On-USB properly on a 10.04 or 10.10 Ubuntu (2.6.36 and higher if needed)? (Wake-on-USB is when the computer is asleep and for example a USB Keyboard event wakes up the machine!) The notebook is an Acer Aspire Timeline X 1830T. I don't know in which way the Linux Kernel supports the controllers.

There are different ways to approach this, for example /proc/acpi/wakeup... or UDEV... or something with HAL?

/proc/acpi/wakeup shows every device in S4, but I need S3.

Device S-state Status Sysfs node
P0P2 S4 *disabled
PEGP S4 *disabled
P0P1 S0 *disabled pci:0000:00:1e.0
EHC1 S4 *disabled pci:0000:00:1d.0
USB1 S4 *enabled
USB2 S4 *disabled
USB3 S4 *disabled
USB4 S4 *disabled
EHC2 S4 *disabled pci:0000:00:1a.0
USB5 S4 *disabled
USB6 S4 *disabled
USB7 S4 *disabled
HDEF S0 *disabled pci:0000:00:1b.0
RP01 S5 *disabled pci:0000:00:1c.0
PXSX S5 *disabled pci:0000:01:00.0
RP02 S0 *disabled pci:0000:00:1c.1
PXSX S5 *disabled pci:0000:02:00.0
RP03 S0 *disabled
PXSX S5 *disabled
RP04 S0 *disabled
PXSX S5 *disabled
RP05 S0 *disabled
PXSX S5 *disabled
RP07 S0 *disabled
PXSX S5 *disabled
RP08 S0 *disabled
PXSX S5 *disabled
GLAN S0 *disabled
PEG3 S4 *disabled
PEG5 S4 *disabled
PEG6 S4 *disabled
SLPB S3 *enabled
  • S4, which is Suspend-To-Disk afaik... doesn't seem to work either if I echo USB1 into the wakeup table. It just sets an S4 flag.
  • can I get the USB ports in S3?

I want to make the machine wakeup from Suspend-To-Ram (S3, ACPI standard) in case a key on my external keyboard is pressed. It only wakes up if a key on the internal Laptop keyboard is pressed... from Suspend To Ram. It seems if I plug in a USB mouse, that the USB port isn't even powered. I have no BIOS option to change this.

Further specific information regarding the device:

usb-devices
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 13 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=04d9 ProdID=1603 Rev=03.10
S: Manufacturer=
S: Product=USB Keyboard
C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid

root@underwater-laptop:/# lsusb
[...]
Bus 001 Device 013: ID 04d9:1603 Holtek Semiconductor, Inc.
Bus 001 Device 004: ID 0bda:0138 Realtek Semiconductor Corp.
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[...]

If this doesn't work I have to properly explain why :( - but I think it is very hard to research this kernel internal. Any hints for good information here? I hope it's possible... I'm just looking for any solution.

edit: this, waking up on USB, works on Windows!

Thanks a lot, Marius

3
  • 1
    If as you say you don't have a BIOS option to put signals of external USB Ports through, and if external USB devices not even have power (makes sense for battery driven notebooks) - how on earth should this work then? Ubuntu has no magic to do this.
    – Takkat
    Oct 29, 2010 at 11:16
  • It works on Windws. So I assume there's an option to pass specific flags to the HW. ;) I have this Top Gun mentality when it comes to hardware and Linux: everybody can fly a transport airplane and run Windows. But only a few people can fly combat jets and run Linux ;)
    – wishi
    Oct 29, 2010 at 12:03
  • Oh yes Top Gun: everybody can crash Windows but crashing Linux is a real hard job to do ;-). If wake on LAN works with Windows your USB device certainly is powered (maybe in energy save mode or so).
    – Takkat
    Oct 29, 2010 at 14:49

3 Answers 3

4
+100

It seems that something may be wrong with the system's ACPI table since none of the USB* devices are tied to a PCI bus.

On my laptop, when I plug in my USB keyboard, I can see the pci path 0000:00:1d.0 in dmesg output:

input: ... as /devices/pci0000:00/0000:00:1d.0/usb6/6-2/6-2.3/6-2.3:1.0/input/input14

From there I can find the ACPI device name in /proc/acpi/wakeup, and echo it in to enable it:

USB0  S3 enabled  pci:000:00:1d.0

I would assume that since the mapping of pci bus to ACPI device is missing for your system, it won't be possible to get it working. You may need to start debugging the DSDT to get much further. http://acpi.sourceforge.net/dsdt/index.php

1

I found on Ubuntu Lucid 10.04.3 with 2.6.32-37 that using /proc/acpi/wakeup is worthless. It seems /sys is the only thing that matters.

My usb-wakeup script linked below walks the /sys tree in reverse to enable just usbhid devices, aka the keyboard and mouse. It also enables their parent hubs and controllers. This is what it took for me to get it working. The udev rule triggers the script on boot, and when any usbhid device is plugged in.

The udev script requires the script to be in /usr/local/sbin, and make sure to make the script executable, chmod 755 /usr/local/sbin/usb-wakeup.

0

Use lsusb to get product and vendor ID of your usb device:

Bus 004 Device 002: ID 0458:002e KYE Systems Corp. (Mouse Systems)

In my case its mouse with ID 0458:002e, then you create new udev rule:

sudo nano /etc/udev/rules.d/90-keyboardwakeup.rules

Insert this code and replace idVendor and idProduct with correct ids from lsusb

SUBSYSTEM=="usb", ATTRS{idVendor}=="0458", ATTRS{idProduct}=="002e" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"

Reboot and test. Tested on 11.04 and 12.04 (may work on lower versions too). I found the answer in this forum post (answer from ederopaa)

1
  • 1
    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Aug 12, 2012 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .