Saturday, August 25, 2007

XRandr 1.2 on RS480 (200M)

I'm excited!

Dave Arlie merged xrandr 1.2 support into the ati driver this week. I had a bit of trouble getting it working, but finally succeeded. To help save others the trouble of figuring out what they need to do, I thought I'd post it here.

You don't need to change much in your xorg.conf. You just need a "Virtual " line in the Display section:

Section "Screen"
Identifier "screen0"
Device "ati"
Monitor "LVDS"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Virtual 2560 1824
EndSubSection
EndSection


The xorg doesn't need to have (and shouldn't have) anything related to multiple screens and monitors.

Current (at the time of writing) versions of the kde xrandr tray icon (and gnome iirc) don't do the right thing. Instead, I use the following scripts to switch modes:

nigel@home:~$ cat wide-display
#!/bin/bash

xrandr --auto
xrandr --output LVDS --rotate normal
xrandr --output VGA-0 --auto
xrandr --output VGA-0 --mode 1280x1024
xrandr --output VGA-0 --left-of LVDS
sudo chvt 1
sleep 2
sudo chvt 7

nigel@home:~$ cat cloned-display
#!/bin/bash

xrandr --auto
xrandr --output LVDS --rotate normal
xrandr --output VGA-0 --auto
xrandr --output LVDS --mode 1024x768
xrandr --output VGA-0 --mode 1024x768
xrandr --output VGA-0 --same-as LVDS
sudo chvt 1
sleep 2
sudo chvt 7
nigel@home:~$nigel@home:~$ cat normal-display
#!/bin/bash

xrandr --auto
xrandr --output LVDS --rotate normal
xrandr --output VGA-0 --off
xrandr --output LVDS --mode 1280x800
nigel@home:~$

As you'll notice, I seem to need a number of commands to get the desired result. I'm not sure whether it's because xrandr is still work in progress, or because there are still rough edges to the ati driver's implementation. Hope the above helps someone.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home