Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help me extend my laptop battery time...
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
neophyte46
Apprentice
Apprentice


Joined: 16 Mar 2004
Posts: 171
Location: Australia

PostPosted: Tue Mar 28, 2006 1:13 pm    Post subject: Help me extend my laptop battery time... Reply with quote

In Windows Xp on my Sonoma centrino (see sig for lappy details) I get about ~4hours on battery. This is with screen brightness down, running on lowest profile (800mhz).

In Gentoo at the moment I get about ~2hours 35mins.

[list=]I have enabled cpufreqd and setup speed stepping profiles. So speed stepping is in place.
I have gone through the popular ACPID article and fixed my DSDT and now have proper acpid support. So I can turn my brightness down when working on battery.
I have been through the Gentoo power management guide in an endeavour to get hibernation and suspend to ram working (doesn't work yet).
I have put in a script to set my wireless to low power when running on battery.[/list]

One thing of note, is that in linux my cpu fan never turns off. It is always on. Where as in Windows when i'm on the desktop it doesn't often come on. My cpu runs at about ~45-47C degrees which is pretty normal for it (same under windows). Surely the fan being on constantly could not suck off over an hour of battery time.

Does anybody have any suggestions as where to start? Is there anyway to find out what things are taking the most power. I.e, screen, wireless, hard disk, fan???

Would really appreciate any help here.
_________________
Acer Aspire 1690; Pentium M 1.73Ghz, 1gig DDRII 533mhz dual channel, ATI 128mb x700 PCIE,
Athlon 64 X2 3800+ @ 2.5Ghz, 2gig DDR 400, 4x120gig sata raid, A8N-SLI, ASUS 256mb 7800GTX Extreme
http://codelines.net.au - Software design and development
Back to top
View user's profile Send private message
drwook
Veteran
Veteran


Joined: 30 Mar 2005
Posts: 1324
Location: London

PostPosted: Tue Mar 28, 2006 1:28 pm    Post subject: Reply with quote

try the 'conservative' cpu frequency governer.
Back to top
View user's profile Send private message
ruben
Guru
Guru


Joined: 04 Jul 2003
Posts: 462

PostPosted: Tue Mar 28, 2006 1:34 pm    Post subject: Reply with quote

You don't mention anything about the harddisk. Maybe you should take a look at laptop-mode-tools. I use it on my laptop, and for me it helps. I think however that the biggest factor is the screen brightness in my case. I do have to say that my fan is rarely on. I don't know how much the fan consumes though. But take a look at laptop-mode-tools. You'll see how far that takes you.

I see in your sig that you're using Xgl and Compiz... I have no idea how much power that consumes, but that might be the reason your gpu/cpu is warmer and the fan is on more on linux than on windows. And it might also consume more power. Just a guess though.
Back to top
View user's profile Send private message
neophyte46
Apprentice
Apprentice


Joined: 16 Mar 2004
Posts: 171
Location: Australia

PostPosted: Tue Mar 28, 2006 1:42 pm    Post subject: Reply with quote

Thanks guys, you are right. I should have provided more info.
When I said i've set up cpufreqd I meant that I was running it at the lowest setting (forcing it to 800mhz) when on battery. Just like I do in windows.

I do keep the brightness right down.
I mentioned that I have been through the Gentoo power guide but I ommitted that I am using laptop-mode tools.

As for Xgl and Compiz, I doubt it would actually be using much more. Besides, I have a lot of extra stuff in windows anyway (StyleXP heavy + aquadock clone + 3d desk switcher (TopDesk)).

I'm still not sure why my fan is always on.

EDIT: Ok, I actually just checked laptop-mode and got this
Code:
trinity / # laptop_mode
Laptop Mode Tools 1.30
On battery power: Activating, because ENABLE_LAPTOP_MODE_ON_BATTERY is set.
Laptop mode disabled because /var/run/laptop-mode-enabled is missing.
Laptop mode Checking if desired state is different from current state.
disabled, not active [unchanged].


Ok so this would in fact suggest that laptop mode tools is not in effect?
Checking /var/run there is indeed no laptop-mode-enabled.

My laptop-mode.conf file
Code:
###############################################################################
#
# Configuration for Laptop Mode Tools
# -----------------------------------
#
# There is a "system" to the configuration setting names:
#    CONTROL_something=0/1   Determines whether Laptop Mode Tools controls
#                            something
#    LM_something=value      Value of "something" when laptop mode is active
#    NOLM_something=value    Value of "something" when laptop mode is NOT active
#    AC_something=value      Value of "something" when the computer is running
#                            on AC power
#    BATT_something=value    Value of "something when the computer is running on
#                            battery power
#
# There can be combinations of LM_/NOLM_ and AC_/BATT_ prefixes, but the
# available prefixes are different for each setting. The available ones are
# documented in the manual page, laptop-mode.conf(8). If there is no LM_/NOLM_
# in a setting name, then the value is used independently of laptop mode state,
# and similarly, if there is no AC_/BATT_, then the value is used independently
# of power state.
#
# Some options only work on ACPI systems. They are marked ACPI-ONLY.
#
# Note that this configuration file is a fragment of bash shell script: you
# can use all the features of the bash scripting language to achieve your
# desired configuration.
###############################################################################



###############################################################################
# Configuration debugging
# -----------------------
###############################################################################

# Set this to 1 if you want to see a lot of information when you start/stop
# laptop_mode.
VERBOSE_OUTPUT=1



###############################################################################
# When to enable laptop mode
# --------------------------
#
# "Laptop mode" is the mode in which laptop mode tools makes the computer
# consume less power. This includes the kernel "laptop_mode" feature, which
# allows your hard drives to spin down, as well as various other settings which
# can be tweaked by laptop mode tools. You can enable or disable all of these
# settings using the CONTROL_... options further down in this config file.
###############################################################################

# Enable laptop mode when on battery power.
ENABLE_LAPTOP_MODE_ON_BATTERY=1

# Enable laptop mode when on AC power.
ENABLE_LAPTOP_MODE_ON_AC=0

# Enable laptop mode when the laptop's lid is closed, even when we're on AC
# power? (ACPI-ONLY)
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=0



###############################################################################
# When to enable data loss sensitive features
# -------------------------------------------
#
# When data loss sensitive features are disabled, laptop mode tools acts as if
# laptop mode were disabled, for those features only.
#
# Data loss sensitive features include:
# - laptop_mode (i.e., delayed writes)
# - hard drive write cache
#
# All of the options that follow can be set to 0 in order to prevent laptop
# mode tools from using them to stop data loss sensitive features. Use this
# when you have a battery that reports the wrong information, that confuses
# laptop mode tools.
#
# Disabling data loss sensitive features is ACPI-ONLY.
###############################################################################

# Disable all data loss sensitive features when the battery level (in % of the
# battery capacity) reaches this value.
MINIMUM_BATTERY_CHARGE_PERCENT=3

# Disable data loss sensitive features when the battery reports its state
# as "critical".
DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL=1


###############################################################################
# Controlled hard drives and partitions
# -------------------------------------
#
# For spinning down your hard drives, laptop mode will remount file systems and
# adjust hard drive spindown timeouts. These parameters specify which
# devices and partitions are affected by laptop mode.
###############################################################################

# The drives that laptop mode controls.
# Separate them by a space, e.g. HD="/dev/hda /dev/hdb". The default is a
# wildcard, which will get you all your IDE and SCSI/SATA drives.
HD="/dev/[hs]d[abcdefgh]"

# The partitions (or mount points) that laptop mode controls.
# Separate the values by spaces. Use "auto" to indicate all partitions on drives
# listed in HD. You can add things to "auto", e.g. "auto /dev/hdc3". You can
# also specify mount points, e.g. "/mnt/data".
PARTITIONS="auto"



###############################################################################
# Hard drive behaviour settings
# -----------------------------
#
# These settings specify how laptop mode tools will adjust the various
# parameters of your hard drives and file systems.
###############################################################################

# Maximum time, in seconds, of work that you are prepared to lose when your
# system crashes or power runs out. This is the maximum time that Laptop Mode
# will keep unsaved data waiting in memory before spinning up your hard drive.
LM_BATT_MAX_LOST_WORK_SECONDS=600
LM_AC_MAX_LOST_WORK_SECONDS=360

# Should laptop mode tools control readahead?
CONTROL_READAHEAD=1

# Read-ahead, in kilobytes. You can spin down the disk while playing MP3/OGG
# by setting the disk readahead to a reasonable size, e.g. 3072 (3 MB).
# Effectively, the disk will read a complete MP3 at once, and will then spin
# down while the MP3/OGG is playing. Don't set this too high, because the
# readahead is applied to _all_ files that are read from disk.
LM_READAHEAD=3072
NOLM_READAHEAD=128

# Should laptop mode tools add the "noatime" option to the mount options when
# laptop mode is enabled?
CONTROL_NOATIME=0

# Should laptop mode tools control the hard drive idle timeout settings?
CONTROL_HD_IDLE_TIMEOUT=1

# Idle timeout values. (hdparm -S)
# Default is 2 hours on AC (NOLM_HD_IDLE_TIMEOUT_SECONDS=7200) and 5 seconds
# for battery and for AC with laptop mode on.
LM_AC_HD_IDLE_TIMEOUT_SECONDS=5
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=5
NOLM_HD_IDLE_TIMEOUT_SECONDS=7200

# Should laptop mode tools control the hard drive power management settings?
CONTROL_HD_POWERMGMT=0

# Power management for HD (hdparm -B values)
BATT_HD_POWERMGMT=1
LM_AC_HD_POWERMGMT=255
NOLM_AC_HD_POWERMGMT=255

# Should laptop mode tools control the hard drive write cache settings?
CONTROL_HD_WRITECACHE=0

# Write cache settings for HD (hdparm -W values)
NOLM_AC_HD_WRITECACHE=1
NOLM_BATT_HD_WRITECACHE=0
LM_HD_WRITECACHE=0



###############################################################################
# CPU frequency scaling and throttling
# ------------------------------------
#
# Laptop mode tools can automatically adjust your kernel CPU frequency
# settings. This includes upper and lower limits and scaling governors.
# There is also support for CPU throttling, on systems that don't support
# frequency scaling.
#
# This feature only works on 2.6 kernels.
###############################################################################

# Should laptop mode tools control the maximum CPU frequency?
CONTROL_CPU_FREQUENCY=0

# Legal values are "slowest" for the slowest speed that your
# CPU is able to operate at, "fastest" for the fastest speed,
# "medium" for some value in the middle, or any value listed in
# /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies.
BATT_CPU_MAXFREQ=medium
BATT_CPU_MINFREQ=slowest
BATT_CPU_GOVERNOR=ondemand
LM_AC_CPU_MAXFREQ=fastest
LM_AC_CPU_MINFREQ=slowest
LM_AC_CPU_GOVERNOR=ondemand
NOLM_AC_CPU_MAXFREQ=fastest
NOLM_AC_CPU_MINFREQ=slowest
NOLM_AC_CPU_GOVERNOR=performance

# Should laptop mode tools control the CPU throttling? This is only useful
# on processors that don't have frequency scaling.
# (Only works when you have /proc/acpi/processor/CPU*/throttling.)
CONTROL_CPU_THROTTLING=0

# Legal values are "maximum" for the maximum (slowest) throttling level,
# "minimum" for minimum (fastest) throttling level, "medium" for a value
# somewhere in the middle (this is usually 50% for P4s), or any value listed
# in /proc/acpi/processor/CPU*/throttling. Be careful when using "maximum":
# this may be _very_ slow (in fact, with P4s it slows down the processor
# by a factor 8).
BATT_CPU_THROTTLING=medium
LM_AC_CPU_THROTTLING=medium
NOLM_AC_CPU_THROTTLING=minimum



###############################################################################
# Syslog configuration control
# ----------------------------
#
# Syslog daemons have a tendency to sync their log files when entries are
# written to them. This causes disks to spin up, which is not very nice when
# you're trying to save power. The syslog.conf can be tweaked to *not* sync
# a given file, by prepending the log file name with a dash, like this:
#
#    mail.*      -/var/log/mail/mail.log
#
# Using the following options, you can let laptop mode switch between
# different syslog configurations depending on whether you are working on
# battery or on AC power. To set this up, start by configuring these options
# for your syslog daemon, and then run lm-syslog-setup to create the various
# files. Then edit the laptop mode-specific syslog configuration files to
# remove the syncs only when laptop mode is active.
###############################################################################

# Should laptop mode tools control which syslog.conf should be used?
CONTROL_SYSLOG_CONF=0

# Laptop mode tools controls syslog.conf by replacing /etc/syslog.conf (or
# whatever you specify in SYSLOG_CONF) by a link to the files configured here.
# NOTE: these files are NOT created by default, and if they do not
# exist this feature will not work. You can run the script
# /usr/sbin/lm-syslog-setup to set things up.
LM_AC_SYSLOG_CONF=/etc/syslog-on-ac-with-lm.conf
NOLM_AC_SYSLOG_CONF=/etc/syslog-on-ac-without-lm.conf
BATT_SYSLOG_CONF=/etc/syslog-on-battery.conf

# Signal this program when syslog.conf has been replaced.
SYSLOG_CONF_SIGNAL_PROGRAM=syslogd

# This is the syslog configuration file that should be replaced by a link to the
# other files.
SYSLOG_CONF=/etc/syslog.conf



###############################################################################
# X display settings
# ------------------
#
# Using these settings, you can let laptop mode tools control the X display
# standby timeouts.
###############################################################################

# Should laptop mode tools control DPMS standby settings for X displays?
CONTROL_DPMS_STANDBY=0

# These settings specify the standby timeout for the X display,
# in seconds. The suspend and poweroff timeouts are somewhat
# larger values derived from these values.
BATT_DPMS_STANDBY=300
LM_AC_DPMS_STANDBY=1200
NOLM_AC_DPMS_STANDBY=1200



###############################################################################
# Terminal settings
# -----------------
#
# Using these settings, you can let laptop mode tools control the terminal
# blanking timeouts.
###############################################################################

# Should laptop mode tools control terminal blanking settings?
CONTROL_TERMINAL=0

# These settings specify the blanking and powerdown timeouts. Note that
# the powerdown timeout is counted from the moment the screen is blanked,
# i.e. BLANK_MINUTES=2 and POWERDOWN_MINUTES=5 means the screen powers
# down after 7 minutes of inactivity. The range for all these settings is
# 1 to 60 minutes, or 0 to disable.
BATT_TERMINAL_BLANK_MINUTES=2
BATT_TERMINAL_POWERDOWN_MINUTES=1
LM_AC_TERMINAL_BLANK_MINUTES=10
LM_AC_TERMINAL_POWERDOWN_MINUTES=10
NOLM_AC_TERMINAL_BLANK_MINUTES=10
NOLM_AC_TERMINAL_POWERDOWN_MINUTES=50



###############################################################################
# Auto-hibernation settings
# -------------------------
#
# Using these settings, you can make laptop mode tools automatically put your
# computer into hibernation when the battery level goes critically low.
#
# This feature only works on ACPI, and only works on computers whose batteries
# give off battery events often enough.
###############################################################################

# Should laptop mode tools perform auto-hibernation?
ENABLE_AUTO_HIBERNATION=0

# The hibernation command that is to be executed when auto-hibernation
# is triggered.
HIBERNATE_COMMAND=/usr/sbin/hibernate

# Auto-hibernation battery level threshold, in percentage of the battery's
# total capacity.
AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT=2

# Enable this to auto-hibernate if the battery reports that its level is
# "critical".
AUTO_HIBERNATION_ON_CRITICAL_BATTERY_LEVEL=1



###############################################################################
# Start/Stop Programs settings
# ----------------------------
#
# Laptop mode tools can automatically start and stop programs when entering
# various power modes. Put scripts accepting "start" and "stop" parameters
# in the directories /etc/laptop-mode/batt-stop, batt-start, lm-ac-stop,
# lm-ac-start, nolm-ac-stop and nolm-ac-start. Laptop mode will call the
# scripts in a state-"stop" directory with the "stop" parameter when entering
# the state in question, and it will call the same scripts with the "start"
# parameter when leaving the state. Scripts in a state-"start" directory are
# called with the "start" parameter when the specified state is entered, and
# with the "stop" parameter when the specified state is left.
###############################################################################

# Should laptop mode start and stop programs?
CONTROL_START_STOP=1



###############################################################################
# Settings you probably don't want to touch
# -----------------------------------------
#
# It is usually not necessary to change these parameters. They are included
# for completeness' sake.
###############################################################################

# Change mount options on partitions in PARTITIONS? You don't really want to
# disable this. If you do, then your hard drives will probably not spin down
# anymore.
CONTROL_MOUNT_OPTIONS=1

# Dirty synchronous ratio.  At this percentage of dirty pages the process
# which calls write() does its own writeback.
LM_DIRTY_RATIO=60
NOLM_DIRTY_RATIO=40

# Allowed dirty background ratio, in percent.  Once DIRTY_RATIO has been
# exceeded, the kernel will wake pdflush which will then reduce the amount
# of dirty memory to dirty_background_ratio.  Set this nice and low, so once
# some writeout has commenced, we do a lot of it.
LM_DIRTY_BACKGROUND_RATIO=1
NOLM_DIRTY_BACKGROUND_RATIO=10

# kernel default settings -- don't touch these unless you know what you're
# doing.
DEF_UPDATE=5
DEF_XFS_AGE_BUFFER=15
DEF_XFS_SYNC_INTERVAL=30
DEF_XFS_BUFD_INTERVAL=1
DEF_MAX_AGE=30

# This must be adjusted manually to the value of HZ in the running kernel
# on 2.4, until the XFS people change their 2.4 external interfaces to work in
# centisecs. This can be automated, but it's a work in progress that still
# needs# some fixes. On 2.6 kernels, XFS uses USER_HZ instead of HZ for
# external interfaces, and that is currently always set to 100. So you don't
# need to change this on 2.6.
XFS_HZ=100

# Seconds laptop mode has to to wait after the disk goes idle before doing
# a sync.
LM_SECONDS_BEFORE_SYNC=2


This might also be a good time to ask how I strip out commenting lines when posting stuff in future. How do I cat it out and grep for lines not starting with a #?

WHere should I go from here?
_________________
Acer Aspire 1690; Pentium M 1.73Ghz, 1gig DDRII 533mhz dual channel, ATI 128mb x700 PCIE,
Athlon 64 X2 3800+ @ 2.5Ghz, 2gig DDR 400, 4x120gig sata raid, A8N-SLI, ASUS 256mb 7800GTX Extreme
http://codelines.net.au - Software design and development
Back to top
View user's profile Send private message
tboloo
Guru
Guru


Joined: 20 Jan 2006
Posts: 403
Location: Grodzisq, Poland

PostPosted: Tue Mar 28, 2006 2:28 pm    Post subject: Reply with quote

I have similar problem (much shorter battery life) on my ACER tm4001. Right now I'm digging into undervoltin. Did you try cpupw from https://forums.gentoo.org/viewtopic-t-443685-highlight-.html :?: It provides some useful info.
_________________
The clock is ticking, brothers and sisters, counting down to Armageddon.
Back to top
View user's profile Send private message
neophyte46
Apprentice
Apprentice


Joined: 16 Mar 2004
Posts: 171
Location: Australia

PostPosted: Tue Mar 28, 2006 2:57 pm    Post subject: Reply with quote

tboloo wrote:
I have similar problem (much shorter battery life) on my ACER tm4001. Right now I'm digging into undervoltin. Did you try cpupw from https://forums.gentoo.org/viewtopic-t-443685-highlight-.html :?: It provides some useful info.


No I haven't, might consider looking into that shortly after I actually get laptop-mode tools working.

Cheers,
_________________
Acer Aspire 1690; Pentium M 1.73Ghz, 1gig DDRII 533mhz dual channel, ATI 128mb x700 PCIE,
Athlon 64 X2 3800+ @ 2.5Ghz, 2gig DDR 400, 4x120gig sata raid, A8N-SLI, ASUS 256mb 7800GTX Extreme
http://codelines.net.au - Software design and development
Back to top
View user's profile Send private message
ruben
Guru
Guru


Joined: 04 Jul 2003
Posts: 462

PostPosted: Wed Mar 29, 2006 9:09 am    Post subject: Reply with quote

I compared your laptop-mode.conf with mine, and the config is very similar.
(you can strip comments with something like grep '^[^#]')

I am actually using Debian on my laptop now, and I'm not near my gentoo desktop to check that, but I believe there is a script in /etc/init.d to start laptop mode at boot time. On Debian, I see that the init-script actually makes and removes /var/run/laptop-mode-enabled. Maybe you need to try to start it from the init-script. Also, I think you can manually run it, but then you need to use "laptop-mode start". Or you can use "laptop-mode auto" and then it enables or disables depending on whether your computer is on battery or not.

Ah.. checking the man-page: "Note: if the service /etc/init.d/laptop-mode has not been started, laptop mode will never be enabled." That's probably the reason it's not running then..?

You can use "cat /proc/sys/vm/laptop_mode" to see whether it's active in the kernel. A value of 0 means it's not.

You can use hdparm to check whether your disk is really going into sleep (first time you run it, it'll need the disk to read the hdparm executable of course, but 5 seconds later, it should be in standby):
Code:
guava ruben # hdparm -C /dev/hda
/dev/hda:
 drive state is:  active/idle
guava ruben # hdparm -C /dev/hda
/dev/hda:
 drive state is:  standby


Just a thought... if your harddisk does not go into sleep, it will also make your laptop warmer.. maybe that's the reason for the fans then. Or otherwise, for my laptop (iBook), the linux driver for enabling the fans enables them by default at a much lower temperature than the OSX driver does. This means that when doing a bit heavier work, it makes a lot more noise than in OSX. It is configurable though. Maybe there's something similar going on on your configuration? But I have to say I don't have any experience with other laptops than mine.
Back to top
View user's profile Send private message
neophyte46
Apprentice
Apprentice


Joined: 16 Mar 2004
Posts: 171
Location: Australia

PostPosted: Wed Mar 29, 2006 1:39 pm    Post subject: Reply with quote

Oh man, please don't go anyway your post was absolute gold! lol

Code:
trinity josh # cat /proc/sys/vm/laptop_mode
2
trinity josh #


Ok, I've noticed it doesn't automatically load laptop tools when I load the pc on battery. But on power, when I pull the power cable out and do
Code:
/etc/init.d/laptop-mode auto
it starts. But I don't get an entry in
Code:
/var/run/laptop-mode


Very good point about both the fan and the hard drive. I will need to do some testing and heck with hdparm whem i'm doing almost nothing on my pc (i'm compiling atm) and see what state the drive is in. Also, i'll have to look into the fan thing.

Thanks for the regex for grep. I feel so stupid I didn't think of it. It was right on the money.

I'll come back with some more info shortly when emerges finish.

Many thanks,
_________________
Acer Aspire 1690; Pentium M 1.73Ghz, 1gig DDRII 533mhz dual channel, ATI 128mb x700 PCIE,
Athlon 64 X2 3800+ @ 2.5Ghz, 2gig DDR 400, 4x120gig sata raid, A8N-SLI, ASUS 256mb 7800GTX Extreme
http://codelines.net.au - Software design and development
Back to top
View user's profile Send private message
neophyte46
Apprentice
Apprentice


Joined: 16 Mar 2004
Posts: 171
Location: Australia

PostPosted: Wed Mar 29, 2006 2:02 pm    Post subject: Reply with quote

Ok so I have checked hdparm -C -c results and it seems that the drive is going into standby properly.

However,
I was looking in /etc/laptop-mode/laptop-mode.conf again at the power management setting.
Code:
# Power management for HD (hdparm -B values)
BATT_HD_POWERMGMT=1
LM_AC_HD_POWERMGMT=255
NOLM_AC_HD_POWERMGMT=255


Code:
trinity trunk # hdparm -B /dev/hda
-B: missing value (1-255)

/dev/hda:


When I checked it wasn't outputting anything.
_________________
Acer Aspire 1690; Pentium M 1.73Ghz, 1gig DDRII 533mhz dual channel, ATI 128mb x700 PCIE,
Athlon 64 X2 3800+ @ 2.5Ghz, 2gig DDR 400, 4x120gig sata raid, A8N-SLI, ASUS 256mb 7800GTX Extreme
http://codelines.net.au - Software design and development
Back to top
View user's profile Send private message
goom
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2003
Posts: 96
Location: Dortmund, Germany

PostPosted: Thu Mar 30, 2006 6:52 am    Post subject: Reply with quote

apmd is needed to use laptop-mode-tools? so i have to run acpid and apmd the same time? is this possible? my laptop is getting pretty warm too, and I only get about 1h45min when running in battery mode (1.07GHz, dunno why cpufreqd does not go to 800MHz, my config is set up correctly). back to my first questions :)

hoping for nice answers :)
_________________
http://www.dispatchmusic.com
- Listen to Dispatch - smile - be happy -

http://www.maggimarkus.de
- my (german) page
Back to top
View user's profile Send private message
ruben
Guru
Guru


Joined: 04 Jul 2003
Posts: 462

PostPosted: Sun Apr 02, 2006 3:19 pm    Post subject: Reply with quote

hey guys.. sorry for the wait.
neophyte46 wrote:
Ok, I've noticed it doesn't automatically load laptop tools when I load the pc on battery. But on power, when I pull the power cable out and do
Code:
/etc/init.d/laptop-mode auto
it starts. But I don't get an entry in
Code:
/var/run/laptop-mode

Ok, maybe I wasn't very clear, but I meant "/usr/sbin/laptop_mode auto".
But anyways, doesn't matter, since it seems that it's working then.
You should be sure that it is added to your default runlevel, so that it is run each time you boot. You can add it like this (as root):
Code:
rc-update add laptop_mode default

Now, however, the laptop_mode script is only run during bootup. The problem is that you also need to run the script when you switch from battery to AC or the other way around. On my iBook, which has "pmud" (instead of acpi/apm), I use "pbuttonsd" for that, but you will need to use "acpid". I think you can put "actions" in /etc/acpi/actions. Then I think you need to have a script as an action there, that is triggered by a change in the battery state (battery<->ac) and that simply runs "usr/sbin/laptop_mode auto" to modify the settings appropriately. But as I said, I've never used acpid, so I can't really help with it.

About your other post about the power management setting: it is not actually using that setting, because you also have the following in your config.
Code:
# Should laptop mode tools control the hard drive power management settings?
CONTROL_HD_POWERMGMT=0

It uses indeed the "-B" option of hdparm, but you need to use it like "-B 64" or something. From the manual:
Quote:
-B Set Advanced Power Management feature, if the drive supports it. A low value means aggressive power management and a high value means better performance. A value of 255 will disable apm on the drive.

I don't exactly know what it does, but in any case, I don't use it. I leave it disabled in laptop-mode.conf.

@goom:
Nope, you don't need apmd. Just emerge laptop-mode-tools with USE-flags "acpi -apm".
Back to top
View user's profile Send private message
neophyte46
Apprentice
Apprentice


Joined: 16 Mar 2004
Posts: 171
Location: Australia

PostPosted: Mon Apr 03, 2006 12:43 am    Post subject: Reply with quote

I'm not posting from my laptop at the moment so i'll have to give an update tonight. But I think one thing which is drawing a bit of extra power is my x700 video card. I know on windows the ati drivers have an option to put it (the video card) in power saving mode, where by it shuts off many of the unused PCIE lanes (as it does not need to use all 16 when not performing heavy 3d usage such as games).

For some reason my ati-config does not appear to be working correctly at the moment but I will post back with some more information tonight.
_________________
Acer Aspire 1690; Pentium M 1.73Ghz, 1gig DDRII 533mhz dual channel, ATI 128mb x700 PCIE,
Athlon 64 X2 3800+ @ 2.5Ghz, 2gig DDR 400, 4x120gig sata raid, A8N-SLI, ASUS 256mb 7800GTX Extreme
http://codelines.net.au - Software design and development
Back to top
View user's profile Send private message
lefou
Apprentice
Apprentice


Joined: 18 Feb 2004
Posts: 207
Location: Germany, Lusatia

PostPosted: Mon Apr 03, 2006 1:24 am    Post subject: Reply with quote

I you are using the open-source ati driver from xorg then you could try the
Code:
    Option      "DynamicClocks" "on"

option, which should enable at least some power management functions of a radeon card.
Back to top
View user's profile Send private message
sven_sol
Tux's lil' helper
Tux's lil' helper


Joined: 27 Apr 2005
Posts: 120
Location: Royston, Herts. UK

PostPosted: Tue Apr 04, 2006 11:39 am    Post subject: Reply with quote

For some unknown reason (must have been a rewrite with the power management) but I've found I get the best battery life with kernel verion 2.6.7

I can quite happily get abou 4 to 5 hours on my Toshiba M10 with the Speed and brightness turned down, but as soon as I upgraded to the versions after (upto and including 2.6.15) I only squeeze out 2.5 hours max.

I've yet to try out the 2.6.16 tree, but I keep hoping it'll be better.
_________________
Tua mater tam antiqua ut linguam latinam loquatur

Linux User: #405647
Back to top
View user's profile Send private message
neophyte46
Apprentice
Apprentice


Joined: 16 Mar 2004
Posts: 171
Location: Australia

PostPosted: Tue Apr 04, 2006 12:34 pm    Post subject: Reply with quote

sven_sol wrote:
For some unknown reason (must have been a rewrite with the power management) but I've found I get the best battery life with kernel verion 2.6.7

I can quite happily get abou 4 to 5 hours on my Toshiba M10 with the Speed and brightness turned down, but as soon as I upgraded to the versions after (upto and including 2.6.15) I only squeeze out 2.5 hours max.

I've yet to try out the 2.6.16 tree, but I keep hoping it'll be better.


That is very interesting. I wonder why that might be?
I'm on gentoo-2.6.15-r1 at the moment but also plan on migrating to a 2.6.16 kernel at some stage (been really busy).

If you do try it out, be sure to come back and let me know how it goes.
Cheers,
_________________
Acer Aspire 1690; Pentium M 1.73Ghz, 1gig DDRII 533mhz dual channel, ATI 128mb x700 PCIE,
Athlon 64 X2 3800+ @ 2.5Ghz, 2gig DDR 400, 4x120gig sata raid, A8N-SLI, ASUS 256mb 7800GTX Extreme
http://codelines.net.au - Software design and development
Back to top
View user's profile Send private message
calle2003
n00b
n00b


Joined: 21 Oct 2004
Posts: 63

PostPosted: Wed Apr 05, 2006 6:37 pm    Post subject: Reply with quote

I wondered why nobody mentions a tool to put the computer to sleep after a certain period of inactivity. I think this is very important in a work environment where you might get distracted from your work by a phone call or colleague and forget to put the machine to sleep.

Since I found no solution in Gentoo I looked elsewhere and found the sleepd package in Debian which does this and also can hibernate the machine on low battery. I use it for my desktop computer to conserve energy when I leave it without shutting down first. The package works with apm and acpi, but of course needs a working solution for suspend / hibernate (I'm using swsusp2).

You may try it if you like, you find the ebuild and two files for the init script at bug 127629.

Best regards,
Christian.
Back to top
View user's profile Send private message
neophyte46
Apprentice
Apprentice


Joined: 16 Mar 2004
Posts: 171
Location: Australia

PostPosted: Sat Apr 15, 2006 9:18 am    Post subject: Reply with quote

Sorry it has been a while since I've been back here guys. I've been really busy with uni and had to fix a whole bunch fo stuff (upgraded to a 2.6.16-r2) kernel. I've now got cpu frequency scaling and battery usage working again. Laptop mode tools is active (I think).
But I cannot get/set ati powernow operating mode.

Code:
josh@trinity ~ $ aticonfig | grep -i "power"
POWERplay Options:
  --lsp, --list-powerstates
        Print information about power states and exit.
  --set-powerstate=NUMBER
        Set a power state listed by --list-powerstates.
                     session if applicable.  Only 'set-powerstate' and
josh@trinity ~ $ aticonfig --lsp
Error: Unable to obtain POWERplay information.


So this means my
Code:
Option      "DynamicClocks" "on"
in my xorg.conf file is not having any effect. I am not getting any power saving functionality out of my x700.

This is the version of ati drivers i'm using (fglrx)
Code:
trinity josh # emerge ati-drivers -av

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] x11-drivers/ati-drivers-8.23.7  USE="opengl" 0 kB

Total size of downloads: 0 kB

Do you want me to merge these packages? [Yes/No]


This is really annoying. Does anybody have any ideas why this powernow might not be available.
_________________
Acer Aspire 1690; Pentium M 1.73Ghz, 1gig DDRII 533mhz dual channel, ATI 128mb x700 PCIE,
Athlon 64 X2 3800+ @ 2.5Ghz, 2gig DDR 400, 4x120gig sata raid, A8N-SLI, ASUS 256mb 7800GTX Extreme
http://codelines.net.au - Software design and development
Back to top
View user's profile Send private message
lefou
Apprentice
Apprentice


Joined: 18 Feb 2004
Posts: 207
Location: Germany, Lusatia

PostPosted: Tue Apr 18, 2006 7:42 pm    Post subject: Reply with quote

neophyte46 wrote:

So this means my
Code:
Option      "DynamicClocks" "on"
in my xorg.conf file is not having any effect. I am not getting any power saving functionality out of my x700.


This option is for the open soure radeon driver only. the closed source driver provided by ATI (fglrx) does not provide this option. But the powersaving should be in general nearly the same as with the open source driver. At least, the fan that cooles the GPU stops in both configurations sometimes for me, but never stops if using the open source driver without this option.
Back to top
View user's profile Send private message
seiichiro0185
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2005
Posts: 115
Location: Berlin, Germany

PostPosted: Wed Apr 19, 2006 7:12 am    Post subject: Reply with quote

I also noticed that power-saving mode with the fglrx-driver doesn't really work. But I use another solution now. I use the rovclock tool from here (also in portage now) to underclock my radeon 9700 Mobility (dunno if it also works for a x700) when on battery. This gives me quite some minutes more of battery lifetime.

seiichiro0185
_________________
Desktop: AMD Athlon64 4850e@2,9GHz| 2GB RAM | 500GB HDD
Laptop: Dell Vostro 1310: C2D 2.1GHz | 4GB RAM | 250GB HDD
Server: Via C7D 1,5GHz | 512MB RAM | 1TB HDD
Back to top
View user's profile Send private message
akb
Guru
Guru


Joined: 25 Jan 2003
Posts: 314
Location: Wolfenbüttel/Germany

PostPosted: Wed May 03, 2006 11:10 pm    Post subject: Reply with quote

sven_sol wrote:
For some unknown reason (must have been a rewrite with the power management) but I've found I get the best battery life with kernel verion 2.6.7

I can quite happily get abou 4 to 5 hours on my Toshiba M10 with the Speed and brightness turned down, but as soon as I upgraded to the versions after (upto and including 2.6.15) I only squeeze out 2.5 hours max.

I've yet to try out the 2.6.16 tree, but I keep hoping it'll be better.


do you have something new to tell about this? i am getting no more than 1:20 (!!!) out of my system, though i am running at half of my cpufreq nearly all the time and such. i really would like to know whats up with this here :-( i also tried to clock down my ati graphics, but this gives me only 2-5 minutes more, if i should believe my gnomes battery applet
Back to top
View user's profile Send private message
lefou
Apprentice
Apprentice


Joined: 18 Feb 2004
Posts: 207
Location: Germany, Lusatia

PostPosted: Thu May 04, 2006 7:52 am    Post subject: Reply with quote

akb wrote:
..., if i should believe my gnomes battery applet


[advertising]
You should use KDE, than you could use KTHinkBat as battery applet :) , which shows you the current power consumption of the laptop in battery mode.
[/advertising]
Back to top
View user's profile Send private message
akb
Guru
Guru


Joined: 25 Jan 2003
Posts: 314
Location: Wolfenbüttel/Germany

PostPosted: Thu May 04, 2006 10:01 am    Post subject: Reply with quote

cat /proc/acpi/battery/BAT0/state :-P
Back to top
View user's profile Send private message
Rhiakath
Guru
Guru


Joined: 10 Feb 2006
Posts: 572
Location: Hell...

PostPosted: Mon May 08, 2006 12:24 am    Post subject: Reply with quote

Hi there. As i own a Centrino laptop too, do you think there's any problem in emerging laptop-mode-tools, since i have already emerged cpufreqd, acpid, and powermgmt? is there any conflict between them? The reason is, my laptop gets hotter in linux than it did in windows. can't tell you specifics, since i removed windows from it (YIIPEEEEE) and am currently working only in gentoo. thanks!
Back to top
View user's profile Send private message
demogog
n00b
n00b


Joined: 26 May 2005
Posts: 16

PostPosted: Wed May 10, 2006 11:17 am    Post subject: Reply with quote

Well, I have Thinkpad R40 witn a Pentium 4M 2,2Ghz. This laptop is like... 2 years old, so the battery isn't that new. But I still can get around 2.30 hours out of it under Gentoo. Under windows it is about 3.30 Hours.

The reason is (as I get it) that ACPI drivers under linux isn't that advanced as for windows. GPU takes a lot (specially if you run XGL, since it is OpenGL thingy and it is being used as in game)
Back to top
View user's profile Send private message
akb
Guru
Guru


Joined: 25 Jan 2003
Posts: 314
Location: Wolfenbüttel/Germany

PostPosted: Wed May 17, 2006 12:59 pm    Post subject: Reply with quote

uhm... how can i execute a command when the AC is unplugged/plugged, so i could use the rovclock tool automagically?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum