Help - Search - Members - Calendar
Full Version: Mandriva 2008 power management
MandrivaUsers.org > Advanced Topics > Laptops and Portable Devices
coverup
My Mandriva 2008 laptop noticably slows down at random times, so that I could see the mouse pointer jumping from place to place rather than moving smoothly, or a key "getting stuck" for a short moment. Also, I think, this also coincides with the fans kicking in. The laptop is currently running from AC power and the kpowersave policy is "Performance" which also includes Dynamic speedstepping policy. I don't run any power hungry applications, only Firefox, Emacs and a couple of xdvi-k sessions, Compiz, screensaver and other graphic effects such as launchfeedback, window animations, etc are disabled.
The CD tray is empty as well.

I wonder what causes the laptop to slow down, and how to make it run run smoothly? It's one of the latest laptops, 2.2Ghz Intel Core Duo, 2Gb memory, there must be plenty of resource.


[moved from Installing Mandriva by spinynorman]
tyme
try to note when this occurs and see if there is any sort of timing to it (every 10 minutes, half hour, etc.). i know you say it's random but sometimes there is a pattern there smile.gif. also, when this occurs (fans spin up, things slow down) open a terminal (konsole in KDE, gnome-terminal in GNOME), run top and note any items that appear to be using a lot of CPU (they should be at the top of the list). This while help to see if there's a program running that is causing it.

let us know if you have any questions and post back with any results, thanks!
daniewicz
Is there anything of interest in /var/log/messages?

I wish I could help more but all of my laptop experience is with (K)Ubuntu.
coverup
I found that intermittent pauses occur during /caused by some harddrive activity, when the harddisk LED stays up for a second or so, and I even can feel the vibration. No messages are dumped into /var/log/messages during those activities. I would really like to know what is causing those pauses. As for the pattern, it is hard to say... I was typing some stuff in Emacs earlier today and the pauses occurred every few minutes or so, but now when I am typing this post, there does not seem to be any. However, I disabled Lisa, NFS and a couple of other services.
tyme
Did you check the top command to see if there were any processes taking up resources? It also may be the file indexing program, I'm not sure if Mandriva still includes that.
coverup
I turned off indexing the very first boot into the KDE.

The processes that topped the list were artsd, firefox, (these were always on top), and also ksoftirqd, mysqld, hald, net_applet, ifplugd, X, scsi_eh_1, ata/0.

I went further in my investigation and turned off a bunch of services I think I don't need: lisa, mysqld, nfs-common and nfs-server, openvpn, portmap, postfix, resolvconf, and winbind. That calmed the system down a bit, I could even hear fans slowing down for a short while, and the harddisk LED stopped flashing. Maybe I did do something right....

Services I am not certain about are

* cups - do I need it running just to be able to print from the laptop? I print to a LAN printer
* netfs - I don't know what it does, the description says it mounts all SMB and NFS mount points. I don't use NFS or SMB at the moment, but may ocasionally need to use SMB. Worth netfs running?
* nscd - I cannot understand the info. Something about passwords and groups lookups.
* partmon - Is it really useful?
* resolvconf - I turned it off, but what does it really do?
* winbind - again, it has something to do with SMB.
tyme
cups - yes, you need it to print, even to a LAN printer.

nscd - essentially, everytime you go to a website it asks a nameserver (DNS) what the IP address of that website is. NSCD caches this information so that the system doesn't have to ask for it everytime you visit a website. If you have slow nameservers or want to minimize network traffic it may be useful, but most users won't notice any difference whether this is on or off (neither should it have any real impact on system performance).

resolvconf:
QUOTE
The resolvconf program is only necessary when a system has multiple programs that need to dynamically modify the nameserver information. In a simple system where the nameservers do not change often or are only changed by one program, the resolv.conf configuration file is adequate.
Since this is a laptop, I assume you aren't running any servers or doing any funky name server stuff I highly doubt you need it.

netfs and winbind you can probably safely turn off, though if you try to connect to SMB shares and it doesn't work start them back up. I am, however, pretty sure neither is necessary as I've accessed SMB shares on systems without either of these services.

i'm not sure about partmon...
coverup
Thanks, tyme. Much appreciate.

My dhcp servers bot at work and home write DNS server information into /etc/resolv.conf. No reason to keep resolvconf running.
ianw1974
What other services you got enabled?

CODE
chkconfig --list | grep :on


then we can see what's enabled using the ohmy.gifn and filtering it. Also, you can disable avahi-daemon, since you won't use this. It's the old mDNSResponder service that deals with zeroconf stuff - and in home networks you definitely don't use it - never really seen it in use when in the office either, although I'm sure there are some scenarios for it.
coverup
Here we go:
CODE
# chkconfig --list | grep :on
acpi            0:off   1:off   2:on    3:on    4:on    5:on    6:off
acpid           0:off   1:off   2:off   3:on    4:on    5:on    6:off
alsa            0:off   1:off   2:on    3:on    4:on    5:on    6:off
apmd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
atd             0:off   1:off   2:off   3:on    4:on    5:on    6:off
avahi-daemon    0:off   1:off   2:off   3:on    4:off   5:on    6:off
consolekit      0:off   1:off   2:on    3:on    4:on    5:on    6:off
cpufreq         0:off   1:off   2:on    3:on    4:on    5:on    6:off
crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
cups            0:off   1:off   2:on    3:on    4:on    5:on    6:off
dkms            0:off   1:off   2:off   3:on    4:on    5:on    6:off
dm              0:off   1:off   2:off   3:off   4:off   5:on    6:off
haldaemon       0:off   1:off   2:off   3:on    4:on    5:on    6:off
harddrake       0:off   1:off   2:off   3:on    4:on    5:on    6:off
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off
jexec           0:on    1:on    2:on    3:on    4:on    5:on    6:on
keytable        0:off   1:off   2:on    3:on    4:on    5:on    6:off
kheader         0:off   1:off   2:on    3:on    4:off   5:on    6:off
laptop-mode     0:off   1:off   2:on    3:on    4:on    5:on    6:off
mandi           0:off   1:off   2:on    3:on    4:on    5:on    6:off
messagebus      0:off   1:off   2:on    3:on    4:on    5:on    6:off
netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
network-up      0:off   1:off   2:on    3:on    4:on    5:on    6:off
nscd            0:off   1:off   2:off   3:on    4:on    5:on    6:off
partmon         0:off   1:off   2:off   3:on    4:on    5:on    6:off
shorewall       0:off   1:off   2:on    3:on    4:on    5:on    6:off
sound           0:off   1:off   2:on    3:on    4:on    5:on    6:off
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
syslog          0:off   1:off   2:on    3:on    4:on    5:on    6:off

I am booting into X (initlevel 5).

I was thinking of stoppng avahi-daemon, but then I looked at the output of route -n:
CODE
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     35     0        0 wlan0
169.254.0.0     0.0.0.0         255.255.0.0     U     35     0        0 wlan0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.0.1     0.0.0.0         UG    35     0        0 wlan0

Note that wlan0 is given the route to the subnet 169.254.0.0. I guess this subnet is used as a fallback when the primary interface eth0 is up. Is it what avahi for (sorry for the lame question)?
ianw1974
Something I found on zeroconf:

http://zeroconf.sourceforge.net/

could explain the IP thing. I've never found a use for this, so always turned it off. But it could explain giving that 169 range like Windows does if DHCP doesn't get an IP. Previous versions, the service was called mDNSResponder.

You can also disable

iptables
mandi
shorewall

if you're not using the firewall stuff - since if you're behind a firewall/router you wouldn't need these in theory.

netfs

you won't need unless you're using NFS. Since you don't have portmap installed which is also required for NFS, then you can disable this service safely. You can also disable nscd if you wish, as tyme mentioned the caching might or might not benefit - and if you're router/gateway/firewall is your DNS server in your IP configuration, this will most likely already be caching stuff anyway as it'll be proxying all DNS requests to the internet.
coverup
Thanks, Ian.

I have stopped avahi, netfs and ncsd too. Will see what the result will be. Thanks everybody.
ianw1974
The only other thing that could be causing it is the cpufreq service, if for some bizarre reason it's got some weird frequency scaling config that's a little too sensitive.
iphitus
Does mandriva use laptop_mode or any form of hdd power management/sleep?

This exact thing happens to me when I set my drive to spin down after X minutes of inactivity. I've got pretty aggressive power saving settings as my battery is old and I get a pause when the hdd spins up again. Whatever program was trying to read from it is effectively put on hold while the drive spins up.
ianw1974
Yep, there is a laptop-mode service listed above, so it could also be this too.
coverup
QUOTE (ianw1974 @ Feb 1 2008, 12:48 PM) *
The only other thing that could be causing it is the cpufreq service, if for some bizarre reason it's got some weird frequency scaling config that's a little too sensitive.

I suspect frequcny scaling too. Here is the content of /etc/sysconfig/cpufreq
CODE
more /etc/sysconfig/cpufreq
#uncomment to set cpufreq governor after module load
#possible choices are ondemand powersave userspace performance
#GOVERNOR=ondemand
#minimum frequency
#MIN_FREQ=
#maximum frequency
#MAX_FREQ=
#Uncomment to use acpi-cpufreq as fallback
#USE_ACPI_CPUFREQ=yes

As you can see everything is commented out. Yet the frequency does jump from 800 Mhz to 1200Mhz and even higher. Apparently, Mandriva now relies on kpowersave to do speedstepping and spindown. I tried to disable it and enable klaptop to no avail; see this post http://mandrivausers.org/index.php?showtopic=48124 . So how I can take control of frequency scaling and where do I adjust spindown policy? I suspect that the the problem occurs when Emacs tries to do auto-save while the drive is already "put to sleep". Emacs is not a KDE application, and I can only suspect that the communication is broken between kpowersave and non KDE applications. That is, this is the situation descried by iphitus.
iphitus
Got nothing to do with cpufreq. The mandriva default laptop_mode configuration must set the drive spindown time. Poke around at the .conf's in /etc/laptop-mode (assuming mandriva puts it in the same place as arch).

Also, check if kpowersave controls hdd spindown time.

James
coverup
I am affraid, it's above my head. Could you please advise what I should change in those files?

Many thanks

/usr/share/config/kpowersaverc
CODE
[General]
lockOnSuspend=true
lockOnLidClose=true
ActionOnLidClose=
ActionOnLidCloseValue=
ActionOnPowerButton=SHUTDOWN
ActionOnPowerButtonValue=
ActionOnSleepButton=SUSPEND2RAM
ActionOnS2DiskButton=SUSPEND2DISK
buttonsAllowedActions=SHUTDOWN,LOGOUT_DIALOG,SUSPEND2DISK,SUSPEND2RAM
Autostart=true
AutostartNeverAsk=false
unmountExternalOnSuspend=true
lockMethod=automatic
timeToFakeKeyAfterLock=5000
forceDpmsOffOnLidClose=true
psMsgAsPassivePopup=false
autoInactiveBlacklist=mplayer,gmplayer,kaffeine,xine,mencoder,cdrecord,cdrecord-dvd,cdrdao,growisofs,kdetv,xawtv,realplay.bin
schemes=Performance,Powersave,Presentation,Acoustic
ac_scheme=Performance
battery_scheme=Powersave
batteryWarning=12
batteryWarningAction=
batteryWarningActionValue=
batteryLow=7
batteryLowAction=BRIGHTNESS
batteryLowActionValue=1
batteryCritical=2
batteryCriticalAction=SHUTDOWN
batteryCriticalActionValue=
batteryAllowedActions=SHUTDOWN,SUSPEND2DISK,SUSPEND2RAM,CPUFREQ_POWERSAVE,CPUFRE
Q_PERFORMANCE,CPUFREQ_DYNAMIC,BRIGHTNESS

[default-scheme]
specSsSettings=false
disableSs=false
blankSs=false
specPMSettings=false
standbyAfter=5
suspendAfter=10
powerOffAfter=15
disableDPMS=false
autoSuspend=false
autoInactiveAction=_NONE_
autoInactiveActionAfter=0
autoInactiveSchemeBlacklistEnabled=false
autoInactiveSchemeBlacklist=
enableBrightness=true
brightnessPercent=100
cpuFreqPolicy=DYNAMIC
cpuFreqPolicyPerformance=51

[Performance]
specSsSettings=false
specPMSettings=true
standbyAfter=10
suspendAfter=20
powerOffAfter=30
disableDPMS=false
autoSuspend=false
autoInactiveAction=_NONE_
autoInactiveActionAfter=0
autoInactiveSchemeBlacklistEnabled=false
autoInactiveSchemeBlacklist=
enableBrightness=true
brightnessPercent=100
cpuFreqPolicy=DYNAMIC
cpuFreqDynamicPerformance=75

[Powersave]
specSsSettings=true
disableSs=false
blankSs=true
specPMSettings=true
standbyAfter=2
suspendAfter=3
powerOffAfter=5
disableDPMS=false
autoSuspend=false
autoInactiveAction=_NONE_
autoInactiveActionAfter=0
autoInactiveSchemeBlacklistEnabled=false
autoInactiveSchemeBlacklist=
enableBrightness=true
brightnessPercent=50
cpuFreqPolicy=DYNAMIC
cpuFreqDynamicPerformance=25

[Presentation]
specSsSettings=true
disableSs=true
specPMSettings=true
standbyAfter=10
suspendAfter=20
powerOffAfter=30
disableDPMS=true
autoSuspend=false
autoInactiveAction=_NONE_
autoInactiveActionAfter=0
autoInactiveSchemeBlacklistEnabled=false
autoInactiveSchemeBlacklist=
enableBrightness=true
brightnessPercent=100
cpuFreqPolicy=DYNAMIC
cpuFreqDynamicPerformance=60

[Acoustic]
specSsSettings=true
disableSs=false
specPMSettings=true
standbyAfter=5
suspendAfter=7
powerOffAfter=10
disableDPMS=false
autoSuspend=false
autoInactiveAction=_NONE_
autoInactiveActionAfter=0
autoInactiveSchemeBlacklistEnabled=false
autoInactiveSchemeBlacklist=
enableBrightness=true
brightnessPercent=100
cpuFreqPolicy=DYNAMIC
cpuFreqDynamicPerformance=50



/etc/laptop-mode/laptop-mode.conf
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=0



###############################################################################
# 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 /dev/mapper/*"


# If this is enabled, laptop mode tools will assume that SCSI drives are really
# SATA drives that only _look_ like SCSI drives, and will use hdparm to control
# them. Set this to 0 if you have /dev/sd devices and you want laptop mode
# tools to use the "sdparm" command to control them.
ASSUME_SCSI_IS_SATA=1


###############################################################################
# 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 20 seconds
# for battery and for AC with laptop mode on.
LM_AC_HD_IDLE_TIMEOUT_SECONDS=20
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=20
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=1
BATT_TERMINAL_POWERDOWN_MINUTES=2
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
coverup
It looks like the problem is irreparable. This is what the laptop-mode FAQ says:
QUOTE
I experience system freezes every once in a while, is this normal?

This is a bug in hardware or the Linux kernel, triggered by something laptop mode tools does. Try setting CONTROL_HD_POWERMGMT=0. This fixes the freezes for some people. The default for CONTROL_HD_POWERMGMT was changed to 0 in version 1.11 for exactly this reason. Otherwise, for now, downgrade to a kernel 2.6.10 or earlier.

I already have CONTROL_HD_POWERMGMT = 0, hence I must downgrade?!
giggamosis
Did the downgrade work coverup?
coverup
I figured out that instead of downgrading to an outdated kernel, I'd be better off putting a next version of Ubuntu or Mandriva 2008.1.
Still have not gotten around doing this....
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.