View Full Version : [ubuntu] Closing MacBook while running

July 12th, 2009, 05:35 PM
I have three things left on my 'just to get Ubuntu working' check list, and this is one of them.

When using a Mac OSX on my MacBook, in the middle of running the laptop I was able to close the laptop, and this would put the laptop into 'hibernation/sleep' mode.

However, with U installed, when I close the laptop the computer keeps running - acting as if I never closed the laptop monitor.

Is there a way to set the laptop up so when I close the laptop it puts it to sleep for me?

July 13th, 2009, 07:29 PM
Sure there is.

July 13th, 2009, 07:32 PM
Sure there is.

Can you please point me in the right direction on where to learn this valuable knowledge you have?

July 13th, 2009, 07:49 PM
Well, you should first check that your MacBook can be put to sleep with the

$ sudo /usr/sbin/pm-suspendcommand, and that it can be brought back up when briefly hitting the power button.

If that works, then you can associate that command with an action of the acpid daemon by editing an entry in the
/etc/acpi/events directory, for example

$ sudo nano /etc/acpi/events/lidand then give it contents

The daemon should now put your MacBook to sleep when you close the lid, provided of course that it picks up on closing the lid...