Suramya's Blog

Visit suramya.com Who am I?

March 3, 2012

Configuring Dual monitors in Debian

Filed under: Knowledgebase,Linux/Unix Related,Techie Stuff,Tutorials — Suramya @ 12:01 AM

[Update 8th Aug 2012: This is an older method of setting up the monitor kept for historic reasons. In the newer version of KDE the process is a lot simpler, please refer to this post for the updated steps - Suramya.

Recently I went ahead and bought two new Dell 20" monitors for my home system as I had gotten used to working with two monitors at work and wanted the same experience at home as well. The problem started because initially I tried installing another graphics card and hooking up the second monitor to that card using VGA. For some reason maybe because I was to tired and wasn't thinking clearly, I couldn't get both the cards to work at the same time. I would get one or the other but not both. To make things even more fun, the monitors are 16:9 aspect ratio and when I used the Opensource driver the only resolution with that aspect ratio I would get was 1600x900 which was too small and the fonts looked kind of jagged at that resolution.

Since I was going to be out of town and was planning on switching to DVI cables anyways I left the system like that (after spending a bit of time experimenting) and left. Once I got back I ordered DVI cables and finally managed to get the dual monitor setup working after spending about an hour one the issue. Below is the sequence I followed to get stuff to work (documenting this so that if I ever have to do this again I have a record of what I did):

  • Removed the second video card to reduce complexity. Might add it back later if required, or if I want to hook my old monitor as a third display.
  • Connected both monitors to the onboard ATI Radeon HD 4250 card, one over DVI and the second using VGA
  • Removed the Proprietary ATI and nVidia drivers (both installed in my previous attempts to get this working). Instructions here
  • Restarted X
  • Installed Catalyst (a.k.a fglrx) a proprietary "blob" (closed source binary) driver, using the following command:
  • apt-get install fglrx-atieventsd fglrx-control  fglrx-driver fglrx-glx fglrx-modules-dkms glx-alternative-fglrx libfglrx libgl1-fglrx-glx libxvbaw

Once the driver was installed I restarted X once again and got both monitors working, but the second monitor's display was a clone of the first one which is not what I wanted so I had to do some more digging and finally managed to fix that using the following steps:

  • Open a terminal/Command Prompt
  • Disable access control so that clients can connect from any host by issuing the following command as a regular user
  • xhost +

    This is required so that we can start a GUI command from a root shell. If we don't do this you will get an error similar to the following in the next step:

    No protocol specified
    No protocol specified
    amdcccle: cannot connect to X server :0
  • Run 'Ati Catalyst Control Center' as root
  • sudo amdcccle
  • Click on 'Display Manager' and configure your monitors (Resolution, location etc)
  • Click on 'Display Options' -> 'Xinerama' and enable 'Xinerama'
  • There is a bug in the display manager that prevents it from saving any changes if the xorg.conf file exists, to fix:

  • Run the following command as root:
  • mv /etc/X11/xorg.conf /etc/X11/xorg.conf_original
  • Click 'Apply' in the Catalyst Control Center
  • Restart X

That's it. Once I did all that, my dual monitor setup started working without issues. Well... mostly. For some reason my desktop effects have stopped working (Transparent/Translucent windows etc) but I am not going to worry about it for now. That's a battle for another day, maybe over the weekend.

Please note, that setting up Dual monitors usually is not this complicated in Linux. When I hooked up my TV to this same system I didn't have to make any changes to get it to work. In this case since I was fiddling around I had to fist fix the mess I made before I was able to get this to work properly.

For those of you who are interested, the final xorg.conf that the above steps created is listed below:

Section "ServerLayout"
        Identifier     "amdcccle Layout"
        Screen      0  "amdcccle-Screen[1]-0″ 0 0
        Screen         “amdcccle-Screen[1]-1″ 1440 0
EndSection

Section “ServerFlags”
        Option      “Xinerama” “on”
EndSection

Section “Monitor”
        Identifier   “0-CRT1″
        Option      “VendorName” “ATI Proprietary Driver”
        Option      “ModelName” “Generic Autodetecting Monitor”
        Option      “DPMS” “true”
        Option      “PreferredMode” “1440×900″
        Option      “TargetRefresh” “60″
        Option      “Position” “0 0″
        Option      “Rotate” “normal”
        Option      “Disable” “false”
EndSection

Section “Monitor”
        Identifier   “0-DFP1″
        Option      “VendorName” “ATI Proprietary Driver”
        Option      “ModelName” “Generic Autodetecting Monitor”
        Option      “DPMS” “true”
        Option      “PreferredMode” “1440×900″
        Option      “TargetRefresh” “60″
        Option      “Position” “0 0″
        Option      “Rotate” “normal”
        Option      “Disable” “false”
EndSection

Section “Device”
        Identifier  “amdcccle-Device[1]-0″
        Driver      “fglrx”
        Option      “Monitor-DFP1″ “0-DFP1″
        BusID       “PCI:1:5:0″
EndSection

Section “Device”
        Identifier  “amdcccle-Device[1]-1″
        Driver      “fglrx”
        Option      “Monitor-CRT1″ “0-CRT1″
        BusID       “PCI:1:5:0″
        Screen      1
EndSection

Section “Screen”
        Identifier “amdcccle-Screen[1]-0″
        Device     “amdcccle-Device[1]-0″
        DefaultDepth     24
        SubSection “Display”
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section “Screen”
        Identifier “amdcccle-Screen[1]-1″
        Device     “amdcccle-Device[1]-1″
        DefaultDepth     24
        SubSection “Display”
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Hope all this made sense and helps someone. If not feel free to ask questions.

- Suramya

1 Comment »

One Response to " Configuring Dual monitors in Debian "

  1. [...] but this time it was fairly simple. I thought that I would follow the same steps I had the last time I installed the monitor so I started by installing the fglrx driver but the latest version of the driver no longer supports [...]

    Pingback by Suramya's Blog » Reinstalled system after accidental removal of KDE. Pleasantly surprised by ease of configuration — August 4, 2012 @ 11:19 PM

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress