Package: cpufreqd
Version: 2.4.2-2
Severity: normal
Tags: patch

System gets log flooded with these messages:
Apr 30 12:36:41 luminol cpufreqd: get_class_device_attribute: couldn't open 
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0/power_now (No 
such file or directory)

System runs under an Atom CPU, it's normal for this file not to exist.
Daemon can be told to run in verbossity level 2 via the -V switch, but no such 
option can be set in the /etc/default/cpufreqd file.

I propose to include this setting in the /etc/default/cpufreqd file:

DAEMONARGS=""

that I set on my system to:

DAEMONARGS="-V 2"

and to apply this patch to the /etc/init.d/cpufreqd init script:

--- /etc/init.d/cpufreqd        2015-04-20 09:07:53.269779607 +0200
+++ /etc/init.d/cpufreqd.orig   2015-04-30 12:50:49.044825419 +0200
@@ -27,7 +27,6 @@
 DAEMON=/usr/sbin/cpufreqd
 CPUFREQD_CONFFILE=/etc/cpufreqd.conf
 NAME=cpufreqd
-DAEMONARGS=
 DESC="CPU Frequency daemon"
 
 # use lsb-base
@@ -81,7 +80,7 @@
                load_cpu_module
                load_governor_modules
                if check_for_cpufreq_support ; then
-                       start_daemon $DAEMON -f $CPUFREQD_CONFFILE $DAEMONARGS
+                       start_daemon $DAEMON -f $CPUFREQD_CONFFILE
                else
 #                      log_failure_msg " Errors occurred starting cpufreqd"
                        retval=1



-- System Information:
Debian Release: 8.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.0.0.luminol0 (SMP w/2 CPU cores)
Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages cpufreqd depends on:
ii  libc6        2.19-18
ii  libcpufreq0  008-1
ii  libsensors4  1:3.3.5-2
ii  libsysfs2    2.1.0+repack-4
ii  lsb-base     4.1+Debian13+nmu1

Versions of packages cpufreqd recommends:
ii  acpid  1:2.0.23-2

Versions of packages cpufreqd suggests:
ii  cpufrequtils  008-1

-- Configuration Files:
/etc/cpufreqd.conf changed:
[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=1
verbosity=4
enable_remote=1
remote_group=adm
double_check
[/General]
[acpi]
acpid_socket=/var/run/acpid.socket
[/acpi]
[sensors_plugin]
sensors_conf=/etc/sensors3.conf
[/sensors_plugin]
[Profile]
name=On Demand High
minfreq=20%
maxfreq=100%
policy=ondemand
[/Profile]
[Profile]
name=On Demand Low
minfreq=20%
maxfreq=80%
policy=ondemand
[/Profile]
[Profile]
name=Performance High
minfreq=100%
maxfreq=100%
policy=performance
[/Profile]
[Profile]
name=Performance Low
minfreq=80%
maxfreq=80%
policy=performance
[/Profile]
[Profile]
name=Powersave High
minfreq=60%
maxfreq=60%
policy=powersave
[/Profile]
[Profile]
name=Powersave Low
minfreq=20%
maxfreq=40%
policy=powersave
[/Profile]
[Profile]
name=Conservative High
minfreq=20%
maxfreq=100%
policy=conservative
[/Profile]
[Profile]
name=Conservative Low
minfreq=0%
maxfreq=66%
policy=conservative
[/Profile]
[Rule]
name=AC Rule
ac=on                    # (on/off)
profile=On Demand High
[/Rule]
 
[Rule]
name=AC Off - High Power
ac=off                   # (on/off)
battery_interval=70-100
profile=On Demand High
[/Rule]
[Rule]
name=AC Off - Medium Battery
ac=off                   # (on/off)
battery_interval=30-70
profile=On Demand Low
[/Rule]
[Rule]
name=AC Off - Low Battery
ac=off                   # (on/off)
battery_interval=0-30
profile=Powersave Low
[/Rule]
[Rule]
name=CPU Too Hot
acpi_temperature=55-100
cpu_interval=50-100
profile=Performance Low
[/Rule]
[Rule]
name=Movie Watcher
programs=xine,mplayer,gmplayer
battery_interval=40-100
acpi_temperature=0-60
cpu_interval=0-100
profile=On Demand High
[/Rule]

/etc/default/cpufreqd changed:
CPUFREQ_CPU_MODULE=""
CPUFREQ_GOV_MODULES="auto"
DAEMONARGS="-V 2"

/etc/init.d/cpufreqd changed:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/cpufreqd
CPUFREQD_CONFFILE=/etc/cpufreqd.conf
NAME=cpufreqd
DAEMONARGS=
DESC="CPU Frequency daemon"
.. /lib/lsb/init-functions
test -r /etc/default/cpufreqd && . /etc/default/cpufreqd
test -x $DAEMON || exit 0
test -r $CPUFREQD_CONFFILE || exit 0
load_governor_modules() {
        case "$CPUFREQ_GOV_MODULES" in
                "") 
                        return
                ;;
                "auto")
                        CPUFREQ_GOV_MODULES=$(sed -ne 
's/^policy=\([[:alpha:]]*\)/cpufreq_\1/p' /etc/cpufreqd.conf | \
                                                uniq | xargs)
                ;;
                *)
                ;;
        esac
        modprobe -qa $CPUFREQ_GOV_MODULES || /bin/true
}
load_cpu_module() {
        if [ -n "$CPUFREQ_CPU_MODULE" ] ; then
                modprobe -q $CPUFREQ_CPU_MODULE || :
        fi
}
check_for_cpufreq_support() {
        # forget it if we're trying to start and no cpufreq found in kernel
        if !([ -d /sys/devices/system/cpu/cpu0/cpufreq ] || [ -f /proc/cpufreq 
]) ; then
                return 1
        fi
        return 0
}
set -e
retval=0
case "$1" in
        start)
                log_daemon_msg "Starting $DESC" "$NAME"
                load_cpu_module
                load_governor_modules
                if check_for_cpufreq_support ; then
                        start_daemon $DAEMON -f $CPUFREQD_CONFFILE $DAEMONARGS
                else
                        retval=1
                fi
                log_end_msg $retval;
        ;;
        stop)
                log_daemon_msg "Stopping $DESC" "$NAME"
                if ( pidofproc $DAEMON 2>&1 > /dev/null ) ; then
                        killproc $DAEMON 15
                fi
                log_end_msg $retval
        ;;
        reload|force-reload|restart)
                log_daemon_msg "Restarting $DESC" "$NAME"
                killproc $DAEMON
                sleep 1
                if check_for_cpufreq_support ; then
                        start_daemon $DAEMON -f $CPUFREQD_CONFFILE
                else
                        retval=1
                fi
                log_end_msg $retval;
        ;;
        *)
                N=/etc/init.d/$NAME
                echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
                retval=2
        ;;
esac
exit $retval


-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to