Home > Linux > Configure Dual Head with ATI in Ubuntu 9.04

Configure Dual Head with ATI in Ubuntu 9.04

April 24th, 2009

23rd April Ubunty 9.04 Jaunty Jackalope got released. I upgraded my home comp yesterday, and now did my workstation at work today. At home I have an nvidia graphic card, and the upgrade went flawless. At work I have an ATI card and was using the fglrx driver, which seems to be discontinued or something in Ubuntu 9.04.

I did try and upgrade at work yesterday, however I got a warning about the fglrx driver not existing in the next version, so I didn’t go ahead. However since everything went smooth at home I decided to go straight ahead and upgrade my work comp as well today. Things mostly went fine, except I kinda had 2 issues I need to fix asap at work while installing Ubuntu, and I was leaving for a long lunch. During the actual install off the downloaded packages the network driver got disabled, so I was unable to work for about 25 mins.

I did however manage to resolve the issues (well, 1 issue was a IE bug that my superior resolved by saying I should just tell the user to install FireFox (I will justify this at the end off the post)). However, after rebooting my x setup was in clone mode rather than dual head. Which feels like a waste when you have 2 monitors. I tried installing the fglrx driver that is in the Jaunty repository, but that just crashed my computer, and the aticonfig utility didn’t even detect my card for automatic setup.

After going a bit back and forward, it seemed I was going to be stuck with clone mode setup for my 2 monitors, which I was not to happy about. I needed to dig deeper and find some docs on how to actually setup 2 monitors. It turns out that the ati driver in xorg, is just a front package for 3 different ati drivers, and from those 3 drivers I was using the radeon driver. From the docs in that package I was able to locate a page on the debian wiki about the radeon driver. It also deals with the randr util.

Checking through my xorg.log file, I did see that the driver did in fact detect my 2 monitors, I just needed to figure out how to configure xorg.conf to properly use them. I tried various solutions and approaches, and I finally got something working:

Section "Device"
  Identifier    "ATI 1"
    Option "Monitor-DVI-0" "Monitor 1"
    Option "Monitor-DVI-1" "Monitor 2"
  EndSection

  Section "Monitor"
    Identifier    "Monitor 1"
    Option    "RightOf" "Monitor 2"
  EndSection

  Section "Monitor"
    Identifier    "Monitor 2"
  EndSection

  Section "Screen"
    Identifier    "Screen 1"
    Monitor        "Monitor 1"
    Device        "ATI 1"
    SubSection "Display"
      Depth           24
      # big virtual screen to place
      Virtual         3360 1050
    EndSubSection
  EndSection

Now I need to explain some details about this setup. Since I have 2 monitors, I just need to define 2 “Monitor” sections in the config file, and in one off them I specify that it’s to the right off the other monitor. I then need to refer to these 2 monitors in the Device section. The way I do this is via the options “Monitor-DVI-0″ and “Monitor-DVI-1″ under the “Device” section. The option names are important here. They need to start with “Monitor-” followed by the device identifier. The device identifier you can find using xrandr. If I run xrandr on my comp, I get the output:

Screen 0: minimum 320 x 200, current 3360 x 1050, maximum 3360 x 1050
DVI-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 473mm x 296mm
   1680x1050      59.9*+
   1280x1024      75.0     60.0
   1152x864       75.0
   1024x768       75.0     60.0
   800x600        75.0     60.3
   640x480        75.0     59.9
   720x400        70.1
DVI-0 connected 1680x1050+1680+0 (normal left inverted right x axis y axis) 473mm x 296mm
   1680x1050      59.9*+
   1280x1024      75.0     60.0
   1152x864       75.0
   1024x768       75.0     60.0
   800x600        75.0     60.3
   640x480        75.0     59.9
   720x400        70.1

As you can see here, I have 2 lines starting with a monitor identifier (mine are “DVI-0″ and “DVI-1″). You will also see the same identifiers several places in your xorg.log file. You also need to set the Virtual display size in the “Screen” section. I tried without this first, and ended up with half my monitor being garbled, as the max resolution got set to 2560×1600 or something, less than I need.

If you are going to use my setup on your own comp, you of course need to adjust values to your display setup. Also check what actual identifiers you get for your monitors. My setup is working great with the open source ati drivers, and I also got compiz to work fully. Now I just need to figure out how I can replace xfwm4 with compiz on my home computer, but that is something for a later date.

As for requiering our users to use FireFox instead off IE, the application I am making will in the end have a single client on a single computer, placed on a boat. Since we control everything about this, requiring that one browser is FireFox doesn’t seem like that big off a deal. There will actually be others using parts off the app as well from other browsers, but not the data entry view which has all the JavaScript magic.

Staale Linux

  1. ryan
    April 29th, 2009 at 23:31 | #1

    Great write up. It’s the first I was able to find that made any sense. Got several of my QA team’s dual head displayed fixed thanks to you. Thanks a million!

  2. Juan
    May 2nd, 2009 at 08:13 | #2

    Thank you so much! You are a genius. I was bumping my head against this problem for a day and a half and was unable to find a solution until I read this. I looked all over the Ubuntu docs but didn’t think to look at Debian. It fixed the problem on Kubuntu.

  3. May 4th, 2009 at 22:08 | #3

    THinkpad T61: Kubuntu 9.04/Intel GM965/laptop monitor+ Lenovo 20″ LCD

    xrandr –output VGA –mode 1440×900 –pos 1440×0 –output LVDS –mode 1440×900 –pos 0×0

    –pos is the key

  4. J
    May 9th, 2009 at 12:06 | #4

    This worked for me, with the exception of having to change
    Section “ServerLayout”
    To reference the screen names you had used.

    Thanks!

  5. May 10th, 2009 at 03:43 | #5

    Thank you! I’ve spent hours after the upgrade and your config with minor modifications worked flawlessly.

  6. Noah
    May 13th, 2009 at 12:53 | #6

    Hi, I have a Jaunty System running with the radeon driver and dual monitors, and all I had to do to configure the second monitor was use the tool Display, under system / preferences.. Just wondering did this work on your system?

  7. May 13th, 2009 at 15:00 | #7

    No, I only ever saw one display show up there, so I couldn’t configure the 2nd monitor. Maybe it was because the ATI card just defaults to clone unless otherwise instructed.

  8. May 23rd, 2009 at 13:31 | #8

    Thank you – much appreciated. Considerably better than Intel’s randr tutorial. Got it working first time on Ubuntu 9.04 with ati radeon x300 (vga + dvi).

  9. Fallen
    May 30th, 2009 at 01:43 | #9

    I have a similar problem, but i have a lcd on my dvi port via vga adapter, the max resolution is 1024×768 and i have my crt on the vga port, max resolution 1280×1024.

    I cannot get them to display at seperate resolutions and i am not linux savvy enough to edit the xorg.conf on my own. I am running kubuntu 9.04 so there shouldn’t be a big difference. I was wondering if you would email me and let me know what you need to help get them to display at seperate resolutions like windows would do as a extended desktop, I am wanting the lcd screen to be the extended desktop.

    I was able to get this set with mandriva with aticccle, but my display server stopped working after an update :\ and I have resorted to returning to kubuntu as it is easier to use and ubuntu normally continues to be stable after updating for me.

    Thx

  10. Fallen
    May 30th, 2009 at 01:44 | #10

    Oh sorry forgot I am not using the fglrx driver this round with kubuntu, last time it was causing problems where randrtray or aticccle would cause my screen to flick and everything would kind of bog down, dunno why…

  11. Doc
    June 22nd, 2009 at 19:47 | #11

    I suspect your answer to Noah is spot on (and Noah, thanks for the pointer). After installing 9.04, my dual head boots into clone (mirror), but a visit to System–>Preferences–>Display gave me the control and the outcome I needed. I’m running a low-end graphics card based on the Radeon X1300 set, BTW.

    And I’m still waiting for the ATI hardware driver…

  1. No trackbacks yet.