Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an MBA and I'm used to close the lid without any problem in OSX.

I've installed ubuntu 13.04 in dual boot with rEFit.

The problem is that sometimes something strange happens when I close the lid, today for example I closed it for lunch break and when I came back to work the laptop was on (the lid still closed), very hot with the fan at high speed.

What can I do to have a robust suspend on lid closure? Is the hibernate option better?

Thanks in advance.


EDIT:

My "When the lid is closed" option is already on "Suspend", so I suppose that the suspension doesn't work properly.

share|improve this question
add comment

1 Answer 1

You shoul go to System Settings > Power. There you can set laptop to suspend, hibernate, or do nothing when the lid is closed:

enter image description here

To enable hibernate in Ubuntu, hit Ctrl+Alt+T to launch a terminal, then run this command to create a hibernate policy file:

gksudo gedit /var/lib/polkit-1/localauthority/50-local.d/hibernate.pkla

Then copy and paste following into the file and save.

[Enable Hibernate]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

Need to restart to take effect.

If you want the laptop shutting down when the lid is closed, first install dconf-tools:

sudo apt-get install dconf-tools

Then launch Dconf-Editor from the Dash, navigate to org > gnome > settings-daemon > plugins > power. Change the value of lid-close-battery-action to Shutdown (or any value desired). Actually, when you change the settings in Power (see previous picture), it automatically changes the value at this point:

enter image description here

Also, you can read and try Fix Ubuntu (or Linux) Suspend/Hibernate Not Working Bug.

share|improve this answer
    
Ok sorry I didn't mention that I already set "When the lid is closed" to "Suspend". The problem that it does not suspend correctly remains –  Michele May 10 '13 at 14:19
    
I don't want the laptop to shutdown, I want to suspend it! But I would like that if I tell it to suspend it would suspend really! I don't want to take out the previously suspended laptop from my rucksack and find it on and very hot with the lid closed! –  Michele May 10 '13 at 14:26
    
@Michele I just edited my answer. Try the fix from the link. –  Radu Rădeanu May 10 '13 at 14:27
    
Source: ubuntuguide.net/… –  duxk.gh May 17 '13 at 12:25
add comment

Your Answer

 
discard

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.