Ubuntu – How to turn off the laptop screen while using an external monitor

monitormultiple-monitorsnvidiaxorg

When I close my laptop lid, all my screens are turned off (my laptop screen and my LG M237WA monitor).

I'd like to know how do I make it turn off only the laptop screen and keep the monitor on (I want that behaviour for when I want to watch a movie on my monitor and don't want any brightness coming for the laptop screen).

I'm using a HP Pavilion dv4-1290br, which comes with a nVidia GeForce 8400M GTS. I'm using the nVidia driver and it's working perfectly. For my X settings, I'm using TwinView, my laptop is set to 1280×800 and my monitor to 1920×1080.

I hope you guys can help me, for I couldn't find anything so far.

Thank you very much.

Best Answer

Find the Name of displays by run xrandr in terminal(your laptop screen is something like LVDS1, and your external monitor is some thing like VGA).

# turn off laptop screen
xrandr --output LVDS1 --off   

If you need to turn on the laptop screen::

# laptop screen on
xrandr --output LVDS --mode 1280x800

If you want to turn off external screen::

xrandr --output VGA --off