You are not logged in.
Pages: 1
Another probably easy question from me.
Problem:
When closing the lid, or pressing the button to close the lid it goes black, but it also stays that way after that when I've opened it.
Solution to this is running 'vbetools dpms on' which works fine.
I am not using X and the only daemon I run that has anything to do with this is 'acpid'.
/etc/acpi/events/lm_lid
event=button[ /]lid
action=/etc/acpi/actions/lm_lid.sh &e
/etc/acpi/actions/lm_lid.sh
#!/bin/sh
if [ "`grep open /proc/acpi/button/lid/LID/state`" ]
then
/usr/sbin/vbetool dpms on
else
/usr/sbin/vbetool dpms off
fi
/var/log/acpid.log
Oct 20 23:12:54 perkele acpid: starting up
Oct 20 23:12:54 perkele acpid: 3 rules loaded
Oct 20 23:13:10 perkele syslog-ng[3711]: Log statistics; processed='center(queued)=1516', processed='center(received)=785', processed='destination(acpid)=387', processed='destination(console)=0', processed='destination(mail)=0', processed='destination(user)=0', processed='destination(uucp)=0', processed='destination(messages)=341', processed='destination(news)=0', processed='destination(iptables)=0', processed='destination(everything)=388', processed='destination(lpr)=0', processed='destination(cron)=0', processed='destination(syslog)=1', processed='destination(authlog)=10', processed='destination(errors)=2', processed='destination(kernel)=387', processed='destination(daemon)=0', processed='source(src)=785'
Oct 20 23:13:19 perkele acpid: received event "button/lid LID 00000080 0000002b"
Oct 20 23:13:19 perkele acpid: executing action "/etc/acpi/actions/lm_lid.sh &e"
Oct 20 23:13:19 perkele acpid: action exited with status 127
Oct 20 23:13:19 perkele acpid: executing action "/etc/acpi/actions/lm_lid.sh &e"
Oct 20 23:13:19 perkele acpid: action exited with status 127
Oct 20 23:13:19 perkele acpid: completed event "button/lid LID 00000080 0000002b"
Oct 20 23:13:20 perkele acpid: received event "button/lid LID 00000080 0000002c"
Oct 20 23:13:20 perkele acpid: executing action "/etc/acpi/actions/lm_lid.sh &e"
Oct 20 23:13:20 perkele acpid: action exited with status 127
Oct 20 23:13:20 perkele acpid: executing action "/etc/acpi/actions/lm_lid.sh &e"
Oct 20 23:13:20 perkele acpid: action exited with status 127
Oct 20 23:13:20 perkele acpid: completed event "button/lid LID 00000080 0000002c"
Oct 20 23:13:28 perkele acpid: received event "button/lid LID 00000080 0000002d"
Oct 20 23:13:28 perkele acpid: executing action "/etc/acpi/actions/lm_lid.sh &e"
Oct 20 23:13:28 perkele acpid: action exited with status 127
Oct 20 23:13:28 perkele acpid: executing action "/etc/acpi/actions/lm_lid.sh &e"
Oct 20 23:13:28 perkele acpid: action exited with status 127
Oct 20 23:13:28 perkele acpid: completed event "button/lid LID 00000080 0000002d"
Oct 20 23:13:29 perkele acpid: received event "button/lid LID 00000080 0000002e"
Oct 20 23:13:29 perkele acpid: executing action "/etc/acpi/actions/lm_lid.sh &e"
Oct 20 23:13:29 perkele acpid: action exited with status 127
Oct 20 23:13:29 perkele acpid: executing action "/etc/acpi/actions/lm_lid.sh &e"
Oct 20 23:13:29 perkele acpid: action exited with status 127
Oct 20 23:13:29 perkele acpid: completed event "button/lid LID 00000080 0000002e"
This is quiet long, but it looks like it starts the script at least.
If I do 'sh /etc/acpi/actions/lm_lid.sh' after the screen is black it starts it, so it seems the script is working at least.
So question is, how do I get it to turn back on automatical when opening the lid?
Last edited by biio (2007-10-20 21:27:49)
Offline
The exit status 127 tells me something is wrong with your script. My guess would be the if statement is wrong... The actual if line, not the whole thing
Try
if [ `grep open /proc/acpi/button/lid/LID/state | wc -l` -ne 0 ]
Offline
The exit status 127 tells me something is wrong with your script. My guess would be the if statement is wrong... The actual if line, not the whole thing
Try
if [ `grep open /proc/acpi/button/lid/LID/state | wc -l` -ne 0 ]
That solved all my problems.
Many thanks.
Offline
I'd like to bump this thread, its better then making a new thread.
I have a similar problem again, you can see my configs in previous posts in this thread.
The new problem is that when the lid gets closed the screen goes blank for just a sec instead of staying blank, this is an obious problem.
I get this in my acpid.log:
Jan 3 23:19:55 fifan acpid: received event "video VID 00000080 00000000"
Jan 3 23:19:55 fifan acpid: notifying client 14698[0:100]
Jan 3 23:19:55 fifan acpid: executing action "/etc/acpi/handler.sh video VID 00000080 00000000"
Jan 3 23:19:55 fifan acpid: action exited with status 0
Jan 3 23:19:55 fifan acpid: completed event "video VID 00000080 00000000"
Jan 3 23:19:55 fifan acpid: received event "button/lid LID 00000080 0000001b"
Jan 3 23:19:55 fifan acpid: notifying client 14698[0:100]
Jan 3 23:19:55 fifan acpid: executing action "/etc/acpi/actions/lm_lid.sh &e"
Jan 3 23:19:55 fifan acpid: action exited with status 127
Jan 3 23:19:55 fifan acpid: executing action "/etc/acpi/handler.sh button/lid LID 00000080 0000001b"
Jan 3 23:19:55 fifan acpid: action exited with status 0
Jan 3 23:19:55 fifan acpid: completed event "button/lid LID 00000080 0000001b"
Jan 3 23:19:56 fifan acpid: received event "video VID 00000080 00000000"
Jan 3 23:19:56 fifan acpid: notifying client 14698[0:100]
Jan 3 23:19:56 fifan acpid: executing action "/etc/acpi/handler.sh video VID 00000080 00000000"
Jan 3 23:19:56 fifan acpid: action exited with status 0
Jan 3 23:19:56 fifan acpid: completed event "video VID 00000080 00000000"
Jan 3 23:19:56 fifan acpid: received event "button/lid LID 00000080 0000001c"
Jan 3 23:19:56 fifan acpid: notifying client 14698[0:100]
Jan 3 23:19:56 fifan acpid: executing action "/etc/acpi/actions/lm_lid.sh &e"
Jan 3 23:19:56 fifan acpid: action exited with status 127
Jan 3 23:19:56 fifan acpid: executing action "/etc/acpi/handler.sh button/lid LID 00000080 0000001c"
Jan 3 23:19:56 fifan acpid: action exited with status 0
Jan 3 23:19:56 fifan acpid: completed event "button/lid LID 00000080 0000001c"
And I get these two lines in dmesg:
video bus notify
video bus notify
Me being the regular stupid me I havent been able to find a solution.
Kernel this time is 2.6.23-ARCH, every package up to date as of this post being written and as far as I know, no other scripts is running that might be interfering with my scripts. And I have checked the lid-status in /proc/acpi/button/lid/LID/state, it stays as closed as far as the lid is closed so its not the button thats broken.
Edit:
Further experimenting, this does only happend in X, outside of X my first problem is back where the screen doesnt turn back on at all unless I run vbetool manually.
Edit2:
Moving the content of lm_lid.sh to /etc/acpi/handler.sh seemed to work for some reason.
But be ready for another bump, I am the worst type of linuxuser, the one who runs into problems he cant solve.
Last edited by biio (2008-01-03 23:50:40)
Offline
I am the worst type of linuxuser, the one who runs into problems he cant solve.
Here I fixed that for you. "I am a Linux user, and run into problems."
Honestly, I would say that just making an effort to solve your problems, and posting relevant information pertaining to it on the forums doesn't make you a poor Linux user. A poor Linux user it one who makes no attempt to solve their problem, and just posts "OMG, my screen goes black when I do something." I mean that's why we have forums, so you can ask other people for help. When I started using Linux several years ago I had no idea what to do when I ran into problems, but slowly you will acquire a base knowledge and learn where to start looking when things go wrong just like I did. Also, Arch is a more advanced distro than say Ubuntu, and just by the very fact that you are using it will make you more knowledgeable even if you have to ask more questions initially.
Professor: This isn't right...It isn't even wrong...
Offline
Pages: 1