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.

Wednesday, August 15, 2007

How to enable Compiz under Gutsy.

If there's one thing that I dislike about the way people design computer software, it's got to be the tendency to make it hard to configure. A good example is the question of how to get Compiz going under Gutsy. I've just upgraded my laptop to the current set of packages, and in addition to that, have built the latest Xorg git, so as to see the progress on RS480 support. Having gotten that done, the question becomes... "How do I start compiz?"

1) I used to use Beryl-manager... nope. Not there any more.
2) How about manually starting compiz? Nope. It complains that some other GL window manager is already running.
3) Grep ps for this other window manager. Nothing obvious. Kill what WMs are running and it still won't start.
4) Google. No help this time.
5) Reboot, reinstall, re... nope.
6) Eventually decide to change my wallpaper (right click on desktop and select "Change Desktop Background"). Oooh. That's a misleading name. There are tabs for your theme, background, fonts, interface and right at the end there's one that says "Desktop effects". Click there and you get radio buttons "No effects", "Normal effects" and "Extra effects". Voila!

So now I'll go open a bug (or +1 an existing one) for the misleading menu item name.