Package: laptop-mode-tools
Version: 1.33-1
Severity: normal

When CONTROL_CPU_FREQUENCY=1, /usr/sbin/laptop_mode unconditionally
tries to modprobe the relevant governor functions.  This fails for
kernels in which the governors are compiled in statically -- the
laptop_mode script crashes, and CONTROL_CPU_FREQUENCY cannot be used.

However, there is an easy fix -- only try to modprobe the governor
module if the governor we want is not already available.  Patch:

diff -urNE --exclude '*~' laptop-mode-tools-1.33/usr/sbin/laptop_mode 
laptop-mode-tools-1.33-hacked/usr/sbin/laptop_mode
--- laptop-mode-tools-1.33/usr/sbin/laptop_mode 2007-05-13 13:48:08.000000000 
-0700
+++ laptop-mode-tools-1.33-hacked/usr/sbin/laptop_mode  2007-05-24 
23:44:47.000000000 -0700
@@ -874,7 +874,9 @@
                        echo "Setting CPU minimum frequency for cpu $THISCPU to 
$THIS_CPU_MINFREQ." >> $OUTPUT
                        set_sysctl $THISCPU/cpufreq/scaling_min_freq 
$THIS_CPU_MINFREQ
                        echo "Setting CPU frequency governor for cpu $THISCPU 
to $THIS_CPU_GOVERNOR." >> $OUTPUT
-                       /sbin/modprobe cpufreq_$THIS_CPU_GOVERNOR >> $OUTPUT
+                       if ! grep -q $THIS_CPU_GOVERNOR 
$THISCPU/cpufreq/scaling_available_governors; then
+                               /sbin/modprobe cpufreq_$THIS_CPU_GOVERNOR >> 
$OUTPUT
+                       fi
                        set_sysctl $THISCPU/cpufreq/scaling_governor 
$THIS_CPU_GOVERNOR
                        if [ -f 
"$THISCPU/cpufreq/$THIS_CPU_GOVERNOR/ignore_nice_load" ] ; then
                                echo "Setting CPU ignore_nice_load for cpu 
$THISCPU to $THIS_CPU_IGNORE_NICE_LOAD." >> $OUTPUT

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-3-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to