Bug 186174 - sleeping doesn't work since /proc/acpi/sleep doesn't exist
Summary: sleeping doesn't work since /proc/acpi/sleep doesn't exist
Alias: None
Product: Fedora
Classification: Fedora
Component: fnfx
Version: 5
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Andreas Bierfert
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2006-03-22 00:06 UTC by Radek Bíba
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2006-03-23 08:01:53 UTC

Attachments (Terms of Use)
patch to use /sys instead of /proc (962 bytes, patch)
2006-03-22 19:59 UTC, Radek Bíba
no flags Details | Diff

Description Radek Bíba 2006-03-22 00:06:43 UTC
Description of problem:
I used to have FC3 and /proc/acpi/sleep used to exist, then it was removed
(deprecated), then put back. However, it doesn't exist in FC5 to which I've
upgraded. FnFX uses this file for sleeping so this function doesn't work,
although I've uncommented it in fnfxd.conf. Looking into the sources, I think
perhaps only a small change needs to be done. In fnfx.h:

-define ACPI_SLEEP       "/proc/acpi/sleep"
+define ACPI_SLEEP       "/sys/power/state"

and in fnfxd_cmds.c:

        if (state == 3)
-            fprintf(f, "%d", state);
+            fprintf(f, "mem");
        else if (state == 4)
-            fprintf(f, "%d", state);
+            fprintf(f, "disk");

But I haven't tried it. I can, when I have time.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. have a Toshiba laptop, install fnfx, make proper changes to
/etc/fnfx/fnfxd.conf, start fnfxd
2. press Fn+F3
Actual results:
nothing seems to happen

Expected results:
computer goes to sleep mode

Comment 1 Andreas Bierfert 2006-03-22 08:00:00 UTC
Hm, thanks for reporting... could you try it and let me know if it works (don't
have a toshiba latop to test here). If it does I will commit it for >= FC5

Comment 2 Radek Bíba 2006-03-22 19:57:03 UTC
I've just tried it and it really works. (still assuming actions for keys Fn-F3
and Fn-F4 are uncommented in fnfxd.conf) I'll attach proposed patch so you'll
have something better than I previously wrote.

Comment 3 Radek Bíba 2006-03-22 19:59:50 UTC
Created attachment 126500 [details]
patch to use /sys instead of /proc

Comment 4 Andreas Bierfert 2006-03-23 08:01:53 UTC
Thanks for reporting and sending the patch. Looks good to me. Applied and pushed. :)

Note You need to log in before you can comment on or make changes to this bug.