Bug 186174 - sleeping doesn't work since /proc/acpi/sleep doesn't exist
sleeping doesn't work since /proc/acpi/sleep doesn't exist
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: fnfx (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Andreas Bierfert
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-21 19:06 EST by Radek Bíba
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-23 03:01:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Radek Bíba 2006-03-21 19:06:43 EST
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 03:00:00 EST
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 14:57:03 EST
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 14:59:50 EST
Created attachment 126500 [details]
patch to use /sys instead of /proc
Comment 4 Andreas Bierfert 2006-03-23 03:01:53 EST
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.