Linux Power Management One Step Ahead! - openSUSE · 3 Linux Power Management CPU Freq ACPI HAL...
Transcript of Linux Power Management One Step Ahead! - openSUSE · 3 Linux Power Management CPU Freq ACPI HAL...
Linux Power ManagementOne Step Ahead!
Timo Hoenig <[email protected]>Holger Macht<[email protected]>
FOSDEM 2006, February 25th, Brussels
This document is licensed under the GNU Free Documentation License
© 2006 Novell Inc.2
Linux Power ManagementOne Step Ahead!
➔ Linux Power Management
➔ The Powersave Architecture
➔ Runtime Device Power Management (RTD-PM)
➔ Live Demo
➔ What's Next?
3
Linux Power Management
CPU FreqCPU Freq
ACPIACPI
HALHAL
Powersave DaemonPowersave Daemon
ClientsClients
KernelKernel
SystemSystemCallsCalls
Device PMDevice PM
We talkWe talkD-BUS!D-BUS!
4
Powersave DaemonPowersave Daemon
APMAPMACPIACPI
BatteriesBatteries
CPUCPUFrequencyFrequency
RTD-PMRTD-PM
SuspendSuspend
ScriptsScriptsUnloadUnloadModulesModules HandleHandle
HotkeysHotkeys
Set DiskSet DiskSettingsSettings
Daemon interaction: Trigger Suspend, Set CPU frequency, Set Schemes
Client implements: Auto-Suspend, Lock Screen, Event Notifications (...)
Clients (KPowersave, wmpowersave, gkrellm-powersave)
Powersave LibrariesPowersave LibrariesD-BUS HelperD-BUS Helper
FunctionsFunctionsHAL HelperHAL HelperFunctionsFunctions
BatteryBatteryInformationInformation
Powersave Architecture
© 2006 Novell Inc.5
Scheme »Powersave«
Scheme »Performance«
Throttling50 %
CPU Freq.:dynamic
CPU Freq.:High
IDE DiskSettings
RTD-PM
Brightness:High
Brightness:Low
Throttling:0 %
Scheme Architecture
Throttling50 %
CPU Freq.:dynamic
IDE DiskSettings
RTD-PM
Brightness:Low
CPU Freq.:High
Throttling:0 %
Brightness:High
© 2006 Novell Inc.6
● SUSE Linux
● Fedora Core
● ALT Linux
● Debian
● Ubuntu
● Kubuntu
● Gentoo
Validated Distributions
© 2006 Novell Inc.7
Runtime Device Power Management (RTD-PM)
• Today, we can:• switch the global system state and CPU frequency• adjust LCD brightness
• What do we get?• Save time (suspend and resume cycle)• Save power consumption at the expense of performance
• Next:• Runtime Device Power Management (RTD-PM)
• What do we get?• Extend battery lifetime by switching off unnecessary
subsystems or devices (LAN, WLAN, USB, Modem, ...)
© 2006 Novell Inc.8
• Power States According to ACPI• D0 (fully-on, mandatory)• D1, D2 (depending on device class, optional)• D3 (off, device context lost, mandatory)
• Switch Device Power State1. Identify (e.g. lspci)2. echo -n [0-3] > $SYSFS_PATH
$ lspci |grep Ethernet
02:0e.0 Ethernet controller: Broadcom Ethernet
$ echo -n 3 > /sys/bus/pci/devices/0000:02:0e.0/power/state
• We should not require users to use echo• UI required, enhance Powersave Daemon clients
Runtime Device Power Management
© 2006 Novell Inc.9
[A]
Test Environment
LaptopLaptop((nono battery) battery)
LaptopLaptoprunning QtDMMrunning QtDMM
© 2006 Novell Inc.10
Example: IPW 2100
Set device to power state D3
Device fully powered
Device in D3
Set device to power state D0
0.825 A
0.773 A
© 2006 Novell Inc.11
Live Demo
12
What's Next?
13
I/O ControlsI/O Controls- SNAPSHOT_FREEZE- SNAPSHOT_FREEZE- SNAPSHOT_AVAIL_SWAP- SNAPSHOT_AVAIL_SWAP- SNAPSHOT_*- SNAPSHOT_*
User Space ToolsUser Space ToolsSuspend ResumeSuspend Resume
Compression BootsplashCompression Bootsplash
Kernel InterfaceKernel Interface/dev/snapshot/dev/snapshot
User Space Software Suspend
© 2006 Novell Inc.14
Dynticks
• Skip timer ticks if CPU is idle
• Make HZ dynamic
• HZ is arch depending
➔ Allow the CPU to enter C3 more often
• Problems
• Losing interrupts
Running Out of Time^w Battery.
Open Discussion
Thanks for coming!
© 2006 Novell Inc.16
- http://powersave.sourceforge.net/pm-report/
- http://www.opensuse.org/Projects_Powersave
- http://powersave.sourceforge.net
- http://sourceforge.net/Projects/Powersave
- Mailing lists:- [email protected] [email protected]
Resources of Interest