Hi,
The settings of
SUSPEND2DISK_DELAY
SUSPEND2RAM_DELAY
STANDBY_DELAY
are totally useless IMO, especially since we have a POWRBTN_DELAY (the
usefullness of this setting is to be discussed, also IMO :-)
Here is the patch to remove them. It only removes code which is a very
good idea IMO :-)
config_files/sleep | 12 ------------
daemon/config_pm.cpp | 8 --------
daemon/config_pm.h | 12 ------------
daemon/pm_interface.cpp | 10 ----------
daemon/scheme_config.cpp | 7 -------
5 files changed, 49 deletions(-)
Index: config_files/sleep
===================================================================
--- config_files/sleep (revision 2378)
+++ config_files/sleep (working copy)
@@ -168,18 +168,6 @@
DISABLE_USER_STANDBY=""
## Path: System/Powermanagement/Powersave/Sleep_Modes
-## Type: integer(0:1000)
-## Default: 0
-#
-# Specify the time in seconds a sleep state should be delayed. This can
-# be used to delay a power-button-induced suspend for some seconds to
-# be able to power off the machine hard.
-#
-SUSPEND2DISK_DELAY=""
-SUSPEND2RAM_DELAY=""
-STANDBY_DELAY=""
-
-## Path: System/Powermanagement/Powersave/Sleep_Modes
## Type: string(platform,firmware,shutdown,reboot)
## Default: "platform"
#
Index: daemon/config_pm.h
===================================================================
--- daemon/config_pm.h (revision 2378)
+++ daemon/config_pm.h (working copy)
@@ -129,19 +129,7 @@
/** @brief if standby is disabled */
int USER_STANDBY_DISABLED;
-
- /** @brief the time to delay when a suspend to disk event is
- * executed until the suspend is actually performed */
- int SUSPEND2DISK_DELAY;
- /** @brief the time to delay when a suspend to ram event is
- * executed until the suspend is actually performed */
- int SUSPEND2RAM_DELAY;
-
- /** @brief the time to delay when a standby event is executed
- * until the standby is actually performed */
- int STANDBY_DELAY;
-
/** @brief absolute brightness level (depends on driver) or:
-1 ignore -2 low -3 medium -4 high */
int DISPLAY_BRIGHTNESS;
Index: daemon/scheme_config.cpp
===================================================================
--- daemon/scheme_config.cpp (revision 2378)
+++ daemon/scheme_config.cpp (working copy)
@@ -59,10 +59,6 @@
DPM_ENABLED = gc.DPM_ENABLED;
POWER_BUTTON_DELAY = gc.POWER_BUTTON_DELAY;
- SUSPEND2DISK_DELAY = gc.SUSPEND2DISK_DELAY;
- SUSPEND2RAM_DELAY = gc.SUSPEND2RAM_DELAY;
- STANDBY_DELAY = gc.STANDBY_DELAY;
-
ALLOW_THROTTLING = gc.ALLOW_THROTTLING;
MAX_CPU_THROTTLING = gc.MAX_CPU_THROTTLING;
ALWAYS_THROTTLE = gc.ALWAYS_THROTTLE;
@@ -163,9 +159,6 @@
== 1 ? "yes" : "no")
<< endl << "USER_SUSPEND2RAM_DISABLED: " <<
(sc.USER_SUSPEND2RAM_DISABLED == 1 ? "yes" : "no")
<< endl << "USER_STANDBY_DISABLED: " << (sc.USER_STANDBY_DISABLED
== 1 ? "yes" : "no")
- << endl << "SUSPEND2DISK_DELAY: " << sc.SUSPEND2DISK_DELAY << "
seconds"
- << endl << "SUSPEND2RAM_DELAY: " << sc.SUSPEND2RAM_DELAY << "
seconds"
- << endl << "STANDBY_DELAY: " << sc.STANDBY_DELAY << " seconds"
<< endl << "CONSIDER_NICE: " << (sc.CONSIDER_NICE ? "yes" : "no")
<< endl << "POWER_BUTTON_DELAY: " << sc.POWER_BUTTON_DELAY;
Index: daemon/config_pm.cpp
===================================================================
--- daemon/config_pm.cpp (revision 2378)
+++ daemon/config_pm.cpp (working copy)
@@ -65,10 +65,6 @@
DPM_ENABLED = 1;
POWER_BUTTON_DELAY = 0;
- SUSPEND2DISK_DELAY = 0;
- SUSPEND2RAM_DELAY = 0;
- STANDBY_DELAY = 0;
-
ALLOW_THROTTLING = false;
MAX_CPU_THROTTLING = 0;
ALWAYS_THROTTLE = false;
@@ -241,10 +237,6 @@
ENABLE_THERMAL_MANAGEMENT = BOTH;
*/
- SUSPEND2DISK_DELAY = checkValue(SUSPEND2DISK_DELAY,
"SUSPEND2DISK_DELAY", 0);
- SUSPEND2RAM_DELAY = checkValue(SUSPEND2RAM_DELAY, "SUSPEND2RAM_DELAY",
0);
- STANDBY_DELAY = checkValue(STANDBY_DELAY, "STANDBY_DELAY", 0);
-
s = data["AC_SCHEME"];
if (s != "")
AC_SCHEME = s.c_str();
Index: daemon/pm_interface.cpp
===================================================================
--- daemon/pm_interface.cpp (revision 2378)
+++ daemon/pm_interface.cpp (working copy)
@@ -463,16 +463,6 @@
static CPUFREQ_MODE cpufreq_mode;
if (before_sleep) {
- if (event == "suspend2disk") {
- if (config_obj->current_scheme->SUSPEND2DISK_DELAY > 0)
-
sleep(config_obj->current_scheme->SUSPEND2DISK_DELAY);
- } else if (event == "suspend2ram") {
- if (config_obj->current_scheme->SUSPEND2RAM_DELAY > 0)
-
sleep(config_obj->current_scheme->SUSPEND2RAM_DELAY);
- } else if (event == "standby") {
- if (config_obj->current_scheme->STANDBY_DELAY > 0)
-
sleep(config_obj->current_scheme->STANDBY_DELAY);
- }
ignore_buttons(true);
if (cpufreq->isSupported()) {
--
Stefan Seyfried | "Please, just tell people
QA / R&D Team Mobile Devices | to use KDE."
SUSE LINUX Products GmbH, Nürnberg | -- Linus Torvalds
_______________________________________________
powersave-devel mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/powersave-devel