Posts Tagged ‘Graphics’

XRandR – finally, simple monitor configuration for Linux

Thursday, December 6th, 2007

The most recent Linux distribution releases – Ubuntu 7.10, Fedora 8 and so on – are now shipping with version 1.2 of the XRandR extension for the X server. This allows the user to dynamically change resolutions, refresh rates, and – this is the really impressive thing – switch monitors on and off on the fly. All of this, without ever having to edit xorg.conf, or restart the X server, or reboot. This was one of the major things that the Linux desktop lacked compared to other major operating systems.

Until very recently, using my external monitor with my laptop required several irritating customisations – you can see the details in my earlier post:

  1. To have it switch on, and run in Xinerama mode along with my laptop panel, required fiddling with MetaModes and other fiddly settings of the radeon driver.
  2. To drive it at its native resoution (1440×900) i had to add a custom modeline to xorg.conf (except on Fedora, for some reason).
  3. If the X server originally started without the external monitor attached, then it would have to be restarted to detect the monitor once it was attached. And restarting X means having to log out and lose all my application state.

XRandR 1.2 has removed all three of these irritations. It requires (almost) no preconfiguration, autodetects all resolutions correctly, and detects monitors when they are plugged in without a restart.

Let’s take a brief look at some of what XRandR can do: this is basically what I do with it daily. Note that at the moment graphical tools to control XRandR are still under development and none are really at a releaseable state (in my opinion); but now that the infrastructure exists in the X server and the drivers, tools to control it will come soon. What I use here is the command-line tool, sensibly named xrandr. (more…)

Ubuntu + widescreen monitor + radeon + AIGLX + beryl

Sunday, December 17th, 2006

Wohoot! I’ve finally managed to get my 1440×900 widescreen monitor working with the open-source radeon (r300) driver instead of ATi’s proprietary fglrx driver. Turns out I just needed the right “Device” section:

Section "Device"
Identifier "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
Driver "ati"
BusID "PCI:1:0:0"
Option "DDCMode" "true"
Option "MonitorLayout" "LVDS, TMDS"
Option "MergedFB" "true"
Option "MetaModes" "1024x768+1440x900"
EndSection

and, especially, a special modeline for the 1440×900 mode:

Section "Modes"
Identifier "Modes"
Modeline "1024x768" 76.16 1024 1080 1192 1360 768 769 772 800
Modeline "1024x768" 64.11 1024 1080 1184 1344 768 769 772 795
Modeline "1440x900" 100.000 1440 1456 1464 1480 900 916 924 940 -hsync -v
sync
EndSection

and then the right display settings:

Section "Screen"
Identifier "Default Screen"
Device "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1440x900" "1024x768"
Virtual 1440 900
EndSubSection
EndSection

Even better, AIGLX compositing just works with the open-source drivers; so after installing Beryl I have all the fancy window effects without the hassle and complication of running the Xgl server that you have to use with the fglrx drivers. Admittedly, 3D is somewhat slower with the open-source drivers than it was with the ATi drivers, but it’s not as if I use 3D stuff a lot.