debian/0000775000000000000000000000000012261763725007203 5ustar debian/cpufreqd.init0000664000000000000000000000563212123322520011664 0ustar #! /bin/sh ### BEGIN INIT INFO # Provides: cpufreqd # Required-Start: $local_fs $syslog $remote_fs # Required-Stop: $local_fs $syslog $remote_fs # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start and stop cpufreqd # Description: fully configurable daemon for dynamic frequency # and voltage scaling ### END INIT INFO # # Startup script for the cpufreqd daemon. It's been made using the # skeleton example file to build /etc/init.d/ scripts. # This file should be used to construct scripts for /etc/init.d. # # Written by Miquel van Smoorenburg . # Modified for Debian GNU/Linux # by Ian Murdock . # # Version: @(#)skeleton 1.9.1 08-Apr-2002 miquels@cistron.nl # PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/cpufreqd CPUFREQD_CONFFILE=/etc/cpufreqd.conf NAME=cpufreqd DESC="CPU Frequency daemon" # use lsb-base . /lib/lsb/init-functions # load defaults file test -r /etc/default/cpufreqd && . /etc/default/cpufreqd # abort if no executable exists test -x $DAEMON || exit 0 #abort if no conffile exists test -r $CPUFREQD_CONFFILE || exit 0 load_governor_modules() { case "$CPUFREQ_GOV_MODULES" in "") return ;; "auto") CPUFREQ_GOV_MODULES=$(cat /etc/cpufreqd.conf | \ sed -ne 's/^policy=\([[:alpha:]]*\)/cpufreq_\1/p' | \ uniq | xargs) ;; *) ;; esac modprobe -qa $CPUFREQ_GOV_MODULES || /bin/true } load_cpu_module() { if [ -n "$CPUFREQ_CPU_MODULE" ] ; then modprobe -q $CPUFREQ_CPU_MODULE || /bin/true 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 # log_failure_msg "no cpufreq interface found. " 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 else # log_failure_msg " Errors occurred starting cpufreqd" 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) # check_for_cpufreq_support # echo -n "Reloading $DESC configuration..." # start-stop-daemon --stop --oknodo --signal 1 --exec $DAEMON -- -f $CPUFREQD_CONFFILE # echo "done." # ;; 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 # log_failure_msg " Errors occurred starting cpufreqd" 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 debian/cpufreqd.default0000664000000000000000000000072712123322520012345 0ustar # Cpufreqd startup configuration # CPU kernel module. # Leave empty if you wish to load the modules another way, # or if CPUFreq support for your cpu is built in. CPUFREQ_CPU_MODULE="" # Governor modules. # A list separated by spaces. They are needed by cpufreqd # to load your policies. The init script can automatically # try to load them. Leave empty to disable loading governor # modules at all, use "auto" to let the script do the job. CPUFREQ_GOV_MODULES="auto" debian/copyright0000664000000000000000000000242112123322520011112 0ustar This package was debianized by Mattia Dongili on Tue, 24 Jun 2003 17:05:25 +0200. It was downloaded from http://sourceforge.net/projects/cpufreqd Upstream Authors: Mattia Dongili George Staikos Copyright: 2002-2008 Mattia Dongili 2002-2008 George Staikos This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is (C) 2003-2008, Mattia Dongili and is licensed under the GPL, see above. debian/source/0000775000000000000000000000000012123322520010460 5ustar debian/source/format0000664000000000000000000000001412123322520011666 0ustar 3.0 (quilt) debian/changelog0000664000000000000000000002731112261763724011060 0ustar cpufreqd (2.4.2-2ubuntu1) trusty; urgency=medium * path_max.patch: Pull upstream patch to fix MAX_PATH_LEN (LP: #1162160) -- Adam Conrad Sat, 04 Jan 2014 03:51:23 -0700 cpufreqd (2.4.2-2) unstable; urgency=low * Fix reading the correct battery attribute (Closes: #619913 and Closes: #644567). -- Mattia Dongili Sat, 23 Mar 2013 21:42:31 +0900 cpufreqd (2.4.2-1) unstable; urgency=low * New upstream release: fixes configuration with libsensors4 (Closes: #577822). -- Mattia Dongili Sun, 18 Apr 2010 23:08:30 +0900 cpufreqd (2.4.1-1) unstable; urgency=low * New upstream release (Closes: #547483), now supports libsensors4 (Closes: #454617) and ignores ignored features (Closes: #538950). * Switch to dpkg-source 3.0 (quilt) format (Closes: #538546). * Remove patch merged upstream -- Mattia Dongili Sun, 28 Mar 2010 20:29:31 +0900 cpufreqd (2.3.3-4) unstable; urgency=low * Fix segfaulting on laptops with more than one battery, patch from Stefan Bühler (Closes: #509355). -- Mattia Dongili Wed, 24 Dec 2008 22:01:17 +0900 cpufreqd (2.3.3-3) unstable; urgency=low * backport a patch from upstream repository fixing a segfault when reading a /sys device class with no attributes (Closes: #496288). -- Mattia Dongili Sun, 05 Oct 2008 11:23:07 +0900 cpufreqd (2.3.3-2) unstable; urgency=low * backport a patch from upstream repository to support the ACPI thermal zone reported as "acpitz" in /sys (Closes: #497083). -- Mattia Dongili Mon, 08 Sep 2008 22:57:22 +0900 cpufreqd (2.3.3-1) unstable; urgency=low * New upstream version * fallback to reading change_* battery attributes if energy_* is not found (Closes: #495655). Patch from Goedson Teixeira Paixao . -- Mattia Dongili Sat, 23 Aug 2008 13:29:47 +0900 cpufreqd (2.3.2-1) unstable; urgency=low * New upstream version (skipping 2.3.0 and 2.3.1) * now reads acpi data from sysfs rather than /proc (Closes: #484467) * plugin initialization is quieter (Closes: #400165) -- Mattia Dongili Sat, 09 Aug 2008 16:08:22 +0900 cpufreqd (2.2.1-2.1) unstable; urgency=low * Non-maintainer upload. * Change the recommends into a Recommends: acpid [amd64 i386 ia64] (Closes: #436647). -- Amaya Rodrigo Sastre Sun, 30 Mar 2008 23:37:32 +0200 cpufreqd (2.2.1-2) unstable; urgency=low * Provide a more conservative config files, users owning non ondemand capable CPU have complained. (Closes: #400580) -- Mattia Dongili Sun, 17 Dec 2006 17:13:57 +0100 cpufreqd (2.2.1-1) unstable; urgency=low * New upstream release. * Fix wording in README.Debian and /etc/default/cpufreq as suggested by Reuben Thomas. (Closes: #399105 and Closes: #399106) -- Mattia Dongili Mon, 20 Nov 2006 22:02:13 +0100 cpufreqd (2.2.0-2) unstable; urgency=low * Remove all debconf stuff. * use Sarge's compliant character classes in sed. -- Mattia Dongili Sun, 24 Sep 2006 11:13:47 +0200 cpufreqd (2.2.0-1) unstable; urgency=low * Updated debconf messages: - German, thanks to Erik Schanze - Vietnamese, thanks to Clytie Siddall - Japanese, thanks to Hideki Yamane * set debconf priority to "error" as we're only displaying errors. (Closes: #388879) -- Mattia Dongili Sat, 23 Sep 2006 18:18:33 +0200 cpufreqd (2.1.1-1) unstable; urgency=low * New upstream release: - fix incorrect use of stdargs, thanks to Aurelien Jarno (Closes: #374579) * Added debconf message: - Korean, thanks to Sunjae Park (Closes: #374376) - Hebrew, thanks to Lior Kaplan * Updated debconf messages: - Japanese, thanks to Osamu Aoki - French, thanks to Florentin Duneau (Closes: #374563) - Lithuanian, thanks to Gintautas Miliauskas (Closes: #374970) -- Mattia Dongili Thu, 22 Jun 2006 19:16:53 +0200 cpufreqd (2.1.0-1) unstable; urgency=low * New upstream release: - fixes race in SIGLARM handling that prevented functioning after suspend (Closes: #350736). * Added debconf message: - Portuguese, thanks to André Costa (Closes: #362986) - Hungarian, thanks to SZERVÑC Attila (Closes: #374179) - Basque, thanks to Piarres Beobide - Romanian, thanks to Eddy Petrisor (Closes: #374333) - Lithuanian, thanks to Gintautas Miliauskas (Closes: #374291) * Updated debconf messages: - Czech, thanks to Miroslav Kure - Danish, thanks to Claus Hindsgaul - Swedish, thanks to Daniel Nylander (Closes: #374179) - German, thanks to Helge Kreutzmann - Japanese, thanks to Osamu Aoki - Italian, thanks to myself!! * provide support for loading CPUFreq cpu and governor modules through an /etc/default file (Closes: #342013) (Closes: #342014). -- Mattia Dongili Sun, 18 Jun 2006 16:19:24 +0200 cpufreqd (2.0.0-1) unstable; urgency=low * New upstream release. * cpufreqd.init: exit succesfully in case a stop is issued and cpufreqd is found running as requested by LSB thus making it possible to remove cpufreqd when cpufreqd itsef is stopped (closes: #340133) -- Mattia Dongili Sun, 27 Nov 2005 18:47:42 +0100 cpufreqd (1.999+2.0pre2-1) unstable; urgency=low * New upstream release. * Now suggest cpufrequtils (closes: #333617) * The new plugin architecture allows: - for easy selection of resources to poll (closes: #239946) - polling of ACPI thermal zones (closes: #298645) * Added Spanish translation (closes: #334559) * Added Swedish translation (closes: #330409) -- Mattia Dongili Tue, 01 Nov 2005 16:08:38 +0100 cpufreqd (1.999+2.0pre1-1) unstable; urgency=low * New upstream release. -- Mattia Dongili Sun, 25 Sep 2005 22:35:12 +0200 cpufreqd (1.999+2.0beta4-1) unstable; urgency=medium * Beta test, will never upload. * Completed plugin interface, now a plugin can hook almost everywhere into cpufreqd. A sample plugin for nforce2 is available -- Mattia Dongili Mon, 15 Aug 2005 23:03:14 +0200 cpufreqd (1.999+2.0beta3-1) unstable; urgency=medium * Beta test, will never upload. * Many improvements. -- Mattia Dongili Sat, 13 Aug 2005 00:13:10 +0200 cpufreqd (1.999+2.0beta2-1) unstable; urgency=medium * Beta test, will never upload. * Fixed floating point exeption with empty rules. -- Mattia Dongili Wed, 03 Aug 2005 12:38:13 +0200 cpufreqd (1.999+2.0beta1-1) unstable; urgency=medium * Beta test, will never upload. -- Mattia Dongili Sat, 30 Jul 2005 20:08:59 +0200 cpufreqd (1.2.3-2) unstable; urgency=medium * Added Vietnamese debconf translation (closes: #310147) * Corrected a typo in debconf templates (also cleared in translations) (closes: #310149) * Urgency set to medium to let the package into sarge as soon as possible. -- Mattia Dongili Sun, 22 May 2005 14:47:18 +0200 cpufreqd (1.2.3-1) unstable; urgency=low * New upstrem release * Ship cpufreq.conf with no unimplemented options (closes: #307650) -- Mattia Dongili Sat, 14 May 2005 21:04:10 +0200 cpufreqd (1.2.2-3) unstable; urgency=low * Changed Maintainer address to the new shining @d.o * Creates startup links even if it cannot start and give better error messages in that case during startup. (closes: #295834) -- Mattia Dongili Wed, 09 Mar 2005 22:15:24 +0100 cpufreqd (1.2.2-2) unstable; urgency=low * Renamed debian/po/cz.po into debian/po/cs.po (closes: #285570) * Now conflicts with cpudyn and powernowd (closes: #281065) -- Mattia Dongili (ma.d.) Sat, 18 Dec 2004 19:17:37 +0100 cpufreqd (1.2.2-1) unstable; urgency=low * New upstream * Added Czech debconf translation (closes: #275504) * Added Italian debconf translation (finally...) -- Mattia Dongili (ma.d.) Sun, 24 Oct 2004 12:29:47 +0200 cpufreqd (1.2.0-1) unstable; urgency=low * New Upstream (closes: #268020) * Added support for extended /proc/stat in 2.6 kernels (closes: #264126) * Added translation from percentage to absolute values for 2.6 kernels (closes: #254418) * Implemented checks for empty configurations and supplied defaults values for the general section (closes: #243649) * Removed frequencies translation in postinst as now percentages are supported for both 2.4 and 2.6 kernels. -- Mattia Dongili (ma.d.) Mon, 23 Aug 2004 15:42:11 +0200 cpufreqd (1.1.2-3) unstable; urgency=low * Added Japanese debconf translation (closes: #258767) * Fixed a race condition due to unwise sed usage (closes: #255855) -- Mattia Dongili (ma.d.) Mon, 26 Jul 2004 21:08:37 +0200 cpufreqd (1.1.2-2) unstable; urgency=low * Added German debconf templates translation (closes: #251632) * Fixed check for /proc/pmu check in scripts (closes: #250892) * Added missing --oknodo for cpufreqd restart in init script (closes: #245937) * Fixed bug in autoconfiguration where the script sets values of "maxfreq" that are lesser then "minfreq" (closes: #246867) -- Mattia Dongili (ma.d.) Mon, 31 May 2004 18:55:07 +0200 cpufreqd (1.1.2-1) unstable; urgency=low * New Upstream * Fixed spelling mistakes in debconf english template (closes: #240783) * Added Dutch debconf templates translation (closes: #241433) * Added French debconf templates translation (closes: #234956) * Added Danish debconf templates translation (closes: #234956) * Added missing fclose in libsys_pmu (closes: #236474) * added check for conffile existence and readability and used as argument for start-stop-daemon (closes: #235833) -- Mattia Dongili (ma.d.) Tue, 31 Mar 2004 18:40:00 +0100 cpufreqd (1.1.1-1) unstable; urgency=low * New Upstream * Now ships with the correct configuration template (closes: #230927) * Updated to use po-debconf -- Mattia Dongili (ma.d.) Sat, 07 Feb 2004 18:58:13 +0100 cpufreqd (1.1.0-1) unstable; urgency=low * New Upstream * Fixed segfault when some options left empty (closes: #220939) * Fixed error in postinst (closes: #223395) * Added checks in init file to see if cpufreq and acpi/apm/pmu are supported * It now creates a better configuration with 4 Profiles and a bunch of Rules -- Mattia Dongili (ma.d.) Sun, 04 Jan 2004 20:52:54 +0100 cpufreqd (1.1-rc1-1) unstable; urgency=low * New Upstream * Added a simple autoconfiguration script * Added debconf dependency because of a debconf warning needed during install if cpufreqd is unable to start * Added README.Debian * Added two sample configurations (one for 2.6 kernel and one for 2.4) * Added an ACPI workaround to avoid /proc/acpi/battery/*/info reading (closes: #207150) * Abort execution when MIN and MAX frequencies are not correct wrt to the kernel version (2.4 as percentage or Hz and 2.6 Hz only) (closes: #205732) * Removed empty NEWS file (closes: #217249) -- Mattia Dongili (ma.d.) Thu, 26 Oct 2003 20:30:00 +0200 cpufreqd (1.0.1-2) unstable; urgency=low * Fixed lintian warning about missing #DEBHELPER# -- Mattia Dongili (ma.d.) Thu, 30 Jul 2003 15:30:00 +0200 cpufreqd (1.0.1-1) unstable; urgency=low * Initial Release (closes: #199404). -- Mattia Dongili (ma.d.) Thu, 24 Jul 2003 17:00:00 +0200 debian/compat0000664000000000000000000000000212123322520010356 0ustar 7 debian/rules0000775000000000000000000000365112123322520010245 0ustar #!/usr/bin/make -f # GNU copyright 2004 by Mattia Dongili. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif config-stamp: dh_testdir autoreconf -vfi # configure the package. ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc --localstatedir=/var/run --libdir=/usr/lib/cpufreqd touch config-stamp build: build-stamp build-stamp: config-stamp dh_testdir # compile the package. $(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp # clean up after the build process. [ ! -f Makefile ] || $(MAKE) distclean dh_clean # debconf-updatepo install: build dh_testdir dh_testroot dh_clean dh_installdirs # install the package into debian/cpufreqd. $(MAKE) install DESTDIR=$(CURDIR)/debian/cpufreqd install -m 0644 debian/cpufreqd.conf $(CURDIR)/debian/cpufreqd/etc/ # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_installdocs dh_installexamples # dh_installdebconf dh_installinit -n dh_installman dh_link dh_strip dh_compress dh_fixperms dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install debian/NEWS.Debian0000664000000000000000000000101712123322520011037 0ustar cpufreqd (1.999+2.0pre2-1) unstable; urgency=low This major release of cpufreqd contains many improvements, especially a much wider range of configuration options (through the use of plug-ins). All in-kernel CpuFreq governors are supported but the default configuration ships with performance and powersave only as not all processors can run all governors. So I strongly suggest to review cpufreqd configuration after installation. -- Mattia Dongili Tue, 01 Nov 2005 16:08:38 +0100 debian/dirs0000664000000000000000000000001112123322520010034 0ustar usr/sbin debian/control0000664000000000000000000000226512261763736010615 0ustar Source: cpufreqd Section: admin Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Mattia Dongili Build-Depends: debhelper (>= 7), quilt, automake, libtool, libsensors4-dev, libcpufreq-dev, libsysfs-dev (>= 2.0.0) Standards-Version: 3.8.4 Homepage: http://sourceforge.net/projects/cpufreqd Package: cpufreqd Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.0) Conflicts: cpudyn, powernowd Recommends: acpid [amd64 i386 ia64] Suggests: cpufrequtils Description: fully configurable daemon for dynamic frequency and voltage scaling cpufreqd is meant to be a replacement of the speedstep applet you can find on some other OS, it monitors the system status and selects the most appropriate CPU level. It is fully configurable and easily extensible through the many available plug-ins (more to come). Despite its name it can be used to control also the NForce2-Atxp1 voltage regulator and the core and memory clock for NVidia cards (see README.Debian). . You need a CPUFreq driver and either APM, ACPI (a recent version) or PMU enabled in your kernel in order for this daemon to work. debian/postinst0000664000000000000000000000364112123322520010772 0ustar #! /bin/sh # postinst script for cpufreqd # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package # # quoting from the policy: # Any necessary prompting should almost always be confined to the # post-installation script, and should be protected with a conditional # so that unnecessary prompting doesn't happen if a package's # installation fails and the `postinst' is called with `abort-upgrade', # `abort-remove' or `abort-deconfigure'. # Source debconf library. #. /usr/share/debconf/confmodule #db_stop 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 echo -n "No cpufreq interface found, " >&2 return 1 fi return 0 } case "$1" in configure) # setup startup links, they'll warn the user of anything not being setup properly update-rc.d cpufreqd defaults > /dev/null if check_for_cpufreq_support ; then if [ -x /usr/sbin/invoke-rc.d ] ; then invoke-rc.d cpufreqd start else /etc/init.d/cpufreqd start fi else echo "not starting cpufreqd." >&2 fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/postrm0000664000000000000000000000171512123322520010433 0ustar #! /bin/sh # postrm script for cpufreqd # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' overwrit>r> # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in purge) update-rc.d -f cpufreqd remove > /dev/null ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) # do nothing ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/cpufreqd.conf0000664000000000000000000000457012123322520011646 0ustar # this is a comment # see CPUFREQD.CONF(5) manpage for a complete reference # # Note: ondemand/conservative Profiles are disabled because # they are not available on many platforms. [General] pidfile=/var/run/cpufreqd.pid poll_interval=2 verbosity=4 #enable_remote=1 #remote_group=root [/General] #[acpi] #acpid_socket=/var/run/acpid.socket #[/acpi] #[nforce2_atxp1] #vcore_path=/some/path #vcore_default=1500 #[/nforce2_atxp1] #[sensors_plugin] #sensors_conf=/some/file #[/sensors_plugin] #[Profile] #name=On Demand High #minfreq=40% #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 #exec_post=echo 8 > /proc/acpi/sony/brightness [/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=40% maxfreq=40% policy=powersave [/Profile] #[Profile] #name=Conservative High #minfreq=33% #maxfreq=100% #policy=conservative #[/Profile] # #[Profile] #name=Conservative Low #minfreq=0% #maxfreq=66% #policy=conservative #[/Profile] ## # Basic states ## # when AC use performance mode [Rule] name=AC Rule ac=on # (on/off) profile=Performance High [/Rule] # stay in performance mode for the first minutes [Rule] name=AC Off - High Power ac=off # (on/off) battery_interval=70-100 #exec_post=echo 5 > /proc/acpi/sony/brightness profile=Performance Low [/Rule] # conservative mode when not AC [Rule] name=AC Off - Medium Battery ac=off # (on/off) battery_interval=30-70 #exec_post=echo 3 > /proc/acpi/sony/brightness profile=Powersave High [/Rule] # conservative mode when not AC [Rule] name=AC Off - Low Battery ac=off # (on/off) battery_interval=0-30 #exec_post=echo 3 > /proc/acpi/sony/brightness profile=Powersave Low [/Rule] ## # Special Rules ## # CPU Too hot! [Rule] name=CPU Too Hot acpi_temperature=55-100 cpu_interval=50-100 profile=Performance Low [/Rule] # use performance mode if I'm watching a movie # I don't care for batteries! # But don't heat too much. [Rule] name=Movie Watcher programs=xine,mplayer,gmplayer battery_interval=0-100 acpi_temperature=0-60 cpu_interval=0-100 profile=Performance High [/Rule] debian/README.Debian0000664000000000000000000000372712123322520011232 0ustar README for Debian package of Cpufreqd ===================================== This package installs a trivial configuration file which will not suit everyone's needs. Thus it's strongly suggested to modify the configuration and restart cpufreqd after installation. Cpufreqd provides support to automatically load necessary kernel modules on startup, see /etc/default/cpufreqd comments for more. CPUFreq support --------------- To enable the CpuFreq interface, you may need to configure your kernel appropriately (normally not necessary for stock Debian kernels) and load appropriate modules. Try loading the modules under /lib/modules//kernel/arch//kernel/cpu/cpufreq/ for governors and /lib/modules//kernel/drivers/cpufreq (replace and with the values of your system) to see the right one for your cpu. ACPI, APM or PMU support ------------------------ To enable ACPI or APM, you may need to configure your kernel appropriately (not normally necessary for stock Debian kernels) and load appropriate modules. It is recommended to install the package acpid or apmd respectively, which will automatically load the required modules. ACPI is more powerful than APM, so you should generally try it first. Note for the NVclock plugin --------------------------- The binary package doesn't currently provide the nvclock plugin since an nvclock development package is not available yet. Advanced users may want try this feature as follows: - apt-get source nvclock - apt-get source cpufreqd - apply a trivial patch downloadable from http://cpufreqd.sf.net - configure nvclock with --disable-nvcontrol --disable-gtk --disable-qt and build it (simply make, no need to install it) - configure cpufreqd (you want to edit the debian/rules file) with --enable-nvclock=/dir/where/apt/unzipped/nvclock-0.8b and build cpufreqd's deb package by means of dpkg-buildpackage -rfakeroot -uc -us -b debian/docs0000664000000000000000000000001412123322520010026 0ustar README TODO debian/patches/0000775000000000000000000000000012261763645010633 5ustar debian/patches/619913.patch0000664000000000000000000000403412123322520012405 0ustar From: Roland Hieber Subject: Use power_now instead of current_now to read power from sysfs Apparently, current_now was renamed to power_now around kernel 2.6.36. The fix in this patch first tries to read from the new file name, if this does not exist, it tries the old name. Bug: 644567 Author: niko2gare Origin: http://sourceforge.net/tracker/?func=detail&aid=3172707&group_id=58904&atid=489239 Last-Update: 2012-10-12 Modification to avoid checking closed battery From: Bernd Rinn (z-bb) Origin: https://bugs.launchpad.net/ubuntu/+source/cpufreqd/+bug/733507/+attachment/3022414/+files/cpufreqd-bug%23733507.patch Index: cpufreqd/src/cpufreqd_acpi_battery.c =================================================================== --- cpufreqd.orig/src/cpufreqd_acpi_battery.c 2013-03-23 21:37:28.268379010 +0900 +++ cpufreqd/src/cpufreqd_acpi_battery.c 2013-03-23 21:38:23.392952250 +0900 @@ -36,6 +36,7 @@ #define PRESENT "present" #define STATUS "status" #define CURRENT_NOW "current_now" +#define POWER_NOW "power_now" struct battery_info { int capacity; @@ -145,9 +146,13 @@ binfo->status = get_class_device_attribute(binfo->cdev, STATUS); if (!binfo->status) return -1; - binfo->current_now = get_class_device_attribute(binfo->cdev, CURRENT_NOW); - if (!binfo->current_now) - return -1; + binfo->current_now = get_class_device_attribute(binfo->cdev, POWER_NOW); + if (!binfo->current_now) { + /* try the "current_now" name */ + binfo->current_now = get_class_device_attribute(binfo->cdev, CURRENT_NOW); + if (!binfo->current_now) + return -1; + } /* read the last full capacity, this is not going to change * very often, so no need to poke it later */ @@ -311,6 +316,10 @@ /* Read battery informations */ for (i = 0; i < bat_dir_num; i++) { + if (!info[i].open) { + clog(LOG_INFO, "Skipping %s (closed)\n", info[i].cdev->name); + continue; + } if (read_int(info[i].present, &info[i].is_present) != 0) { clog(LOG_INFO, "Skipping %s\n", info[i].cdev->name); debian/patches/path_max.patch0000664000000000000000000000163612261763565013464 0ustar From b5b23525edcc09898288360c48e92b4a6c9cb0ee Mon Sep 17 00:00:00 2001 From: Perttu Luukko Date: Sun, 13 Jun 2010 15:20:10 +0900 Subject: [PATCH] Fix cpufreqd segfault when calling realpath The size is set at cpufreqd.h to 512. man 3 realpath tells me that realpath wants a buffer of size PATH_MAX, so I modified cpufreqd.h to include limits.h if it is present and use PATH_MAX. Signed-off-by: Mattia Dongili --- src/cpufreqd.h | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/cpufreqd.h b/src/cpufreqd.h index 9733a5f..97b905a 100644 --- a/src/cpufreqd.h +++ b/src/cpufreqd.h @@ -54,6 +54,12 @@ #define DEFAULT_VERBOSITY 3 #define MAX_STRING_LEN 255 -#define MAX_PATH_LEN 512 + +#ifdef HAVE_LIMITS_H +#include +#define MAX_PATH_LEN PATH_MAX +#else +#define MAX_PATH_LEN 512 +#endif #endif /* __CPUFREQD_H__ */ -- 1.7.2.5 debian/patches/series0000664000000000000000000000003412261763645012045 0ustar 619913.patch path_max.patch debian/prerm0000664000000000000000000000202212123322520010224 0ustar #! /bin/sh # prerm script for cpufreqd # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in remove|upgrade|deconfigure) if [ -x /usr/sbin/invoke-rc.d ] ; then invoke-rc.d cpufreqd stop else /etc/init.d/cpufreqd stop fi ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0