Laptop shuts down when lid is closed

broken image
broken image

So far I've tried with 'xfce4-session-logout -halt' and 'shutdown -h now', and both behaves the same. I would like my laptop to actually halt after my script has ended. In that precise moment, I see the screen briefly turning on, just to completely halt the next moment. Where it stays indefinitely, until I open the lid again. Instead, it appears to reach an almost-halt runlevel. But if the script takes too long and I decide to close the lid of my laptop before it ends, the laptop won't shutdown. I have a script that I want to run when I'm done working and want to shutdown my laptop. As written on the subject, I can't get my laptop to shutdown when the lid is closed.