Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an HP 510 laptop with Ubuntu 12.04.
I have all the correct settings for suspending when the lid is closed, as far as I can tell, so I think it's a problem with detecting the event.
The way it "should" be detected, from what I can see, is a little hardware switch that is pushed when the lid closes. This switch manually puts off the backlight, and sends the suspend signal. All I can think is that the signal isn't being properly interpreted.

Can anyone suggest a fix?

I tested whether the button was actually working based on the suggestion by josinalvo, and I found that in the directory /proc/acpi/button/lid/ there is no LID directory. There is, however, a C1CF folder, and in it is a state file. When using the this file instead of LID, I discovered that, no, when I close the lid, the state does not change. The full path is: '/proc/acpi/button/lid/C1CF/state

Update 2 I'm now running Xubuntu 12.10, (Unity was to slow) but I still have the same problem.

share|improve this question
The second possible duplicate link doesn't have answers. – Peachy Aug 4 '12 at 14:01

To know if the button is indeed working, go to a terminal and type

while [ 1 ]; do cat /proc/acpi/button/lid/LID/state; sleep 1; done

you should get one

state:      open

every second. Now close the lid and wait a bit. Open it again. Some lines should now be

state:      closed

with that, you can tell that the hardware is working, and the signal is read by linux

If it is working, well, I have no idea what your problem is =P

However, I have an ugly kludge you can use while your problem is not fixed

#ensures that a closed lid causes the computer to suspend
#! /bin/bash

while [ 1 ]
sleep 20
grep closed /proc/acpi/button/lid/LID/state && sudo pm-suspend

This is a bash script.

To use it,

1) create a file with these contents (say, check_lid)
2) right click the file, and open properties
2.1) go to permissions, and select 'allow executing file as a program'
3) on the shutdown menu, go to Startup Applications and add your program (check_lid) to the programs in startup
4) Ensure that your user can run sudo pm-suspend without using a password (via the sudoers file)

share|improve this answer
Unfortunately that didn't help. I've updated my question with results. – Yuri Aug 5 '12 at 12:36
I am not sure you are looking at the right file ... could you do a find /proc and post it somewhere ? (a good place to put it might be ) – josinalvo Jan 5 '13 at 16:20
also, if you could point to the full path file you are reading, it would be nice – josinalvo Jan 5 '13 at 16:22
@yuri please give us a bit more information (as described in my previous comments) – josinalvo Jan 7 '13 at 3:11
Sorry for not checking in in a while. The full path is: /proc/acpi/button/lid/C1CF/state The output for 'find /proc' is here: Do you want me to add it to the question? – Yuri Jan 8 '13 at 14:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.