Bug 186174

Summary: sleeping doesn't work since /proc/acpi/sleep doesn't exist
Product: [Fedora] Fedora Reporter: Radek Bíba <rbiba>
Component: fnfxAssignee: Andreas Bierfert <andreas.bierfert>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: extras-qa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-23 08:01:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to use /sys instead of /proc none

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):
fnfx-0.3-6.fc5

How reproducible:
Always

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. :)