I can connect my Ubuntu 12.04 laptop to my television via HDMI, and use the TV as a monitor. Unfortunately, it's a second monitor; I want it to be an only monitor. (I get annoyed moving the mouse from one monitor to the other. I just want everything to be on the TV. I don't want to have to drag things to the right of my laptop screen to see them on my TV screen.) Please advise me on options, including disabling the built-in monitor.

A particularly annoying aspect of my current configuration is that, even after I drag a window to the TV, if I try to put it into full screen mode, it reverts to the laptop display.

  • clarification: are you asking “How do I disable the built in monitor and enable the external hdmi tv?” ? – ctrl-alt-delor Jan 14 '14 at 22:03
  • Yup, exactly... – Mike Wentworth Jan 14 '14 at 22:06
  • Can't you do this via the Displays application in Unity? I think each display has an on-off toggle? Or you could set it to mirror displays . . . – ernie Jan 14 '14 at 23:12
  • Can you clarify Scott's interpretation. If it is correct would you like to have the two screens, but be able to maximise on your screen of choice. – ctrl-alt-delor Jan 15 '14 at 9:10
  • I installed the kde desktop, because it makes configuration easier. Unity has the policy of if you can not configure much, then it will be easier. If you want to stick with unity, then I suggest moving the question to Ask Ubuntu – ctrl-alt-delor Jan 15 '14 at 9:12

Using xrandr

  • Open a terminal window.
  • type xrandr. It will list all video ports. 2 will have some data below them 1920x1200 etc. One is tv the other is laptop monitor.
  • Assuming the laptop monitor is called LVDS1 then type xrandr --output LVDS1 --off

There is also a graphical tool to do it, but I know not of how to do this using the ubuntu unity desktop. (If you are running kde, gnome or other then do tell.)

  • 2
    Which config file to add this command line to in order to apply this change on every startup, ideally right from the login screen? – fviktor Jul 22 '15 at 5:59
  • Does anyone know if it it possible to automate this when the laptop sees the new HDMI monitor? – Neil Wightman Jul 10 '18 at 8:03
  • @NeilWightman I would assume so. The OS knows that the HDMI is plugged in, so can trigger an event, to run a script. However I have never done it. – ctrl-alt-delor Jul 10 '18 at 12:09
  • @NeilWightman A Startup Application at login can check for hdmi before turning off the laptop screen with "xrandr | grep -q 'HDMI-0 connected primary' && xrandr --output LVDS-0 --off" – yoyoma2 Feb 27 '19 at 14:33

On Ubuntu 20.04 all I have to do is close my laptop lid and the display shifts to recognise only the attached monitors.

Note that I'm using a ThinkPad T480s connected via the provided docking station though (though through HDMI, one through DisplayPort), so I don't know if that makes any difference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.