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
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:From there I can find the ACPI device name in
/proc/acpi/wakeup
, and echo it in to enable it: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
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
./etc/udev/rules.d/56-wakeupusb.rules
/usr/local/sbin/usb-wakeup
Use lsusb to get product and vendor ID of your usb device:
In my case its mouse with ID 0458:002e, then you create new udev rule:
Insert this code and replace idVendor and idProduct with correct ids from lsusb
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)