Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 188760 - kde-base/klaptopdaemon-3.5.7-r1: "Hibernate" menu item missing with 2.6.22 kernels (ebuild containing fix included)
Summary: kde-base/klaptopdaemon-3.5.7-r1: "Hibernate" menu item missing with 2.6.22 ke...
Status: RESOLVED REMIND
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: kernel-2.6.22
  Show dependency tree
 
Reported: 2007-08-13 23:01 UTC by Sergey Temerkhanov
Modified: 2007-08-17 11:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
klaptopdaemon-3.5.7-has_acpi_sleep.patch (klaptopdaemon-3.5.7-has_acpi_sleep.patch,1.11 KB, patch)
2007-08-13 23:02 UTC, Sergey Temerkhanov
Details | Diff
klaptopdaemon-3.5.7-r1.ebuild (klaptopdaemon-3.5.7-r1.ebuild,957 bytes, text/plain)
2007-08-13 23:03 UTC, Sergey Temerkhanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Temerkhanov 2007-08-13 23:01:20 UTC
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
Comment 1 Sergey Temerkhanov 2007-08-13 23:02:27 UTC
Created attachment 127998 [details, diff]
klaptopdaemon-3.5.7-has_acpi_sleep.patch
Comment 2 Sergey Temerkhanov 2007-08-13 23:03:00 UTC
Created attachment 127999 [details]
klaptopdaemon-3.5.7-r1.ebuild
Comment 3 Wulf Krueger (RETIRED) gentoo-dev 2007-08-17 08:58:21 UTC
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.
Comment 4 Sergey Temerkhanov 2007-08-17 11:22:19 UTC
Here's the URL for this bug in upstream: http://bugs.kde.org/show_bug.cgi?id=148928