Ubuntu – How to prevent an external monitor from shutting off when closing the laptop lid

12.04external-monitorpower-management

I've seen this issue on previous versions of Ubuntu, but not on 12.04 and some of those are resolved bugs, so I'm asking again.

I've set up power management so that, when plugged in, my laptop does nothing when the lid is closed. I do this so that I can use as a desktop with my external monitor with the screen closed and the laptop scurried away from my desktop.

I tried turning off the laptop monitor to see if that made a difference, but it doesn't.

The problem is that closing the lid still shuts off my external monitor. What can I do to prevent this?

Best Answer

I scoured the 'net for solutions that respected the Ubuntu/GNOME settings but ultimately this was the only thing that worked for me:

sudo vim /etc/UPower/UPower.conf

# <snip> ...

ignoreLid=true

# <snip> ...

On systemd operating systems you can issue the command sudo service upower restart to have the new config take effect. Otherwise, you need to reboot.