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 /sys/power/state file format have changed (\n appended) and has_acpi_sleep() function is unable to handle it properly. I've changed this 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 mainline kernels and scheduled ACPI procfs interface removal. Reproducible: Always Steps to Reproduce: 1. emerge >=gentoo-sources-2.6.22-r2 2. Start KDE, go to klaptopdaemon's menu 3. Select "Configure KLaptop...", go to "ACPI Config" page, check "Enable hibernate" 4. Go to klaptopdaemon's menu again Actual Results: Both "Hibernate" and "Lock&Hibernate" menu items are missing Expected Results: Both "Hibernate" and "Lock&Hibernate" menu items present
Created attachment 127998 [details, diff] klaptopdaemon-3.5.7-has_acpi_sleep.patch
Created attachment 127999 [details] klaptopdaemon-3.5.7-r1.ebuild
First of all, please file an upstream bug for this and post its URL here. This is really something that should go into KDE itself. That said, I need this, too, and so I have successfully tested your patch and added it for now to both kdeutils and klaptopdaemon. Especially since quite a few upstream bugs for other enhancements have been open at bugs.kde.org for ages and the sources in the focus areas haven't been changed for a long time.
Here's the URL for this bug in upstream: http://bugs.kde.org/show_bug.cgi?id=148928