I was trying to get this feature: wake up my htpc from s3 with my remote control and the solution is to modify /proc/acpi/wakeup and a descriptor in /sys
Here are the details:
I'm using a Microsoft IR receiver for MCE remote that appears as dev 2 of bus 2 in lsusb
Bus 005 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 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0471:0815 Philips (or NXP) eHome Infrared Receiver
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 006: ID 045e:0714 Microsoft Corp.
Bus 001 Device 005: ID 045e:0715 Microsoft Corp.
Bus 001 Device 004: ID 045e:0707 Microsoft Corp. Wireless Laser Mouse 8000
Bus 001 Device 003: ID 045e:070c Microsoft Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
or in lsusb -t :
root@htpc:~# lsusb -t
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
|__ Port 1: Dev 2, If 0, Class=vend., Driver=mceusb, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/8p, 480M
|__ Port 4: Dev 3, If 0, Class=hub, Driver=hub/4p, 480M
|__ Port 4: Dev 4, If 0, Class=hub, Driver=hub/3p, 12M
|__ Port 2: Dev 5, If 0, Class=HID, Driver=usbhid, 12M
|__ Port 3: Dev 6, If 0, Class=HID, Driver=usbhid, 12M
The first thing I don't really understand is that in /proc/acpi/wakeup
root@htpc:~# cat /proc/acpi/wakeup
Device S-state Status Sysfs node
P0P2 S4 *disabled pci:0000:00:01.0
P0P1 S4 *disabled pci:0000:00:1e.0
PS2K S4 *disabled pnp:00:0e
PS2M S4 *disabled pnp:00:0f
UAR1 S4 *disabled pnp:00:10
MC97 S4 *disabled
P0P4 S4 *disabled pci:0000:00:1c.0
P0P5 S4 *disabled pci:0000:00:1c.1
P0P6 S4 *disabled
P0P7 S4 *disabled
P0P8 S4 *disabled
P0P9 S4 *disabled
USB0 S4 *enabled pci:0000:00:1d.0
USB1 S4 *disabled pci:0000:00:1d.1
USB2 S4 *disabled pci:0000:00:1d.2
USB3 S4 *disabled pci:0000:00:1d.3
EUSB S4 *disabled pci:0000:00:1d.7
that's USB0 I have to enabled, why not usb 1 or 2 (bus 2 in lsusb) ?
Moreover why are all the disabled/enabled preceded with a star and S4 and not S3 mentionned ?
Nevertheless that wasn't enough to get it work. I looked in gconf-editor in apps/gnome-power-manager/general but I have no can-suspend or something similar... (I'm running on 10.10, with 10.04 I could suspend only once, afterwards the computer didn't go to suspend, just black screen then login screen)
So I looked in /sys/ and found that 'cat /sys/bus/usb/devices/2-1/power/wakeup' (notice the 2.1 as bus 2 device 2 (0,1,...) gave 'disabled' so a
echo enabled > /sys/bus/usb/devices/2-1/power/wakeup
and now I can wake-up with the remote when I want
I hope this thread will help and if someone could answer what I don't understand:
Why USB0 in /proc/acpi/wakeup ?
Why have to change in /proc and /sys ?
Is it possible to automate this to get it work even if I change the usb port the receiver is plugged in ?
.. thanks a lot guys
PS: this post is duplicated from http://ubuntuforums.org/showthread.php?t=814939
but I thought I would be interesting to have a larger audience for my question