24

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?

Thom
  • 1,469
  • 1
    Possible duplicate? http://askubuntu.com/questions/15520 – fossfreedom Jun 17 '12 at 20:54
  • 1
    The few things on that page that applied to 12.04 seemed to make no difference. – Thom Jun 17 '12 at 21:47
  • You might want to look at http://askubuntu.com/questions/145342/disabling-monitor-reconfiguration-when-closing-lid and http://askubuntu.com/questions/161649/how-do-i-disable-all-lid-close-processes if you haven't already. There are some ideas in there, but unfortunately no one seems to have a solution. – Tomas Aug 02 '12 at 07:28

3 Answers3

30

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.

pztrick
  • 412
  • 4
  • 10
21

The only way I managed this: hit dash and search for displays.

Screenshot of "Displays" Window

2 things I noticed:

  • the 'off' does not get saved;
  • I still need to keep the screen physically up. Closing the lid kills the 2nd monitor too. If you do close the lid and put it back up both screens light up.

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

Found it: after the 2nd monitor turns off move the mouse or type something. The 2nd monitor will turn on.

Rinzwind
  • 299,756
  • The problem with this solution is that you have to do it every time you restart your computer.. There has to be a way to make a script or something that will do it automatically. Plus, I couldn't turn off my laptop monitor until i selected "Mirror displays" and then unchecked it again. Before doing that, the on/off button was disabled. – knownasilya Jan 01 '13 at 21:47
  • Nope. It works for me even after a reboot @Knownasilya and I also have never had problems with the toggle being disabled. – Rinzwind Jan 01 '13 at 21:56
  • 1
    Maybe it's because I'm using 12.10 with Gnome 3? – knownasilya Jan 01 '13 at 23:35
  • +1 for the mouse trick. Superb. So simple , but never thought of it. – George Vasiliou Feb 13 '22 at 22:50
1

Managed to do this by installing dconf tools and disabling org->gnome->desktop->screensaver: * idle-activation-enabled

I also had to set the 'Turn screen off when inactive for:' setting to 'Never' on the 'Brightness and Lock' section of the Ubuntu settings.

Lastly, I had to make sure that displays are not mirrored (Check box on 'Displays' settings dialog)

Now it finally works.