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?


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

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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