Some background: My old, well-loved laptop has kicked the bucket. The normally well-backlit screen is entirely, illegibly darkened. It seems to my inexpert inspection to be a hardware problem well beyond my ken.

My actual question regards my adaptation to this situation: I can still use the computer by attaching another monitor to the laptop and using that to satisfy my graphical needs. The default dual-screen behavior of Ubuntu is to treat the screens as a side-by-side affair, which is irksome since i can only see what's being displayed on one of the screens. I would like to configure Ubuntu (or xorg, or what have you) to treat an attached screen as the single working screen, such that it does not attempt to use the built-in screen in any way.

I've considered (but not actually tried to make the default) the Mirror Displays option available in System Settings (in 14.04), but this seems to result in awkward resolution changes in an attempt to accommodate both screens (even though one of them I'm not concerned with in the slightest). I figure that if I'm lugging this laptop about to plug into many other available monitors, this would probably lead to some hair-splittingly weird visual inconsistency.

My more reasonable solution is to just try to use xrandr to turn off the offending screen. In particular,

xrandr --output LVDS1 --off

appears to do what I was hoping, but this seems like a rather low-hanging, impermanent fix. (LVDS1 is the name of my built-in screen as X knows of it, as revealed by xrandr -q.) I'm hoping to use something a bit deeper, so that I can be certain that I can use this laptop even in situations where I wouldn't have an X server running, say.

  • I used to have your problem. As I no longer have the laptop and therefore cannot test this, I'm putting this as a comment rather than as an answer. Go to System Settings > Screen Display. Both screens will be displayed in the GUI. Select the one that doesn't work and turn it off. You can also set the resolution for your attached monitor. The settings take effect only after logging on, so you may need to log out and in again (or reboot). Let me know if it works. Jan 6 '15 at 13:45
  • To my surprise, @PaddyLandau's approach seems to do essentially the same thing as the xrandr command I posted. If you post this as an answer, I'll happily accept it.
    – matthugs
    Jan 10 '15 at 23:21

xrandr is a difficult way to perform this; I don't recommend it.

Go to System Settings > Screen Display.

You will see both of your screens.

By selecting a screen, you can modify its defaults such as its resolution — and you can turn it off altogether (slide the ON button to OFF).

Be sure to locate the Launcher on "All displays" so that you don't end up missing the launcher.

The settings should be remembered after rebooting.

  • This used to work fine in 14.04 LTS but in 16.04 LTS the laptop screen gets turned back on after every login/reboot. The xrandr trick in a one line bash script Startup Application worked around this bug. A check that the hdmi screen was connected ensures the only output isn't turned off. "xrandr | grep -q 'HDMI-0 connected primary' && xrandr --output LVDS-0 --off". The popups like Empty Trash confirmation would appear on the out of sight laptop screen so keeping it off is important.
    – yoyoma2
    Feb 27 '19 at 14:21
  • Is the option to turn off a display no longer available? I cannot see the option in the 20.04 Screen Display settings UI. Oct 21 '20 at 15:48
  • @AlexSpurling — I don't know, sorry. I no longer have two screens. If you right-click the desktop and select Display Settings, you might see something useful. Otherwise, maybe you can post a new question. Oct 21 '20 at 17:30

Not what you're looking for exactly, but remember you can always access your computer even without any local screen - as long as you have networking configured so that it is ready upon starting. When you install sshd on the computer you can always log in via ssh from a second machine, and reconfigure your X.

  • Yeah, that was my initial thought as to how I was going to continue to use the machine. I initially hooked up the monitor to ease the process of configuring sshd (since I haven't done so before).
    – matthugs
    Jan 10 '15 at 23:27

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.