You are not logged in.

#1 2008-08-28 23:36:38

zeddD1abl0
Member
Registered: 2008-07-10
Posts: 25

Laptop Battery Scripting

Hi all,

I did a quick search and didn't find what I wanted exactly. I was wondering if there is a script that is run when a laptop goes to battery power, and whether or not someone could provide me with the code to disable a core in a dual core processor. I want to have the second core of my T9300 go to sleep when I go to battery power and re-enable when I get back to AC power. Also, is it possible to control the backlight of the screen? These kind of things would be awesomely useful to me to extend my laptop's battery life.

Also, if it works, it might be useful to add to the wiki wink

ZeddD1abl0

Offline

#2 2008-08-29 00:26:25

davef
Member
Registered: 2008-08-24
Posts: 6

Re: Laptop Battery Scripting

As far as I know it is not possible to power down a core, just ensure that you have the appropriate power saving tools such as cpufrequtils.  As for the backlight that should be possible, I run arch on my dell and that dims the screen to 50% upon going to battery power.  Depending on what WM you use you could find a power utility such as gnome-power-manager.

Offline

#3 2008-08-29 02:13:55

zeddD1abl0
Member
Registered: 2008-07-10
Posts: 25

Re: Laptop Battery Scripting

davef wrote:

As far as I know it is not possible to power down a core, just ensure that you have the appropriate power saving tools such as cpufrequtils.  As for the backlight that should be possible, I run arch on my dell and that dims the screen to 50% upon going to battery power.  Depending on what WM you use you could find a power utility such as gnome-power-manager.

I remember reading somewhere about a command kinda like

echo 0 > /proc/acpi/processor/CPU1/state

that actually disabled that core. But it's been about a year since I saw it. Other then that, I've tweaked most of the settings I can get my hands on (processor to minimum, brightness to minimum, etc). Just wondering how far I can actually go.

Offline

#4 2008-08-29 04:22:23

coolaman
Member
From: france
Registered: 2008-07-28
Posts: 34
Website

Re: Laptop Battery Scripting

Look here for a base script:
http://bbs.archlinux.org/viewtopic.php?id=52360

It 's got similar functions than gnome-power-manager.

Offline

#5 2008-08-29 21:10:14

whargoul
Member
From: Odense, Denmark
Registered: 2005-04-04
Posts: 546

Re: Laptop Battery Scripting

Laptop mode tools seems suffecient to my needs, however try coolaman's script as well.

Other than that I have compiled cpufreq-ondemand as standard in my kernel, so I never have to swith govorners. Try that as well.


Arch - It's something refreshing

Offline

Board footer

Powered by FluxBB