Power Management Tips

From OLPC
Revision as of 00:40, 3 September 2007 by 83.149.19.6 (talk)
Jump to: navigation, search

Power Management Tips and Tricks

These are tips and tricks for saving power on the XO platform.

Lid events

Starting with the B2 platform, we now have the capability to get events when the lid is closed and opened. The events can be collected along with the power button event from the geode_pm input device. Here is a bit of pseudo code for doing that:

#include <linux/event.h>

struct input_event ev;
input_fd = open("/dev/input/event0", O_RDONLY);
read(input_fd,