Bug 1007961

Summary: sleep.sh uses wrong path for lid state
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: acpidAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 19CC: jkaluza, jskarvad, orion, ted
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: 2013-09-16 15:18:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2013-09-13 15:51:23 UTC
Description of problem:

# cat /var/log/sleep.log 
+ PATH=/sbin:/bin:/usr/bin
+ grep -q closed /proc/acpi/button/lid/LID/state
grep: /proc/acpi/button/lid/LID/state: No such file or directory
+ exit

On my machine the file is /proc/acpi/button/lid/LID0/state

Version-Release number of selected component (if applicable):
kernel 3.10.11-200.fc19.i686.PAE
acpid-2.0.19-6.fc19.i686

Comment 1 Jaroslav Škarvada 2013-09-16 10:26:06 UTC
Interesting, on my machine it works:
$ cat /proc/acpi/button/lid/LID/state
state:      closed
$ uname -r
3.10.11-200.fc19.x86_64

And same on different machine running rawhide.

I guess it depends on what ACPI returns. Maybe more LID switches on your system? But I will add fallback for it.

Comment 2 Jaroslav Škarvada 2013-09-16 10:39:48 UTC
Oh, sorry, I cannot find the sleep.sh (I originally thought it is in acpid or pm-utils :). What package are you talking about? Btw this is not acpid fault and it is not possible to fix/workaround it in acpid, maybe it is your custom script?

Comment 3 Orion Poplawski 2013-09-16 15:18:21 UTC
Very sorry for that, how embarrassing, it is indeed our own script.