Hello community,
here is the log from the commit of package powersave
checked in at Tue Mar 28 17:03:24 CEST 2006.
--------
--- /work/SRC/all/powersave/powersave.changes 2006-03-27 20:05:26.000000000 +0200
+++ /work/src/done/STABLE/powersave/powersave.changes 2006-03-28 16:23:39.000000000 +0200
@@ -1,0 +2,7 @@
+Tue Mar 28 16:21:45 CEST 2006 - hmacht@suse.de
+
+- reset cpufreq governor after resume (bug 161220)
+- don't try to write up_threshold when switching schemes
+- r2141
+
+-------------------------------------------------------------------
Old:
----
powersave-0.12.8.tar.bz2
New:
----
powersave-0.12.9.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ powersave.spec ++++++
--- /var/tmp/diff_new_pack.ngX4qo/_old 2006-03-28 17:02:54.000000000 +0200
+++ /var/tmp/diff_new_pack.ngX4qo/_new 2006-03-28 17:02:54.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package powersave (Version 0.12.8)
+# spec file for package powersave (Version 0.12.9)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -14,7 +14,7 @@
BuildRequires: cpufrequtils gcc-c++ hal-devel lynx
URL: http://powersave.sourceforge.net/
Summary: General Powermanagement daemon supporting APM and ACPI and CPU frequency scaling
-Version: 0.12.8
+Version: 0.12.9
Release: 1
License: GPL
Group: System/Daemons
@@ -171,6 +171,10 @@
%_libdir/lib*.so*
%changelog -n powersave
+* Tue Mar 28 2006 - hmacht@suse.de
+- reset cpufreq governor after resume (bug 161220)
+- don't try to write up_threshold when switching schemes
+- r2141
* Mon Mar 27 2006 - hmacht@suse.de
- add generic hotkey handler and remove config adjustments from
init script
++++++ powersave-0.12.8.tar.bz2 -> powersave-0.12.9.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/powersave-0.12.8/configure new/powersave-0.12.9/configure
--- old/powersave-0.12.8/configure 2006-03-27 18:40:06.000000000 +0200
+++ new/powersave-0.12.9/configure 2006-03-28 16:28:32.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for powersave 0.12.8.
+# Generated by GNU Autoconf 2.59 for powersave 0.12.9.
#
# Report bugs to .
#
@@ -423,8 +423,8 @@
# Identity of this package.
PACKAGE_NAME='powersave'
PACKAGE_TARNAME='powersave'
-PACKAGE_VERSION='0.12.8'
-PACKAGE_STRING='powersave 0.12.8'
+PACKAGE_VERSION='0.12.9'
+PACKAGE_STRING='powersave 0.12.9'
PACKAGE_BUGREPORT='hmacht@suse.de'
ac_unique_file="daemon/powersaved.cpp"
@@ -982,7 +982,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures powersave 0.12.8 to adapt to many kinds of systems.
+\`configure' configures powersave 0.12.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1048,7 +1048,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of powersave 0.12.8:";;
+ short | recursive ) echo "Configuration of powersave 0.12.9:";;
esac
cat <<\_ACEOF
@@ -1209,7 +1209,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-powersave configure 0.12.8
+powersave configure 0.12.9
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1223,7 +1223,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by powersave $as_me 0.12.8, which was
+It was created by powersave $as_me 0.12.9, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1866,7 +1866,7 @@
# Define the identity of the package.
PACKAGE='powersave'
- VERSION='0.12.8'
+ VERSION='0.12.9'
cat >>confdefs.h <<_ACEOF
@@ -24508,7 +24508,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by powersave $as_me 0.12.8, which was
+This file was extended by powersave $as_me 0.12.9, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -24571,7 +24571,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-powersave config.status 0.12.8
+powersave config.status 0.12.9
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/powersave-0.12.8/configure.ac new/powersave-0.12.9/configure.ac
--- old/powersave-0.12.8/configure.ac 2006-03-27 18:39:07.000000000 +0200
+++ new/powersave-0.12.9/configure.ac 2006-03-28 16:26:27.000000000 +0200
@@ -3,7 +3,7 @@
AC_PREREQ(2.59)
-AC_INIT(powersave, 0.12.8, hmacht@suse.de)
+AC_INIT(powersave, 0.12.9, hmacht@suse.de)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([daemon/powersaved.cpp])
AM_CONFIG_HEADER(config.h)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/powersave-0.12.8/daemon/cpufreq_interface.cpp new/powersave-0.12.9/daemon/cpufreq_interface.cpp
--- old/powersave-0.12.8/daemon/cpufreq_interface.cpp 2006-03-27 18:39:06.000000000 +0200
+++ new/powersave-0.12.9/daemon/cpufreq_interface.cpp 2006-03-28 16:21:29.000000000 +0200
@@ -2,7 +2,7 @@
* *
* Powersave Daemon *
* *
- * Copyright (C) 2004,2005 SUSE Linux Products GmbH *
+ * Copyright (C) 2004,2005,2006 SUSE Linux Products GmbH *
* *
* Author(s): Holger Macht *
* *
@@ -64,13 +64,19 @@
strstr << SYSFS_FILES << "cpu" << _cpu_base << "/cpufreq/scaling_available_frequencies";
AVAILABLE_FREQS_FILE = strstr.str();
strstr.str("");
- // supported speeds
}
CPUFreq_Interface::~CPUFreq_Interface()
{
}
+int CPUFreq_Interface::setMode(CPUFREQ_MODE mode)
+{
+ _mode = mode;
+ adjustSpeed();
+ return 0;
+}
+
void CPUFreq_Interface::setConfigs(int max, int high_cpu, int hyster, int consider)
{
if (max < _cpu_hysteresis)
@@ -133,13 +139,13 @@
{
FILE *fp = fopen(filename, "w+");
if (!fp) {
- // pDebug(DBG_ERR, "Could not open file for writing: %s; %s", filename, strerror(errno));
+ pDebug(DBG_WARN, "Could not open file for writing: %s; %s", filename, strerror(errno));
return false;
}
va_list ap;
va_start(ap, fmt); // get variable argument list passed
if (vfprintf(fp, fmt, ap) < 0) {
- // pDebug(DBG_ERR, "Could not write to file: %s", filename);
+ pDebug(DBG_WARN, "Could not write to file: %s", filename);
fclose(fp);
return false;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/powersave-0.12.8/daemon/cpufreq_interface.h new/powersave-0.12.9/daemon/cpufreq_interface.h
--- old/powersave-0.12.8/daemon/cpufreq_interface.h 2006-03-27 18:39:06.000000000 +0200
+++ new/powersave-0.12.9/daemon/cpufreq_interface.h 2006-03-28 16:21:29.000000000 +0200
@@ -2,7 +2,7 @@
* *
* Powersave Daemon *
* *
- * Copyright (C) 2004,2005 SUSE Linux Products GmbH *
+ * Copyright (C) 2004,2005,2006 SUSE Linux Products GmbH *
* *
* Author(s): Holger Macht *
* *
@@ -57,7 +57,7 @@
* @return true on success, false on error
*/
virtual bool init() = 0;
-
+
/** @brief adjusts speeds
*
* @return
@@ -115,7 +115,7 @@
* more (in fact these calls should be just ignored, but better
* be careful)
*/
- virtual int setMode(CPUFREQ_MODE mode) = 0;
+ int setMode(CPUFREQ_MODE mode);
/** @brief reads out frequencies
*
@@ -218,7 +218,7 @@
* @return true on success, false otherwise
*/
bool init();
-
+
#ifdef CPUFREQ_MEASURE
unsigned long time_spent[MAX_SPEEDS + 1];
unsigned int count;
@@ -317,8 +317,6 @@
void setConfig();
- int setMode(CPUFREQ_MODE mode);
-
/** @brief speed file to get or set current speed */
string CURRENT_SPEED_FILE;
@@ -373,7 +371,8 @@
void setConfig();
- int setMode(CPUFREQ_MODE mode);
+ /** @brief sets the ondemand governor configuration */
+ void setOndemandConfig();
/** @brief write a value to an ondemand file
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/powersave-0.12.8/daemon/cpufreq_kernel.cpp new/powersave-0.12.9/daemon/cpufreq_kernel.cpp
--- old/powersave-0.12.8/daemon/cpufreq_kernel.cpp 2006-03-27 18:39:06.000000000 +0200
+++ new/powersave-0.12.9/daemon/cpufreq_kernel.cpp 2006-03-28 16:21:29.000000000 +0200
@@ -2,7 +2,7 @@
* *
* Powersave Daemon *
* *
- * Copyright (C) 2004,2005 SUSE Linux Products GmbH *
+ * Copyright (C) 2004,2005,2006 SUSE Linux Products GmbH *
* *
* Author(s): Holger Macht *
* *
@@ -114,7 +114,7 @@
return 0;
}
-void CPUFreq_Kernel::setConfig()
+void CPUFreq_Kernel::setOndemandConfig()
{
/* probably forgot some ondemand configs ?
@@ -168,16 +168,20 @@
return;
}
-int CPUFreq_Kernel::setMode(CPUFREQ_MODE mode)
+void CPUFreq_Kernel::setConfig()
+{
+}
+
+int CPUFreq_Kernel::adjustSpeed()
{
- switch (mode) {
+ switch (_mode) {
case _DYNAMIC:
if (setGovernor(ON_DEMAND_STRING) < 0) {
pDebug(DBG_WARN, "Could not set ondemand governor.");
return -1;
}
// after switching back to ondemand, the config needs to be re-set
- setConfig();
+ setOndemandConfig();
break;
case _PERFORMANCE:
if (setGovernor("performance") < 0) {
@@ -196,13 +200,7 @@
pDebug(DBG_WARN, "Unknown cpufreq kernel governor requested");
return -1;
}
- _mode = mode;
- return 0;
-}
-int CPUFreq_Kernel::adjustSpeed()
-{
- /* dummy inplementation */
return 1;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/powersave-0.12.8/daemon/cpufreq_management.cpp new/powersave-0.12.9/daemon/cpufreq_management.cpp
--- old/powersave-0.12.8/daemon/cpufreq_management.cpp 2006-03-27 18:39:06.000000000 +0200
+++ new/powersave-0.12.9/daemon/cpufreq_management.cpp 2006-03-28 16:21:29.000000000 +0200
@@ -2,7 +2,7 @@
* *
* Powersave Daemon *
* *
- * Copyright (C) 2004,2005 SUSE Linux Products GmbH *
+ * Copyright (C) 2004,2005,2006 SUSE Linux Products GmbH *
* *
* Author(s): Holger Macht *
* *
@@ -227,7 +227,6 @@
config_obj->current_scheme->CPUFREQ_HYSTERESIS,
config_obj->current_scheme->CONSIDER_NICE);
}
-
}
CPUFREQ_CONTROL_MODE CpufreqManagement::controlMode()
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/powersave-0.12.8/daemon/cpufreq_management.h new/powersave-0.12.9/daemon/cpufreq_management.h
--- old/powersave-0.12.8/daemon/cpufreq_management.h 2006-03-27 18:39:05.000000000 +0200
+++ new/powersave-0.12.9/daemon/cpufreq_management.h 2006-03-28 16:21:29.000000000 +0200
@@ -2,7 +2,7 @@
* *
* Powersave Daemon *
* *
- * Copyright (C) 2004,2005 SUSE Linux Products GmbH *
+ * Copyright (C) 2004,2005,2006 SUSE Linux Products GmbH *
* *
* Author(s): Holger Macht *
* *
@@ -167,7 +167,7 @@
* @return true if already inside core_list, false otherwise
*/
bool siblingExists(list< int > core_list, int core);
-
+
/** @brief stl list holding all cpufreq objects */
std::list< CPUFreq_Interface* > _cpufreq_objects;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/powersave-0.12.8/daemon/cpufreq_userspace.cpp new/powersave-0.12.9/daemon/cpufreq_userspace.cpp
--- old/powersave-0.12.8/daemon/cpufreq_userspace.cpp 2006-03-27 18:39:06.000000000 +0200
+++ new/powersave-0.12.9/daemon/cpufreq_userspace.cpp 2006-03-28 16:21:29.000000000 +0200
@@ -2,7 +2,7 @@
* *
* Powersave Daemon *
* *
- * Copyright (C) 2004,2005 SUSE Linux Products GmbH *
+ * Copyright (C) 2004,2005,2006 SUSE Linux Products GmbH *
* *
* Author(s): Holger Macht *
* *
@@ -148,18 +148,6 @@
return 1;
}
-int CPUFreq_Userspace::setMode(CPUFREQ_MODE mode)
-{
- /* throw these two lines out to force governor to be set */
- if (_mode == mode)
- return 0;
-
- _mode = mode;
-
- adjustSpeed();
- return 0;
-}
-
int CPUFreq_Userspace::adjustSpeed()
{
int ret = calcCPULoad(Powersave::Globals::config_obj->current_scheme->CONSIDER_NICE);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/powersave-0.12.8/daemon/pm_interface.cpp new/powersave-0.12.9/daemon/pm_interface.cpp
--- old/powersave-0.12.8/daemon/pm_interface.cpp 2006-03-27 18:39:06.000000000 +0200
+++ new/powersave-0.12.9/daemon/pm_interface.cpp 2006-03-28 16:21:29.000000000 +0200
@@ -2,7 +2,7 @@
* *
* Powersave Daemon *
* *
- * Copyright (C) 2004,2005 SUSE Linux Products GmbH *
+ * Copyright (C) 2004,2005,2006 SUSE Linux Products GmbH *
* *
* Author(s): Holger Macht *
* *
@@ -444,6 +444,11 @@
_requested_sleep_state = PSD_NO_SLEEP_REQUEST;
// reset frequency which may have changed without noticing it
cpufreq->reinitSpeeds();
+ /* reset CPU freq mode */
+ if (!cpufreq->setModes(config_obj->current_scheme->CPUFREQUENCY, _eM) < 0) {
+ pDebug(DBG_WARN, "Could not set CPUFreq mode");
+ }
+
checkACStateChanges();
checkBatteryStateChanges();
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...