donderdag 28 mei 2009

Jaunty, ati/radeon and a big desktop with xrandr

Buggers, my ati card is no longer supported by the fglrx driver of ati. Full 3D support is present though in the open source driver. Big desktop over two screens? Well 'man radeon' claims it is present. However, I noticed also bug 348332

So I waited with the upgrade, but today, I felt lucky and did the upgrade. Not a good idea.

First, although the upgrade manager said fglrx would not be installed, it did not regenerate my xorg file. So X crashed on startup. Alt+F1, a login and a "sudo dpkg-reconfigure -phigh xorg-server" later, I had my X back.

I got bit by bug 348332 very quickly though, so disabled desktop effects in the system settings for now. No option to make a big desktop in these settings though, so apparently that will be a manual install.

But first getting my effects back. A trip to http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.29.4/ and then install of the relevant components:
sudo dpkg -i linux-headers-2.6.29-02062904_2.6.29-02062904_all.deb linux-headers-2.6.29-02062904-generic_2.6.29-02062904_amd64.deb linux-image-2.6.29-02062904-generic_2.6.29-02062904_amd64.deb


After restart things looked ok:
$ uname -a Linux bmwork 2.6.29-02062904-generic #02062904 SMP Sat May 23 23:35:48 UTC 2009 x86_64 GNU/Linux
And re-enabling desktop effects was ok too. Still waiting for a crash, but all looks good so far.

So, now, how to get my big desktop back. My setup is using the default xorg.conf the radeon driver. My xorg.conf:

Section "Device"
Identifier "Configured Video Device"
EndSection

Section "Monitor"
Identifier "Configured Monitor"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
Apparently we are supposed to use xrandr (see good intel guide) now for enabling a big desktop. First let's see if it is enabled:
$ xrandr -q
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1280 x 1280
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 340mm x 270mm
1280x1024 60.0 + 75.0 60.0
1024x768 75.0 70.1 60.0*
800x600 75.0 60.3
640x480 75.0 59.9
720x400 70.1
DVI-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
1024x768 60.0*+ 75.0 60.0*
800x600 75.0 60.3
640x480 75.0 59.9
720x400 70.1
OK, my VGA and DVI output are both recognized and correctly enabled, one with identifier VGA-0 and one with DVI-0. The default is clone mode though, which is what I indeed am seeing. To set my VGA left of the DVI I do:

$ xrandr --output VGA-0 --left-of DVI-0
xrandr: screen cannot be larger than 1280x1280 (desired size 2048x768)
It did not work. We need to make sure we can have a virtual screen of 2048x768 before above will work. The graphics card should be capable of this. My /var/log/Xorg.0.log file says:
(II) RADEON(0): Max desktop size set to 2560x1600
(II) RADEON(0): For a larger or smaller max desktop size, add a Virtual line to your xorg.conf
(II) RADEON(0): If you are having trouble with 3D, reduce the desktop size by adjusting the Virtual line to your xorg.conf
So add a Virtual line (see xorg.conf below), and all works.
Next, as given in the guides, you need to use xrandr commands to see if it works. Well, I can say it does not work 100% via the xrandr command in my case. The desktop got bigger indeed, but both screens kept showing the same thing. Fortunately, changing the xorg.conf file to do the xrandr settings worked like a charm. My new xorg.conf file is:

Section "Monitor"
Identifier "VGA"
EndSection

Section "Monitor"
Identifier "DVI"
Option "RightOf" "VGA"
EndSection

Section "Device"
Identifier "Configured Video Device"
Option "Monitor-VGA-0" "VGA"
Option "Monitor-DVI-0" "DVI"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"

SubSection "Display"
Depth 24
Virtual 2048 768
EndSubSection
EndSection
Things to note in the above:
  1. The options in the Device section you see, must have the identifier as given by the xrandr -q output, so Option "Monitor-VGA-0" "VGA" works but not Option "Monitor-VGA" "VGA"
  2. The Virtual 2048 768 line in Display is where the maximum virtual size is set (see xrandr error above) you need for your display. Take it as low as possible, so you can have as much as possible depth (it eats memory on the card!)
Good. Half a day to get a working set-up. Perhaps I should not upgrade so often. Fortunately, 3D does seem to work like a charm on my dual head setup :-)