Configuring the Second (and/or Third) Monitor in Ubuntu

There was a time, back in the day, when having two screens on a computer was the sole privilege of advanced workstations used by graphics studios and designers. However, those days are long gone and now almost anyone can add a second (or even third) monitor to their PC, even humble Linux users!

To add a second monitor, you need a second video output. This is achieved in one of two ways. First, many video cards on sale today come with two or even three video outputs. Depending on the make, model and price, you can find cards with a variety of video output configurations, including a standard 15-pin VGA output plus a DVI output, or two DVI outputs, or a DVI and a HDMI or even VGA, DVI and HDMI. The other way of getting two video outputs is to use two video cards. For example, many motherboards have on-board video, and on some models, if you add a 3rd party video card (via the PCI Express slot), the on-board video can be re-activated in the BIOS as a secondary video output. In fact, using this trick and a video card with two outputs, it is possible to support three monitors!

video-card-with-vga-and-dvi

Before looking at how to configure Ubuntu Linux with multiple monitors, it is worth looking at the compatibility issues between VGA, DVI and HDMI. In a nutshell, VGA only carries analogue signals. DVI can carry both analogue (as long as it has the four extra pins around the flat blades on the connector) and digital. HDMI is a digital only system. The second monitor you connect needs to have the corresponding connectors. Because DVI can carry both analogue and digital signals, it means that a VGA output can be connected to a DVI monitor using an inexpensive converter, but a VGA output can not be connected to an HDMI port (or vice versa) without a very expensive analogue to digital converter.

Connect your second monitor to your Ubuntu PC and boot it. It is likely that Ubuntu will make a good attempt to configure the second monitor automatically. However, it has no way of knowing if your second monitor is to the left or right of your main display. To configure the second monitor, go to “System Settings -> Displays”.

ubuntu-two-monitors

The top part of the configuration window will show you how many monitors Ubuntu has detected along with their names. You can click on any of the monitors and move them. So if your secondary monitor is on the other side, click to grab the monitor and move it. You can also place the secondary monitor above or below the primary monitor.

Below the monitor positioning, there are several options that are applied on a per monitor basis. To set the screen resolution for any given monitor, click on that monitor in the top section, and then select the resolution from the drop down list.

ubuntu-two-monitors-launcher

The Ubuntu launcher can be configured to appear on all monitors (the default) or just on one of them. Depending on how you use your system, removing the launcher from the second monitor can be useful, especially if the secondary monitor is to the right of your primary monitor and you want applications to extend over both monitors. However, unless you have ultra thin bezels on your monitors, this isn’t likely to be practical!

ubuntu-two-monitors-live

It is also possible to mirror the displays rather than extending the desktop over both monitors. This is useful for giving demonstrations or in other situations where you aren’t looking at the second monitor but rather it is being watched by a 3rd party. To enable mirroring, just tick the “Mirror displays” checkbox.

Multiple monitor support should work out-of-the-box with Ubuntu, but if you do have any questions please ask them in the comments section below and we will see if we can help.

14 comments

  1. Hi i followed the guide to set up my monitors. I have a hp pavilion dv6000 laptop and i hooked up a samsung syncmaster 712n monitor to it via VGA. I have both resolutions set to 1024 x 768 (4:3) but on my laptop screen on the sides there is a black border on the sides

    • Harris, yes that is right because you have set the screen resolution on the laptop to be less than its native screen resolution and it is handling this by inserting those black bars. You don’ t need to have the external monitor and the LCD screen on the same resolution they can be different. Just set the laptop screen resolution to its native size and everything will be fine. Gary.

      • The native resolution is 1280 x 800 (16:10) but when i go to change it to that it wants me to set the rotation as either clockwise or counter clockwise it wont stay as normal

        • Harris, I see. To help you more I will need as much information as possible. Unfortunately I don’ t have a HP laptop here to try your configuration. Can you please give us some more like:

          What version of Ubuntu are you using?
          Does you need to set rotation when you don’t have the external monitor attached?
          Can you run Ubuntu in the native 1280 x 800 resolution when the monitor isn’t attached?
          Are you able to set the amount of video RAM in the BIOS?
          Is the mirroring box checked?
          On the virtual panel where are the monitors placed, next to each other? on top of each other?

          Thanks, Gary

          • 1. Ubuntu 13.10
            2. No without the second monitor in i do not need to rotate screen.
            3. Yes i can run 1280 x 800 resolution without the 2nd monitor
            4. Unknown
            5. No mirroring box is not checked
            6. The monitors are next to each other external on left laptop screen on right

  2. I’ve got two large monitors, and I am trying to get rid of the panel from the top of one of them. Ubuntu 14.04 with unity seems to be the least configurable operating system I’ve used in a long while. Any suggestions? From what I’ve seen Shuttleworth doesn’t seem to want court pc users any more, so there isn’t a fix. As of now I haven’t seen a work around for this or to install cinnamon on ubuntu 14.04 . If you have an option to do either please let me know.

  3. I had the problem of the second monitor being stuck in clockwise or counter clockwise with no option for normal. After several attempts, I ended up changing the resolution on the second monitor to less than full and then I had the options for normal and 180 degrees in addition to the other rotations.

  4. after installing Ubuntu 14.04, I encountered a problem where my DVI monitor’s resolution was not listed in `xrandr -q`, so I had to `sudo gedit /etc/default/grub` to add a line for the `nomodeset` command. a DVI monitor is a thing of the past…

  5. Running Ubuntu 14.4 on Dell Optiplex 350
    Installed additional video card (dvi) with vga adapter and plugged in. Ubuntu recognizes secondary monitor, and insists its the primary, and wont use original monitor or motherboard video card. Any ideas?

  6. I have a Dell Latitude hooked to a port replicator with 2 DVI outputs. Right now, i’m running Win7 and am using 3 screens (primary laptop screen and 2 screens connected via port replicator). I was trying out the Ubuntu Live-CD today. Ubuntu only detected 2 screens, the primary laptop screen and the other 2 showed a cloned desktop. Any chance to get a 3 screen setup working?

  7. Hi,
    I am struggling to get my second external monitor set up with Ubuntu. The fist one works just fine extended with my laptop monitor. But it mirrors the first external display into the second display without detecting it.
    Is there a way to resolve this problem?
    My laptop is a lenova x240, running ubuntu 14.04 LTS desktop. One external Display is connected by HDMI and the other one VGA.

  8. yes I did, this is what it shows when running xrandr –current
    Screen 0: minimum 8 x 8, current 3286 x 1200, maximum 32767 x 32767
    eDP1 connected primary 1366×768+0+0 (normal left inverted right x axis y axis) 277mm x 156mm
    1366×768 60.0*+
    1360×768 59.8 60.0
    1024×768 60.0
    800×600 60.3 56.2
    640×480 59.9
    DP1 disconnected (normal left inverted right x axis y axis)
    HDMI1 disconnected (normal left inverted right x axis y axis)
    DP2 connected 1920×1200+1366+0 (normal left inverted right x axis y axis) 518mm x 324mm
    1920×1200 60.0*+
    3840×1200 60.0
    2560×1024 60.0
    1600×1200 60.0
    1680×1050 60.0
    1280×1024 60.0
    1440×900 59.9
    1280×960 60.0
    1280×800 59.8
    1024×768 60.0
    800×600 60.3 56.2
    640×480 60.0
    HDMI2 disconnected (normal left inverted right x axis y axis)
    VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Comments are closed.

Sponsored Stories