8

I am running Ubuntu 12.04. on a Lenovo Thinkpad T400. I connected an external monitor as a second display. The laptop stands under the external screen. The laptop has a native resolution of 1440x900 (16:10), the external monitor 1280x1024 (5:4). There are two graphic adapters: one internal Intel GMA 4500 MHD and an discrete ATI card. Currently, the integrated Intel is enabled.

I use the Displays application to arrange the position of the monitors so it look like this:

Desired display configuration

The problem:
Whenever I restart my computer the configuration gets lost. First, the displays are mirrored instead of extended. I have to press Fn + F7 two times to switch to extended mode. Second, the Displays settings still look like this:

Diplay configuration after restart

I know this worked once when I was running Ubuntu 10.10. I cannot tell since when it does not work. Do you know how I can permanently store the settings?


Sometimes when I start Ubuntu and press Fn + F7 nothing happens. When I open Displays I and position the external screen above and press the "Apply" button nothing happens. Then, after a minute or so the settings apply suddenly. Do you know if there is a log file which could help to analyse the behavior?

5
  • 1
    Running 12.04 on a laptop with an external monitor, I too had problems making the selected config permanent, but after playing around with the hardware selection key, eventually, I kept it from going back to twinview.
    – ubfan1
    Oct 6, 2012 at 22:56
  • Do you want one big extended display (fullscreen windows cover both monitors), or do you want 2 separate X screens (each screen has it's own panels and settings)?
    – Anthony
    Oct 9, 2012 at 3:03
  • @Anthony I want one big screen where I can move application windows from top to bottom and vice versa. The application menu and dock are available on both screens at the moment which is fine.
    – JJD
    Oct 9, 2012 at 13:49
  • @JJD Any success?
    – Anthony
    Oct 12, 2012 at 19:13
  • @Anthony I currently not at my home computer and can't test it :( I will update the thread as soon as I am back.
    – JJD
    Oct 13, 2012 at 18:09

3 Answers 3

3
+25

There are 2 basic approaches you can take. The first is to utilize randr which will allow you to create one large virtual display in which you can position your monitors. The second is to utilize xinerama which will allow you to have 2 separate X screens which will function as one large display. I will cover both here and you can decide which is more appropriate for your needs.


RandR - Resize and Rotate

You can dynamically enable dual head by using XRandR

xrandr --output foo --above bar

There is also a gui frontend for this called arandr which is in the 12.04 repos, but it would seem that you want a more static configuration.

It could be as simple as creating /etc/X11/xorg.conf.d/10-monitor.conf with the contents:

Section "Monitor"
  Identifier     "Monitor0"
EndSection

Section "Monitor"
  Identifier     "Monitor1"
  Option         "Above" "Monitor0" 
EndSection

This method implies an randr setup. There are some notable drawbacks if using xrandr with monitors of different resolutions. Windows may be improperly placed, there may be black areas on one screen, etc..

When you run xrandr without command line options you can find out which Identifier you need to use in your 10-monitor.conf. Then restart Ubuntu to see if the settings are loaded.



Xinerama To enable xinerama you need to modify /etc/X11/xorg.conf:

Section "ServerFlags"
  Option    "Xinerama" "true"
EndSection

It might be as simple as that as X is pretty good about automagically configuring things based on hardware detection. But, if simply turning the xinerama extension on does not provide the functionality you desire, you may opt to fully configure X to use xinerama. There are a few ways to configure X. You could have multiple files in /etc/X11/xorg.conf.d/, some for your monitors, some for the devices, etc. I will cover having a single xorg.conf file that contains all the settings using a modified version of my current setup.

Section "ServerLayout"
    Identifier     "DualHead"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" Above "Screen0"
    Option         "Xinerama" "1"                # You can specify xinerama here
EndSection

Section "Device"
    Identifier     "Device0"                     # A Device section for each monitor
    Driver         "nvidia"                      # Specify the driver to use
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 430"
    BusID          "PCI:1:0:0"                   # Use lspci | grep VGA to find BusID
    Screen          0                            # Do note the screen number
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 430"
    BusID          "PCI:1:0:0"
    Screen          1                            # Do note the screen number
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Gateway HX2000"
    HorizSync       31.0 - 83.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "DELL 1907FPV"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
EndSection

Obviously you will need to modify this to suit your hardware, but the basic skeleton is there for you.

Do note that I have recently read that Intel might have issues with xinerama. You may find yourself needing to utilize your discrete graphics card.

1
  • I do not have xorg.conf located anywhere in my Ubuntu 12.04 and I read that xorg.conf doesn't automatically generated anymore. Also I tried to create a new one using ' sudo xorg -configure' which returned a Fatal Error stating, server is already running for display 0 and gets terminated.
    – Prashere
    Feb 26, 2013 at 6:34
1

I'm not sure if this will work but it's worth a try: Disable the intel; enable the ati; install proprietary ati/amd drivers; configure the dual-monitor desktop how you want it; verify the configuration in the amd catalyst software (admin); check that your setup is now persistent. I have a desktop, but using the catalyst tool was the only way I was able to keep my dual-monitor setup persistent.

1
  • I admit I cannot remember if the ATI adapter was enabled at the time it worked. Though, if possible anyhow I would like to avoid the discrete graphic card since the Intel consumes less power and does not heat up my notebook as much as the ATI does.
    – JJD
    Oct 8, 2012 at 20:55
0

You can manually set the multiple monitor setting in ~/.xprofile. For example, to set permanently extra monitor to the left side of main monitor I type in my ~/.xprofile as follows:

xrandr --output VGA1 --left-of LVDS1

All information is provided from the Ubuntu wiki here: https://wiki.ubuntu.com/X/Config/Resolution

1
  • But I do not want to set the settings permanently. I just want the configuration to be remembered whenever I return to the external monitor.
    – JJD
    Feb 9, 2013 at 12:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .