Αναρτήθηκε από: ktogias | Ιουνίου 11, 2008

External monitor configuration with ATI Radeon mobility X700 laptop, X.org and xrandr

From 04 Feb 2010 ktogias blog has been moved to blog.ktogias.gr. To read updates and new comments and comment on this post please go to:  http://blog.ktogias.gr/2008/06/11/external-monitor-configuration-with-ati-radeon-mobility-x700-laptop-xorg-and-xrandr/

This afternoon I received a new 22″ (1680×1050) LCD monitor for use with my laptop. My laptop is an ACER Aspire 1692WLMi. It has an ATI Radeon Mobility X700 PCI Express graphics card with VGA out and a build-in 1280×800 display. ATI Radeon Mobility X700 is able to display resolutions up to 1920×1200 px. I run ubuntu linux 8.04 on the laptop. After about four hours of experimentation and tweaking I finally made it to set up X in a way that enables me to switch from the build-in monitor to the external and vice versa, auto-configuring each monitor to its native resolution. So here is the recipe:

Ingredients:

  1. A laptop with ATI Radeon Mobility X700 PCI Express graphics card (any pc with an ATI Radeon card may be ok)

  2. An external monitor with VGA input.

  3. X.Org X Server 1.4.0.90 with RandR version 1.2

  4. ATI 6.8.0 open source driver

  5. xrandr utility

Ingredients 3 to 5 come with ubuntu linux 8.04, but can also be found in many other unix based modern operating systems.

Process:

The proposed process includes editting X.org configuration file and needs basic skills and maybe some experience in editing linux configuration files. In any case keep a backup of xorg.conf before start messing with it.

  1. Edit /etc/X11/xorg.conf ‘s Device section to use ati driver – the opennsource ati driver, not the fglrx one – (omitting the driver directive from my Device Section made X auto select and use ati opensource driver)

  2. Edit /etc/X11/xorg.conf ‘s Screen Section and add the Modes you want to use with your monitors (both monitors’ native resolutions should be listed) to Display subsection.

  3. Into the Display Subsection set Virtual display size to the maximum of your displays’ resolutions.

  4. Use xrandr to switch beetween the monitors. In my case:

    To turn off the build-in display and switch to the external display at a resolution of 1680×1050 I run:

    xrandr –output LVDS –off –output VGA-0 –mode 1680×1050

    To switch back to build in monitor I run

    xrandr –output LVDS –auto –output VGA-0 –off

I also attach my xorg.conf (excuse me for the odt format, but wordpress.com does not allow uploads of plain text files) as reference and a couple of bash scripts I have made in order to not have to type in the above options. The scripts are called display2vga.sh and display2lvds.sh and running them you switch to vga external monitor or to lvds build in monitor respectively. I have also created launchers for each of the scripts at my gnome menu and thus I can switch monitors with a click. Finally I put display2vga.sh to my session startup programs list, so that when I log in to the machine and the external monitor is connected the display is automatically transferred to it (the check is performed from the display2vga.sh script – if the monitor is not connected it does not try to switch – ).

One could try more advanced configurations with xrandr. See xrandr’s man page for more info on how you can have both monitors enabled and your desktop spanned between them.

Advertisements

Responses

  1. Excuse me, BUT HOW LONG WE MUST WAIT FOR THAT TIME WHEN WE PLUG AN EXTERNAL MONITOR AND IT JUST WORKS??

    I ‘ve been trying as a linux newbie to do so for 3 years and it is always the no1 reason I switch back to windows.

    Well, it took YOU 4 hours to do such a simple thing…! And it is 2008..!

  2. I think that we will not have to wait for long… Randr and xrandr make the configuration much easier, but are still young. Once they are matured enough and supported by the ventors’ drivers the configuration of monitors will be a matter of seconds, not hours.

    And here we come to the main problem: Things would be much – much easier if the community had all the specs to build efficient drivers for the various graphics cards. But we have not, and we depend on hardware ventors to write closed drivers that can not catch up with the pace the rest of X system evolves.

    In my case trying to configure with the proprietary closed source fglrx driver took about 80% of the time spend. ATI’s fglrx version that comes with ubuntu 8.04 simply does not understand randr! Once I gave up and switched to the opensource ATI drivers the only thing I had to do was to find out and give the right options to xrandr, an easy and quick task as it only involved reading the xrandr’s man page and doing a single google search.

  3. You are on the lucky side because my embedded X1150 isn’t properly supported by the opensource driver, even compiz doesn’t work…

    In any case, I do agree with you, full specs are what we need OR proper support by ATI. But since ATI doesn’t provide either of them… I am doomed! :-p

  4. Good blog post, ktogias, and most helpful for those of us who are not too technically inclined. I can recommend a small program made by a member of the Dutch Ubuntu Forum that takes out a lot of the pain involved in setting up monitors. It, like your script, makes use of xrandr, but also has a GUI. More information can be found on this page: http://projects.dvdmeer.nl/python-randr/index.php
    Sorry, but most of it is in Dutch, although it should be self-explanatory.

  5. Hi there,

    This howto was almost what I was looking for!!
    I have a laptop with the same graphics card as yours. The difference is that my external monitor is a 20inches – 1680×1050 capable.
    Anyway my xorg.conf is pretty much as yours (the critical sections are copy-paste from yours) but
    xrandr refuses to cooperate…
    It keeps saying «Cannot find mode 1680×1050».
    When I query for the monitors (xrandr -q) it outputs that maximum resolution is 1680×1050 but it seems that it cannot achieve it…
    If you have any idea I would be very greatful!

  6. Can you paste somewhere (at a pastebin) the output of xrandr -q and you xorg.conf file and give me link to have a look?

  7. I figured a solution after experimenting for several hours.
    Anyway I had to set a value larger than 1680×1050 in the Virtual option in xorg and it finally worked!
    I cannot tell if that is the way it should be, but I came up to this sollution after reading several HOWTO’s on the net.
    Thank you very much for your time and also for the very helpful guide


Kατηγορίες

Αρέσει σε %d bloggers: