LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-07-2009, 12:25 AM   #1
TwinReverb
Member
 
Registered: Sep 2008
Location: Misawa AB, Japan
Distribution: Slackware
Posts: 191
Blog Entries: 2

Rep: Reputation: 40
Power Consumption: hdparm


All,

Just to drop a line to all you who want better battery life out of your laptop, here's some stuff I've done to get that. Mainly it's hdparm but here are the things I've done:

1) Recompile kernel with usbcore as <M> and add auto_suspend capability to it, with tickless enabled, with ondemand as the default CPUFreq governor, and specifying my CPU with disabling Generic X86. Tickless might only give you 1%, but that's better than nothing.

2) Using hdparm and /etc/acpi/acpi_handler.sh, tell machine to set hard drive to max power savings when on battery but max performance when plugged in. This goes in acpi_handler.sh (make sure it's executable):

Code:
if on_ac_power; then
   hdparm -B 254 /dev/sda
else
   hdparm -B 1 /dev/sda
fi
3) Set Xfce's power manager to set CPUFreq to max power savings when on battery but max performance when plugged in. I do this mainly because ondemand can do lots of switching which requires that something stop and change frequencies. In my use, this saves more power, but YMMV. Anyways, if you want to do this in acpi_handler.sh you could do this (my computer is a core 2 duo):

Code:
if on_ac_power; then
   hdparm -B 254 /dev/sda
   echo "performance" > \
      /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
   echo "performance" > \
      /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
else
   hdparm -B 1 /dev/sda
   echo "powersave" > \
      /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
   echo "powersave" > \
      /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
fi
This is just an informative post for those of us laptop-heads out there. Enjoy!
 
Old 10-07-2009, 05:03 PM   #2
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 543

Rep: Reputation: 121Reputation: 121
My friend, I don't want to be a piss, but can you verify if 'Default CPUFreq governor' don't need to be 'userspace'? The policy governors (ondemand, performance...) should be modules, ok I understand that... Can you scale frequency with fixed CPUFreq? Can you test it, please?
 
Old 10-07-2009, 08:00 PM   #3
TwinReverb
Member
 
Registered: Sep 2008
Location: Misawa AB, Japan
Distribution: Slackware
Posts: 191

Original Poster
Blog Entries: 2

Rep: Reputation: 40
Quote:
Originally Posted by BrZ View Post
My friend, I don't want to be a piss, but can you verify if 'Default CPUFreq governor' don't need to be 'userspace'? The policy governors (ondemand, performance...) should be modules, ok I understand that... Can you scale frequency with fixed CPUFreq? Can you test it, please?
It does not need to be userspace, but you can use userspace if you want. For me, I am saying that I set it to highest ("performance") when plugged in and lowest ("powersave") when not, but it's up to the user, as there is also:

1) Conservative: slowly changes frequency based on load
2) Ondemand: the "default", scales based on load
3) Userspace: you can set it at whatever frequency you want it to be at

Cheers!
 
Old 10-07-2009, 08:26 PM   #4
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 543

Rep: Reputation: 121Reputation: 121
Thanks. I will go on another kernel rebuild on this notebook and really trying to extend battery life.
Kernel 2.3.31.2 fixed ath5k wakeup after resume/suspend and 2.3.31.3 was released today. I hope my hardware can work without major 'bugs' to forget about kernels very soon... Thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Techniques for minimizing power consumption aloishis89 Linux - Desktop 1 04-24-2009 06:53 PM
Laptop Power Consumption justmovedtolinux Linux - Laptop and Netbook 5 10-01-2008 01:56 AM
Computer with the lowest power consumption Matizek General 24 02-08-2008 11:10 AM
Power consumption? meniscus Linux - Hardware 4 12-08-2006 04:58 AM
firewall power consumption Digital_Err0r Linux - Hardware 4 03-20-2005 12:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration