LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 12.1 & laptop battery life (https://www.linuxquestions.org/questions/slackware-14/slackware-12-1-and-laptop-battery-life-642017/)

Alstare 05-13-2008 08:57 PM

Slackware 12.1 & laptop battery life
 
I just picked up a new laptop <Toshiba A70, P4 3.2g HT> and obviously loaded up Slackware 12.1 on it.

My problem is the battery life is terrible by default install. I know this machine is not going to have much battery life due to the fact of it's desktop replacement specs, as apposed to most longlife laptop specs.

But right now it lasts 20mins!?!

I have adjusted the ACPI throttling options down to "T1" 87% throttling which is the max setting and it seems to have helped abit, I am currently waiting for this battery to die to get a time estimate on the benafits from the throttling.

I have tried various situations, ie. running just terminal, xfce, kde, etc.. and it doesn't seem to have much of an overall change on power usage.


As a baseline I loaded up a *buntu install to gauge battery time and managed about 45mins to an hour by default.

Any one else have any suggestions for abit more battery life that I may be missing?

Here's the "/cat/proc/acpi/processor/CPU0"
Code:

bash-3.1# cat info
processor id:            0
acpi id:                0
bus mastering control:  yes
power management:        no
throttling control:      yes
limit interface:        yes

I see "power management" is "no" so obviosuly looking into getting that into a yes state. ACPI is new to me.

SqdnGuns 05-13-2008 09:38 PM

Quote:

Originally Posted by Alstare (Post 3152432)
I just picked up a new laptop <Toshiba A70, P4 3.2g HT> and obviously loaded up Slackware 12.1 on it.

My problem is the battery life is terrible by default install. I know this machine is not going to have much battery life due to the fact of it's desktop replacement specs, as apposed to most longlife laptop specs.

But right now it lasts 20mins!?!

I have adjusted the ACPI throttling options down to "T1" 87% throttling which is the max setting and it seems to have helped a bit, I am currently waiting for this battery to die to get a time estimate on the benefits from the throttling.

I have tried various situations, ie. running just terminal, xfce, kde, etc.. and it doesn't seem to have much of an overall change on power usage.


As a baseline I loaded up a *buntu install to gauge battery time and managed about 45mins to an hour by default.

Any one else have any suggestions for abit more battery life that I may be missing?

Here's the "/cat/proc/acpi/processor/CPU0"
Code:

bash-3.1# cat info
processor id:            0
acpi id:                0
bus mastering control:  yes
power management:        no
throttling control:      yes
limit interface:        yes

I see "power management" is "no" so obviously looking into getting that into a yes state. ACPI is new to me.

You're going to have to roll your own kernel and make sure all ACPI is set properly for your laptop.

Check out this guy's setup for Gentoo on the same laptop as you:

http://www.computx.us/gentoo-A70.html

Also peruse through this page too and see how some other users have Linux running properly on their laptop.

http://www.linux-on-laptops.com/toshiba.html

Linux-on-Laptop is a great resource. When I had my Dell 600m, I checked out other laptops with similar specs and got my battery life to about 1.5 hours. That laptop would scream with Slackware on it......

Alstare 05-14-2008 01:37 AM

Thanks for the info/link...

Looks like it made a huge difference for my power consumption so far. I haven't ran out of battery yet and it's been an hour already so I am happy.

Reference for any other Toshiba Satellite A70 users...

Quote:

CPU throttling
I have cpu throttling working, now battery life is much better. To do this enable these modules in the "rc.modules" file.

P4_clockmod
cpufreq_powersave
cpufreq_ondemand
cpufreq_userspace
cpufreq_performance

Next get cpufreq_utils <slacky.eu>

cpufreq-set can be used to set the frequency or the governor used.
cpufreq-info will list the current state of cpu.

Set the governor to "ondemand"
Also the "Omnibook" ACPI module works for stats/info/throttling/temps/etc for the Toshiba Satellite A70. There is a package for it on "Slacky.eu" along with a good gui frontend for KDE "kpower"

SqdnGuns 05-14-2008 01:41 AM

Quote:

Originally Posted by Alstare (Post 3152606)
Thanks for the info/link...

Looks like it made a huge difference for my power consumption so far. I haven't ran out of battery yet and it's been an hour already so I am happy.

Reference for any other Toshiba Satellite A70 users...



Also the "Omnibook" ACPI module works for stats/info/throttling/temps/etc for the Toshiba Satellite A70. There is a package for it on "Slacky.eu" along with a good gui frontend for KDE "kpower"

Awesome.......it's nice to know when you provide some info that helps someone out.

jong357 05-14-2008 07:38 AM

You might also want to visit the archives at the mactel mailing list. A bunch of us went round and round with this issue for months. There's some good general info there if you can sift thru all the spam.

Don't know what video card your laptop has but ATI is a big culprit when it comes to power usage. Don't know if they have got powernow working or not yet. What ever their power saving feature is called.

polling is also a big killer as far as not letting the proc hit a deeper sleep state.

google "powertop". It's a pretty nice little application that gives you the low down on what's eating the most and also gives you suggestions on how to obtain better battery life. Simple things like lowering your screen backlight can save A LOT of juice as well. Setting your procs to "ondemand" also helps a lot. If your not doing anything, they'll go from 3.2ghz down to 1ghz....

But yea, as you've found, you need to roll your own kernel for sure. Make sure it's tickless, enable CONFIG_USB_SUSPEND and others...

You can also manually set many things in /{proc,sys} as well. eg -

echo 1 > /sys/module/snd_ac97_codec/parameters/power_save
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs

Lots of tricks available. Not only did I used to disable hal polling:

hal-disable-polling --device $CDROMDEVICE

But I'd:

killall hald-addon-acpi

as well. Not big on hal so I don't know if that will break automounting in anyway...

rworkman 05-14-2008 09:31 AM

For the record, there is no need to "roll your own" kernel for acpi support; just load the needed modules.

H_TeXMeX_H 05-14-2008 09:57 AM

And also see here for more ways to save power:
http://www.lesswatts.org/

I think using Linux you can get power usage significantly lower than on Window$, mostly because you can do more yourself, and tweak it more. In some cases, it's gonna be equal, but a real good "hacker" can still get it even lower.

jong357 05-14-2008 10:01 AM

Quote:

Originally Posted by rworkman (Post 3152955)
For the record, there is no need to "roll your own" kernel for acpi support; just load the needed modules.

Right. I lean towards monolithic kernels. I think I always assume everyone else prefers it as well.

Quote:

Originally Posted by H_TeXMeX_H (Post 3152955)
And also see here for more ways to save power:
http://www.lesswatts.org/

Right. That's the powertop site... ;)

jong357 05-14-2008 10:12 AM

Actually Robby, you do need to roll your own. If I'm not mistaken, Slackware doesn't ship with CONFIG_DEBUG_KERNEL --> CONFIG_TIMER_STATS

You need that in order for powertop to even work. Those are built-in only.

Also, CONFIG_USB_SUSPEND is built-in only as well, but isn't enabled in Slackware by default. Probably about half the kernel options are moduleless but you already know that... ;)

CONFIG_NO_HZ is also built-in only but I think Slack comes with that.

So you are stuck with rolling your own. If you want to conserve as much power as possible anyway....

rworkman 05-14-2008 10:37 AM

Quote:

Originally Posted by jong357 (Post 3153008)
Actually Robby, you do need to roll your own. If I'm not mistaken, Slackware doesn't ship with CONFIG_DEBUG_KERNEL --> CONFIG_TIMER_STATS

You need that in order for powertop to even work. Those are built-in only.

Also, CONFIG_USB_SUSPEND is built-in only as well, but isn't enabled in Slackware by default. Probably about half the kernel options are moduleless but you already know that... ;)

CONFIG_NO_HZ is also built-in only but I think Slack comes with that.

So you are stuck with rolling your own. If you want to conserve as much power as possible anyway....

Some valid points in there. Many of those options were tested (as they were recommended by some component manufacturers and such), but they weren't as stable as promised. By all means, if they work for you, then roll your own kernel and use them, but they are (were?) not ready to be default config options yet.

jong357 05-14-2008 10:58 AM

Quote:

Originally Posted by jong357 (Post 3152843)

hal-disable-polling --device $CDROMDEVICE

....Not big on hal so I don't know if that will break automounting in anyway...

I think that will break automounting of CD's... If I'm not mistaken that's what hal uses to see that a CD or DVD has been inserted and then sends a notification... ;)

But, it also prevents you from reaching a good p-state. Just depends on how far your willing to go to make the battery last. It's all pretty pointless in the long run. Do what you can to tweak it without loosing functionality and then wash your hands of it.

You have a laptop. It has a battery. It's going to deplete. No getting around it.

Some of us on the mactel mailing list got really obsessed with the whole thing. That's no suprise. Slackware and DIY users tend to be pretty obsessive... Well, Linux users in general I suppose. I had to force myself to stop screwing with it... ;)

dugan 05-18-2008 11:24 AM

Another good resource: How to reduce power consumption (not just for Thinkpads)

willysr 05-18-2008 11:57 AM

maybe http://www.lesswatts.org/ will do some help

Alstare 05-18-2008 01:35 PM

Thanks for all the links and info everyone, it has all helped quite abit.

The biggest problem was my battery itself, I picked up a new one online this week and that alone added another 2+ hours.

So Now I get just over 3 hours, with wifi, web surfing/email, amsn, amarok,etc.. running at the same time. More then I can ask for since the wifi seems to be the biggest draw on the battery.

This has definitely made my laptop a viable solution for my main workstation now.

storkus 07-15-2008 09:18 AM

Ok, this has been mostly helpful for me as I try to answer what's different between the old "acpid"-based setup and the new event system.
But one question still bothers me: is Pat and the gang ever gonna support laptops officially like other distros?

Mike

H_TeXMeX_H 07-15-2008 10:00 AM

So you want some sticker saying "Slackware (officially supports laptops)", so you can put it on your laptop ? My laptop works fine with Slackware, in fact it works much better than with many other distros, I consider that official enough for me. Besides, does it say anywhere that Slackware officially supports desktops and not laptops ?

storkus 07-18-2008 06:15 AM

No I don't need some stupid sticker--we'll leave that to the Ubuntoids, one of this accused me of trying to start a flame war (looking back, though, it did look like that--I need to tone down my Slack evangelism! :). But there are quite a few things that laptops need that are missing in Slackware, and good, update ACPI support being chief among them. I've got most of the stuff working but there's still a few little nagging things that won't, the worst being my Nvidia IGP not going into power save mode, but that problem is known and acknowledged by NVidia themselves, so I guess I'm screwed there. On the other hand, things like Laptop Mode support are completely missing from Slackware and I'm having to install by hand--there may be slackbuilds for them, but I haven't looked (my bad).

I'm not about to say that I'm abandoning Slackware after 14 years of loyal and loving use (true, I use SlamD64 on my laptop, but that's not exactly "leaving the fold"), but rather that it would be nice to include these things in the normal install or at least in /extra.

Mike


All times are GMT -5. The time now is 06:46 AM.