Laptop battery life - Openbox edition 14.1

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
chakuari
Posts: 38
Joined: 14. May 2011, 09:30
Contact:

Laptop battery life - Openbox edition 14.1

Post by chakuari »

Hello.

I read some articles on the web regarding how improving the laptop battery life using Linux, but still can't get a clue about how to do that. It jus't can't be possible to run Salix for just 1 hour or so and Windoze for more than 2 hours on the same laptop... :o How can I find what consumes more battery and find a remedy?

Thank you!

Chakuari
User avatar
gapan
Salix Wizard
Posts: 6349
Joined: 6. Jun 2009, 17:40

Re: Laptop battery life - Openbox edition 14.1

Post by gapan »

Most usual things to do are:
- Make sure the screen brightness is turned down when using battery
- Use a CPU governor that scales down the frequency when you're not using the CPU much

You can install powertop to check what goes on. There are other things, like power saving the audio card or spinning down the hard drives, but the 2 I mentioned should be the most usual culprits.
Image
Image
User avatar
chakuari
Posts: 38
Joined: 14. May 2011, 09:30
Contact:

Re: Laptop battery life - Openbox edition 14.1

Post by chakuari »

Ok, I installed powertop, thank you. Now I must understand what's better.

Under "Tunables", almost everything is set to Bad. :shock: cpufreq governor shows as Good, set to "ondemand". Now I also enabled audio codec power management. But then? There are so many options to set... :D Regarding the screen brightness, I'll try and search in the forum also.
User avatar
chakuari
Posts: 38
Joined: 14. May 2011, 09:30
Contact:

Re: Laptop battery life - Openbox edition 14.1

Post by chakuari »

Ok, for the screen brightness I'll use the function keys for the moment. That would help. What about spinning down the hard drives? How can I do that?

I was also wondering if there is a way to set the behaviour when the battery power is critical (let's say 5%, for example), so that Salix shuts down by itself when the remaining time is very very low. Are there packages that can do this? At the moment the discharge rate showed by powertop is about 25-28W. Too high...
User avatar
gapan
Salix Wizard
Posts: 6349
Joined: 6. Jun 2009, 17:40

Re: Laptop battery life - Openbox edition 14.1

Post by gapan »

Look into hdparm for the hard drives.

For shutting down on low battery, on xfce, mate and kde, you can set the respective power managers to do it for you, but for other environments, there is no ready solution. If you use gkrellm, it's very easy to set low and alarm limits and command to execute when these are reached. Writing you own script that checks the battery level shouldn't be too hard either. You could run that script from a cronjob every X minutes.
Image
Image
User avatar
chakuari
Posts: 38
Joined: 14. May 2011, 09:30
Contact:

Re: Laptop battery life - Openbox edition 14.1

Post by chakuari »

Is it possible to use batti for this, as it's already installed? I men, obtaining a value on remaining battery charge and then use a script for shutting down the pc and doing other things?
User avatar
chakuari
Posts: 38
Joined: 14. May 2011, 09:30
Contact:

Re: Laptop battery life - Openbox edition 14.1

Post by chakuari »

A little update. I found a key to disable the wireless connection, but still the consumption is high. Midori is a battery hog, even with a connection to localhost for testing local websites. Uhm...
djemos
Salix Warrior
Posts: 1464
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Laptop battery life - Openbox edition 14.1

Post by djemos »

since you made an installation there are also opera, firefox, qupzilla, google chrome to use.
Sometimes i also find midori late to load some pages even firefox is better.
User avatar
gapan
Salix Wizard
Posts: 6349
Joined: 6. Jun 2009, 17:40

Re: Laptop battery life - Openbox edition 14.1

Post by gapan »

chakuari wrote:Is it possible to use batti for this, as it's already installed? I men, obtaining a value on remaining battery charge and then use a script for shutting down the pc and doing other things?
I don't think so. But you can usually get the battery charge level by looking in /proc/acpi/battery/...
Image
Image
Post Reply