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:
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/8p, 480M
|__ Port 5: Dev 3, If 0, Class='bInterfaceClass 0x0e not yet handled', Driver=uvcvideo, 480M
|__ Port 5: Dev 3, If 1, Class='bInterfaceClass 0x0e not yet handled', Driver=uvcvideo, 480M
/: 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
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
Then check cat /proc/acpi/wakeup and find the port in there:
Device S-state Status Sysfs node
EUSB S4 *disabled pci:0000:00:1d.7
LID S4 *disabled
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!