Linux kernel developer Sarah Sharp is searching for a solution to the problem pose by power draining peripherals such as computer mice, or as she said in a presentation at LinuxCon North America recently, “Vampire Mice.”
“I don’t mean the little fuzzy, furry ones,” Sharp commented. “I mean the ones that suck the life out of your battery.”
This has been a significant problem with USB power management on all Linux environments. A lack of device driver support for the various Linux kernels means that the power saving features included on most modern USB devices are rendered completely unusable or even made potentially damaging in some cases. This correlates to common features like you computer USB mouse’s ability to turn itself off if you haven’t moved it after a set amount of time.
One such issue affected a rather well known brand of portable USB hard drive. Sharp said that an alarming problem occurred when the drive attempted to come out of suspend mode.
“The user hears this horrible scraping noise because the driver forgot to park the disc head before it cut power to the disk,” she commented.
This type of damage may seem to be an outlier, but it is far more common that the power draining issue occurs when a device’s important suspend feature isn’t working properly.
“If you have just one USB device that’s attached to the host that’s not suspended, that means that … your host’s hardware is continually touching the [USB] bus schedule,” she commented.
That means that even a single USB device, whether that device is a mouse, external hard drive hard drive, or any other portable device, refusing to suspend properly means that the entire USB host must remain active, creating a small but measurable power drain on the Linux environment.
“It’s about four watts, if you just have one USB device that’s not suspended,” noted Sharp.
Four watts might not sound like much to you, but it could have a meaningful impact on the battery life of a laptop running unplugged spread systemically over a large set of computers in an office environment, run up business utility bills.
“The kernel developers have had to essentially implement a white list policy,” Sharp said. This means that, in order to avoid potential malfunctions, the suspend feature on USB devices is deactivated by default, with exceptions for devices that are known to work well and the features that allow them to activate from the Linux user-space.
“We really need a way for vendors and distros and users to trust their USB devices, figure out what’s broken, and what actually works,” she said.
Until that happens, then, watch out this Halloween for the dreaded vampire mice!