Power Management Tips

From OLPC
Revision as of 18:36, 9 July 2007 by 209.200.52.73 (talk)
Jump to navigation Jump to 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,