Skip to contentSkip to conversation

User tool for configuring wake-up devices

DISCUSSION Thomas Renninger 2 participants 3 messages Jan 24, 2011 ACPI

lore
Share & tools
lore
#0 lore raw

Hi,

some time ago we talked about a userspace tool which can enable specific devices to be able to wake the machine up from suspend.

While Rafael solved that for network directly
in the driver iirc (should work via ethtool now), there wasn't any outcome for
other devices (usb, key, mouse, generic ACPI implementation reading out device's sysfs path...) to activate them as wakeup devices in a userfriendly way?

Oliver just asked me for a tool to e.g. configure and enable usb or other devices as wake-up devices.

I quickly googled and found:
- acpitools (http://sourceforge.net/projects/acpitool)
rather old, I doubt it does any sysfs reads to find out which devices could be configured and of what type they are?

- acpi-wakeup
even less feature rich...

In sysfs is this supposed to work via:
/sys/devices/.../power/wakeup_active
now?

How are users supposed to enable devices for suspend wake up? Are there any tools already which are worth packaging or is such a tool waiting for implementation?

Thanks,

Thomas

#1 lore raw
Quoted 6 lines · Thomas Renninger

Hi,

some time ago we talked about a userspace tool which can enable specific devices to be able to wake the machine up from suspend.

Quoted 6 lines

While Rafael solved that for network directly
in the driver iirc (should work via ethtool now), there wasn't any outcome for
other devices (usb, key, mouse, generic ACPI implementation reading out device's sysfs path...) to activate them as wakeup devices in a userfriendly way?

I'm not aware of any. (Note that keyboard devices are supposed to be enabled for wakeup by default, although this may not yet be implemented in all the keyboard drivers.)

Quoted 9 lines

Oliver just asked me for a tool to e.g. configure and enable usb or other devices as wake-up devices.

I quickly googled and found:
- acpitools (http://sourceforge.net/projects/acpitool)
rather old, I doubt it does any sysfs reads to find out which devices could be configured and of what type they are?

Quoted 6 lines

- acpi-wakeup
even less feature rich...

In sysfs is this supposed to work via:
/sys/devices/.../power/wakeup_active
now?

The filename is just "wakeup", not "wakeup_active". It's worth pointing out that for USB devices, one must enable wakeup both on the device itself and also on the host controller for the device's bus.

Quoted 1 line

How are users supposed to enable devices for suspend wake up?

By writing "enabled" to the sysfs file. Writing "disabled" to the file has the opposite effect.

Currently this is done by udev rules, by desktop config programs, or by manually adding lines to system shell scripts.

Quoted 2 lines

Are there any tools already which are worth packaging or is such a tool waiting for implementation?

I don't know of any tools capable of handling this.

Alan Stern

#2 lore raw
In reply to Thomas Renninger
Quoted 6 lines · Thomas Renninger

Hi,

some time ago we talked about a userspace tool which can enable specific devices to be able to wake the machine up from suspend.

Quoted 6 lines

While Rafael solved that for network directly
in the driver iirc (should work via ethtool now), there wasn't any outcome for
other devices (usb, key, mouse, generic ACPI implementation reading out device's sysfs path...) to activate them as wakeup devices in a userfriendly way?

I'm not aware of any. (Note that keyboard devices are supposed to be enabled for wakeup by default, although this may not yet be implemented in all the keyboard drivers.)

Quoted 9 lines

Oliver just asked me for a tool to e.g. configure and enable usb or other devices as wake-up devices.

I quickly googled and found:
- acpitools (http://sourceforge.net/projects/acpitool)
rather old, I doubt it does any sysfs reads to find out which devices could be configured and of what type they are?

Quoted 6 lines

- acpi-wakeup
even less feature rich...

In sysfs is this supposed to work via:
/sys/devices/.../power/wakeup_active
now?

The filename is just "wakeup", not "wakeup_active". It's worth pointing out that for USB devices, one must enable wakeup both on the device itself and also on the host controller for the device's bus.

Quoted 1 line

How are users supposed to enable devices for suspend wake up?

By writing "enabled" to the sysfs file. Writing "disabled" to the file has the opposite effect.

Currently this is done by udev rules, by desktop config programs, or by manually adding lines to system shell scripts.

Quoted 2 lines

Are there any tools already which are worth packaging or is such a tool waiting for implementation?

I don't know of any tools capable of handling this.

Alan Stern