Bug 148928 - "Hibernate" menu item missing with 2.6.22 (and possibly later) kernels
Summary: "Hibernate" menu item missing with 2.6.22 (and possibly later) kernels
Status: RESOLVED FIXED
Alias: None
Product: klaptopdaemon
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Paul Campbell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-17 13:11 UTC by Sergey Temerkhanov
Modified: 2008-02-02 19:34 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch to resolve the bug (1.11 KB, patch)
2007-08-17 13:20 UTC, Sergey Temerkhanov
Details
another patch (613 bytes, patch)
2008-02-01 10:42 UTC, Fathi Boudra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Temerkhanov 2007-08-17 13:11:41 UTC
Version:           3.5.7 (using KDE KDE 3.5.7)
Installed from:    Gentoo Packages
Compiler:          gcc-4.1.2 gcc version 4.1.2 (Gentoo 4.1.2)
OS:                Linux

There is a problem with klaptopdaemon and 2.6.22 (and probably higher) Linux
kernels. There are no "Hibernate" and "Lock&Hibernate" menu items even if those
are enabled at "ACPI Config" page and helper application is set up correctly.
This is due to the fact that /sys/power/state file format have changed (\n appended) and
has_acpi_sleep() function is unable to handle it properly.

This bug was already filed here: http://bugs.gentoo.org/show_bug.cgi?id=188760
Comment 1 Sergey Temerkhanov 2007-08-17 13:20:47 UTC
Created attachment 21420 [details]
patch to resolve the bug

I've changed has_acpi_sleep() function so that it can handle both old and new
format as well (tested with gentoo-sources-2.6.22-r2 and 2.6.21-r4). I've also
removed /proc/acpi/sleep checks due to deprecation of it in the mainline kernel
and scheduled ACPI procfs interface removal.
Comment 2 David Rosenstrauch 2007-08-24 06:25:32 UTC
FYI - this patch worked for me.  "Hibernate" and "Lock & Hibernate" now appear on the laptop daemon menu again.  (This is on Arch Linux w/kdeutils 3.5.7 and kernel 2.6.22.5)  Woo hoo!!!  Thanks much for the fix!

Any idea when this might make it into the official KDE release?
Comment 3 Marc Haber 2007-09-29 10:19:05 UTC
Works for me as well, I have locally patched the Debian packages.
Comment 4 David Rosenstrauch 2007-10-17 16:17:06 UTC
Looks like maybe this is fixed in KDE 3.5.8.  Can anyone else confirm?
Comment 5 Marc Haber 2007-11-24 11:12:06 UTC
NAK, klaptopdaemon 3.5.8-1 from Debian unstable does not show the menu entries.
Comment 6 Marc Haber 2007-11-24 11:13:00 UTC
This is also Debian Bug #444500, http://bugs.debian.org/444500
Comment 7 Fathi Boudra 2008-02-01 10:42:28 UTC
Created attachment 23387 [details]
another patch
Comment 8 Fathi Boudra 2008-02-02 19:34:50 UTC
SVN commit 770083 by fabo:

Fix "Hibernate" and "Lock & Hibernate" missing menu in kernel >= 2.6.22
BUG: 148928


 M  +4 -2      portable.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=770083