Version: (using KDE KDE 3.5.0) Installed from: Debian testing/unstable Packages Compiler: gcc (GCC) 4.0.3 20051201 (prerelease) (Debian 4.0.2-5) OS: Linux klaptop daemon is not able to suspend kernels with suspend2 (with new design) suspend2 switch to /proc/suspend2. i am using debian sid with kernel 2.6.14.3 and software suspend2 here is my patch for this issue: --- kdeutils-3.5.0.orig/klaptopdaemon/portable.cpp +++ kdeutils-3.5.0/klaptopdaemon/portable.cpp @@ -577,9 +577,10 @@ if (known != last_seed) { known = last_seed; available = 0; - present = (((::access("/proc/sys/kernel/swsusp", F_OK) == 0) || - (::access("/proc/software_suspend", F_OK) == 0)) && - ::access("/usr/sbin/hibernate", F_OK) == 0); + present = (((::access("/proc/sys/kernel/swsusp", F_OK) == 0) || + (::access("/proc/software_suspend", F_OK) == 0) || + (::access("/proc/suspend2", F_OK) == 0)) && + ::access("/usr/sbin/hibernate", F_OK) == 0); if (present) { if (::getuid() == 0) { // running as root available = ::access("/usr/sbin/hibernate", X_OK) == 0 && acpi_helper_ok(1); make sure that klaptop checks this too. mfg && by manne
Thanks for the patch, it worked for me. I had to apply it again with KDE 3.5.1. So the problem hasn't been fixed. Vesko
The fix is trivial and suspend2 kernels won't disappear in the foreseeable future. It would be nice, if this would be picked up.
This fix is already includes. But kdelaptopdaemon needs another fix: 578,582c578,581 < present = (((::access("/proc/sys/kernel/swsusp", F_OK) == 0) || < (::access("/proc/software_suspend", F_OK ) == 0) || < (::access("/proc/suspend2", F_OK ) == 0) || < (::access("/sys/power/suspend2", F_OK ) == 0)) && < ::access("/usr/sbin/hibernate", F_OK) == 0); --- > present = (((::access("/proc/sys/kernel/swsusp", F_OK) == 0) || > (::access("/proc/software_suspend", F_OK) == 0) || > (::access("/proc/suspend2", F_OK) == 0)) && > ::access("/usr/sbin/hibernate", F_OK) == 0); regards manne
here is a patch against kde 3.5.4: --- kdeutils-3.5.4.orig/klaptopdaemon/portable.cpp +++ kdeutils-3.5.4/klaptopdaemon/portable.cpp @@ -575,10 +575,11 @@ if (known != last_seed) { known = last_seed; available = 0; - present = (((::access("/proc/sys/kernel/swsusp", F_OK) == 0) || - (::access("/proc/software_suspend", F_OK) == 0) || - (::access("/proc/suspend2", F_OK) == 0)) && - ::access("/usr/sbin/hibernate", F_OK) == 0); + present = (((::access("/proc/sys/kernel/swsusp", F_OK) == 0) || + (::access("/proc/software_suspend", F_OK ) == 0) || + (::access("/proc/suspend2", F_OK ) == 0) || + (::access("/sys/power/suspend2", F_OK ) == 0)) && + ::access("/usr/sbin/hibernate", F_OK) == 0); if (present) { if (::getuid() == 0) { // running as root available = ::access("/usr/sbin/hibernate", X_OK) == 0 && acpi_helper_ok(1);
Thanks, Manfred. Bug still open and I didn't had time to look at it yet, so I just left a message in hope someone picked it up. :) It's costly to fix these (sometimes trivial, e.g. Bug 126414) bugs multiple times downstream, while it could be done once upstream. Guess, it's the usual problem of not having enough active maintainers. :( There's also Bug 103437 open for more than 15 months, patch attached and 170 votes.
suspend2 has been renamed to tuxonice.Starting with version 2.2.10.3 /sys/power/suspend2 has also been renamed to /sys/power/tuxonice here is a slightly modified patch based on the patch from Manfred Paul which adds /sys/power/tuxonice to the check if software suspend is present. --- ./klaptopdaemon/portable.cpp.org 2007-09-30 16:14:48.000000000 +0200 +++ ./klaptopdaemon/portable.cpp 2007-09-30 16:21:56.000000000 +0200 @@ -577,7 +577,9 @@ available = 0; present = (((::access("/proc/sys/kernel/swsusp", F_OK) == 0) || (::access("/proc/software_suspend", F_OK) == 0) || - (::access("/proc/suspend2", F_OK) == 0)) && + (::access("/proc/suspend2", F_OK) == 0) || + (::access("/sys/power/suspend2", F_OK) == 0) || + (::access("/sys/power/tuxonice", F_OK) == 0)) && ::access("/usr/sbin/hibernate", F_OK) == 0); if (present) { if (::getuid() == 0) { // running as root
I have personally contacted the KLaptopDaemon author/assigned and he confirmed that the tool is deprecated in KDE SC 4 (replaced by PowerDevil) and that there are no current efforts to support/maintain the KDE SC 3 version. Because of this, I will close the reports as UNMAINTAINED. Regards