Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

Every time I select Ubuntu 12.04 when booting my HP 540 laptop, the machine restarts. How can I fix this, so I can successfully boot my Ubuntu system?

share|improve this question

I had the same problem with my Toshiba laptop. After some investigation, it seems that the "wake up on lid being open" is enabled and, of course, the lid is open just after it shuts down. A workround for this is:

sudo echo LID > /proc/acpi/wakeup

This can be put in /etc/rc.local

share|improve this answer
Commands like sudo echo TEXT > root-owned-file don't actually succeed. echo runs as root, then its output is redirected as the non-root user to the file, which the non-root user cannot write to. There are a number of alternatives that do work; one of them is echo LID | sudo tee /proc/acpi/wakeup (with an optional > /dev/null tacked on to the end if you need it to not write to stdout). Another option is sudo sh -c 'echo LID > /proc/acpi/wakeup'. – Eliah Kagan Aug 27 '12 at 4:55

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.