16.01.2015 Views

Linux Power Management - One Step Ahead!

Linux Power Management - One Step Ahead!

Linux Power Management - One Step Ahead!

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Linux</strong> <strong>Power</strong> <strong>Management</strong><br />

<strong>One</strong> <strong>Step</strong> <strong>Ahead</strong>!<br />

Timo Hoenig <br />

Holger Macht<br />

FOSDEM 2006, February 25th, Brussels<br />

This document is licensed under the GNU Free Documentation License


<strong>Linux</strong> <strong>Power</strong> <strong>Management</strong><br />

<strong>One</strong> <strong>Step</strong> <strong>Ahead</strong>!<br />

➔<br />

<strong>Linux</strong> <strong>Power</strong> <strong>Management</strong><br />

➔<br />

The <strong>Power</strong>save Architecture<br />

➔<br />

Runtime Device <strong>Power</strong> <strong>Management</strong> (RTD-PM)<br />

➔<br />

Live Demo<br />

➔<br />

What's Next<br />

2<br />

© 2006 Novell Inc.


System<br />

Calls<br />

<strong>Linux</strong> <strong>Power</strong> <strong>Management</strong><br />

Clients<br />

<strong>Power</strong>save Daemon<br />

We talk<br />

D-BUS!<br />

CPU Freq<br />

Kernel<br />

ACPI<br />

Device PM<br />

HAL<br />

3


<strong>Power</strong>save Architecture<br />

Clients (K<strong>Power</strong>save, wmpowersave, gkrellm-powersave)<br />

Client implements: Auto-Suspend, Lock Screen, Event Notifications (...)<br />

Daemon interaction: Trigger Suspend, Set CPU frequency, Set Schemes<br />

Battery<br />

Information<br />

<strong>Power</strong>save Libraries<br />

HAL Helper<br />

Functions<br />

D-BUS Helper<br />

Functions<br />

APM<br />

ACPI<br />

RTD-PM<br />

<strong>Power</strong>save Daemon<br />

Suspend<br />

Batteries<br />

CPU<br />

Frequency<br />

Unload<br />

Modules<br />

Scripts<br />

Set Disk<br />

Settings<br />

Handle<br />

Hotkeys<br />

4


Scheme Architecture<br />

CPU Freq.:<br />

dynamic<br />

CPU Freq.:<br />

High<br />

Throttling<br />

50 %<br />

Scheme<br />

»<strong>Power</strong>save«<br />

Scheme<br />

»Performance«<br />

Throttling:<br />

0 %<br />

Throttling<br />

50 %<br />

IDE Disk<br />

Settings<br />

CPU Freq.:<br />

High<br />

Brightness:<br />

Low<br />

CPU Freq.:<br />

dynamic<br />

RTD-PM<br />

Throttling:<br />

0 %<br />

Brightness:<br />

High<br />

Brightness:<br />

Low<br />

Brightness:<br />

High<br />

IDE Disk<br />

Settings<br />

RTD-PM<br />

5<br />

© 2006 Novell Inc.


Validated Distributions<br />

●<br />

SUSE <strong>Linux</strong><br />

●<br />

Fedora Core<br />

●<br />

ALT <strong>Linux</strong><br />

●<br />

Debian<br />

●<br />

Ubuntu<br />

●<br />

Kubuntu<br />

●<br />

Gentoo<br />

6<br />

© 2006 Novell Inc.


Runtime Device <strong>Power</strong> <strong>Management</strong> (RTD-PM)<br />

• Today, we can:<br />

• switch the global system state and CPU frequency<br />

• adjust LCD brightness<br />

• What do we get<br />

• Next:<br />

• Save time (suspend and resume cycle)<br />

• Save power consumption at the expense of performance<br />

• Runtime Device <strong>Power</strong> <strong>Management</strong> (RTD-PM)<br />

• What do we get<br />

• Extend battery lifetime by switching off unnecessary<br />

subsystems or devices (LAN, WLAN, USB, Modem, ...)<br />

7<br />

© 2006 Novell Inc.


Runtime Device <strong>Power</strong> <strong>Management</strong><br />

• <strong>Power</strong> States According to ACPI<br />

• D0 (fully-on, mandatory)<br />

• D1, D2 (depending on device class, optional)<br />

• D3 (off, device context lost, mandatory)<br />

• Switch Device <strong>Power</strong> State<br />

1. Identify (e.g. lspci)<br />

2. echo -n [0-3] > $SYSFS_PATH<br />

$ lspci |grep Ethernet<br />

02:0e.0 Ethernet controller: Broadcom Ethernet<br />

$ echo -n 3 > /sys/bus/pci/devices/0000:02:0e.0/power/state<br />

• We should not require users to use echo<br />

• UI required, enhance <strong>Power</strong>save Daemon clients<br />

8<br />

© 2006 Novell Inc.


Test Environment<br />

Laptop<br />

(no<br />

battery)<br />

Laptop<br />

running QtDMM<br />

[A]<br />

9<br />

© 2006 Novell Inc.


Example: IPW 2100<br />

Set device to power state D3<br />

0.825 A<br />

Device fully powered<br />

Set device to<br />

power state D0<br />

0.773 A<br />

Device in D3<br />

10<br />

© 2006 Novell Inc.


Live Demo<br />

11<br />

© 2006 Novell Inc.


12<br />

What's Next


User Space Software Suspend<br />

Kernel Interface<br />

/dev/snapshot<br />

I/O Controls<br />

- SNAPSHOT_FREEZE<br />

- SNAPSHOT_AVAIL_SWAP<br />

- SNAPSHOT_*<br />

User Space Tools<br />

Suspend<br />

Resume<br />

Compression<br />

Bootsplash<br />

13


Dynticks<br />

• Skip timer ticks if CPU is idle<br />

• Make HZ dynamic<br />

• HZ is arch depending<br />

➔<br />

Allow the CPU to enter C3 more often<br />

• Problems<br />

• Losing interrupts<br />

14<br />

© 2006 Novell Inc.


Running Out of Time^w Battery.<br />

Open Discussion<br />

Thanks for coming!


Resources of Interest<br />

- http://powersave.sourceforge.net/pm-report/<br />

- http://www.opensuse.org/Projects_<strong>Power</strong>save<br />

- http://powersave.sourceforge.net<br />

- http://sourceforge.net/Projects/<strong>Power</strong>save<br />

- Mailing lists:<br />

- powersave-users@forge.novell.com<br />

- powersave-devel@forge.novell.com<br />

16<br />

© 2006 Novell Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!