You are not logged in.

#1 2010-08-26 21:51:35

briff
Member
From: Chicago
Registered: 2010-08-26
Posts: 18

Laptop mode doesn't adjust when switching between battery and AC

This is my first installation of arch (I've been using ubuntu for 2 years.) I'm running it on a System76 Pangolin Performance (panp7.) I'm trying to use the laptop mode program to automatically throttle my cpu depending on if it's running off battery power or not. I have "laptop-mode" in the list of Daemons and  acpi-cpufreq in MODULES in rc.conf. I set (I think) the cpu to be run by the conservative governor when plugged in and the powersave governor when running on battery. When I boot the computer it starts in the right mode (powersave on batt or conservative on AC) but it does not switch when I unplug or plug it in (I check the setting using the "cpufreq-info" command. I also noticed that my fans are running much louder in arch than they do in Ubuntu. Here is my /etc/laptop-mode/conf.d/cpufreq.conf. Any ideas? thanks in advance for the help.

#
# Configuration file for Laptop Mode Tools module cpufreq.
#
# For more information, consult the laptop-mode.conf(8) manual page.
#

###############################################################################
# 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.
#
#
# IMPORTANT: In versions 1.36 and earlier, these settings were included in the
# main laptop-mode.conf configuration file. If they are still present, they
# overrule the settings in this file. To fix this, simply delete the settings
# from the main config file.
#
###############################################################################

# Enable debug mode for this module
# Set to 1 if you want to debug this module
DEBUG=0

#
# Should laptop mode tools control the CPU frequency settings?
#
# Set to 0 to disable
CONTROL_CPU_FREQUENCY="auto"



#
# 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.
# The "governor" can be any governor installed on your system, this usually
# includes "ondemand", "conservative", and "performance". The
# "IGNORE_NICE_LOAD" setting specifies that background programs that have
# a low priority ("nice level") should not cause the CPU frequency to
# be increased. (You generally want this to be enabled in battery mode.)
#
BATT_CPU_MAXFREQ=fastest
BATT_CPU_MINFREQ=slowest
BATT_CPU_GOVERNOR=powersave
BATT_CPU_IGNORE_NICE_LOAD=1
LM_AC_CPU_MAXFREQ=fastest
LM_AC_CPU_MINFREQ=slowest
LM_AC_CPU_GOVERNOR=ondemand
LM_AC_CPU_IGNORE_NICE_LOAD=1
NOLM_AC_CPU_MAXFREQ=fastest
NOLM_AC_CPU_MINFREQ=slowest
NOLM_AC_CPU_GOVERNOR=ondemand
NOLM_AC_CPU_IGNORE_NICE_LOAD=0


#
# 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.)
# 
# This is only useful on older P4 processors that do not support frequency
# scaling. On such processors, this is the only way to reduce power consumption
# but at the cost of higher performance penalty.
#
# Enable this only if you have a processor that does not support frequency scaling
# On most new processors, you might want to disable it.
#
# Set to 0 to disable.
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

Last edited by briff (2010-08-26 22:06:08)

Offline

#2 2010-08-27 00:26:31

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: Laptop mode doesn't adjust when switching between battery and AC

Can you check to make certain the actual settings are used if you force laptop_mode to re-check the power status?

sudo laptop_mode force

I had the same issue, and never solved it.  I eventually switched over to a mixture of acpi, acpi-support, and pm-powersave scripts, which work better than laptop-mode-tools ever did for me.  If you don't feel extremely attached to laptop-mode, maybe have a look in that direction?  It requires writing just a few bash scripts that apply power savings options (often utilizing files in /proc).  The Wiki page and the program itself should help.

If you need help with laptop-mode and are unwilling to switch, diagnosing where exactly the program fails (i.e. is the cpu setting really the only one that doesn't change?) is important, and making sure you have all programs installed that laptop-mode requires to check the state.  If I recall correctly my issue was with a conflict between HAL and laptop_mode, and it began working if I restarted laptop_mode after logging in.  Not the best solution.  I contacted the developer, but we couldn't come up with a better solution for it, and it seems to be specific to Arch (worked fine in Ubuntu).

Hope that helps a bit,
Lswest

Last edited by lswest (2010-08-27 00:27:58)


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

Board footer

Powered by FluxBB