Power Management Tips: Difference between revisions
Jump to navigation
Jump to search
JordanCrouse (talk | contribs) (Add tips (with proper spelling this time)) |
m (Reverted edits by 89.19.172.22 (Talk) to last version by Leejc) |
||
(8 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
= Power Management Tips and Tricks = |
== Power Management Tips and Tricks == |
||
These are tips and tricks for saving power on the XO platform. |
These are tips and tricks for saving power on the XO platform. |
||
== Lid events == |
=== 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. |
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. |
||
Line 20: | Line 20: | ||
} |
} |
||
== DCON sleep == |
=== DCON sleep === |
||
The DCON can be put to sleep (ie - blanked). This is useful for those times when the system should stay up, but the DCON is drawing too much power. To put it to sleep: |
The [[DCON]] can be put to sleep (ie - blanked). This is useful for those times when the system should stay up, but the [[DCON]] is drawing too much power. To put it to sleep: |
||
echo "1" > /sys/devices/platform/dcon/sleep |
echo "1" > /sys/devices/platform/dcon/sleep |
||
Line 31: | Line 31: | ||
This is particularly useful when combined with the lid events (above). |
This is particularly useful when combined with the lid events (above). |
||
[[Category:Software development]] |
|||
[[Category:Battery & Power]] |
Latest revision as of 06:55, 17 December 2008
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, &event, sizeof(struct input_event)); if (ev.type == EV_SW && ev.code == SW_LID) { if (ev.value == 1) lid_down(); else lid_up(); }
DCON sleep
The DCON can be put to sleep (ie - blanked). This is useful for those times when the system should stay up, but the DCON is drawing too much power. To put it to sleep:
echo "1" > /sys/devices/platform/dcon/sleep
and to wake back up:
echo "0" > /sys/devices/platform/dcon/sleep
This is particularly useful when combined with the lid events (above).