You probably have done this before: Plug your phone or mp3 into your Notebook's USB port to charge it. E.g. the Kindle usually only comes with a USB cable and no seperate charger. Did you know you can do this even when your system is in standby mode? I will show you how - without the need to modify anything but software!

It's actually not even difficult. Start by plugging in the device and using lsusb -t to find out to which port it is connected:

In my case it's not too difficult. I just need to echo EUSB | sudo tee /proc/acpi/wakeup and USB stays on during standby and I can charge my phone. You may have to enable a combination of USB and *HCI devices or even all USB devices in wakeup for the charging to work. But of course that will still be much better than leaving your notebook on.

But be aware that anything that is enabled in /proc/acpi/wakeup draws power all the time during standby. So you probably want to disable it again once your device is charged. If it works, you've just gained a (much more efficient) free (as in no additional cost) portable usb charger!

6 comments:

Could you please elaborate on how you relate an lsusb entry to the respective /proc/acpi/wakeup entry? I have USB{0-6) as well as EUSB and USBE. Is my guess correct that EUSB is for ehci devices? What about uhci devices?

I'm the guy sitting next to you and LinuxTag and trying to charge my N900 with my laptop on suspend :)

So actually the charging of the device is a side-effect of the fact that the computer is powering it up in order to be able to wake-up from it. The drawback is that the device can easily power-back your laptop, which is not always desirable.