Sony T2XP

This is a mini howto for installing Ubuntu Hoary on a Sony T2XP (Sony websites are naff and I don’t think that link will last long). This is the best laptop I’ve ever had. For me it’s the perfect combination of weight vs. battery life, size vs. spec. The screen is fantastic, and the battery gives around 6 hours. The keyboard is smaller than normal, and not quite as good as IBM laptop keyboards, but none the less it’s still really usable. The processor is a 1.2Ghz Pentium M, with 1Gb RAM (512Mb is standard but we had it upgraded), with a 60Gb hard-disk and a DVD+RW.

This is a mini howto because just about everything is auto-deteced and setup on Ubuntu. The only issue is getting the 1280×768 widescreen working, and then getting dual head and mirror display modes working.

The video chipset is an Intel 855GME. For some reason the BIOS does not correctly setup the widescreen mode so this is not auto-deteced by the Xorg server (as far as I can work out). To get widescreen working I had to download and compile the 855resolution utility from Alan Poirier (thanks Alan!). Follow the instruction in the README.txt, that is

#855resolution -l
        Chipset: 855GM
        VBIOS type: 1
        BIOS Version: 3240

        Mode 30 : 640x480, 8 bits/pixel
        Mode 32 : 800x600, 8 bits/pixel
        Mode 34 : 1024x768, 8 bits/pixel
        Mode 38 : 1280x1024, 8 bits/pixel
        Mode 3a : 1600x1200, 8 bits/pixel
        Mode 3c : 1920x1440, 8 bits/pixel
        Mode 41 : 640x480, 16 bits/pixel
        Mode 43 : 800x600, 16 bits/pixel
        Mode 45 : 1024x768, 16 bits/pixel
        Mode 49 : 1280x1024, 16 bits/pixel
        Mode 4b : 1600x1200, 16 bits/pixel
        Mode 4d : 1920x1440, 16 bits/pixel
        Mode 50 : 640x480, 32 bits/pixel
        Mode 52 : 800x600, 32 bits/pixel
        Mode 54 : 1024x768, 32 bits/pixel
        Mode 58 : 1280x1024, 32 bits/pixel
        Mode 5a : 1600x1200, 32 bits/pixel
        Mode 5c : 1920x1440, 32 bits/pixel

Pick a mode you aren’t going to use – I picked 5c. I then created a start up script to set this at boot time

#!/bin/sh -e
test -x /usr/sbin/855resolution || exit 0
case "$1" in
start|restart)
    /usr/sbin/855resolution 5c 1280 768
    ;;
stop|reload|force-reload)
    ;;
esac

Then link this in /etc/rc2.d/S04855resolution (it needs to start before GDM). The correct resolution then gets detected by the Xserver (for reference here is my xorg.conf)

Now everything should work. The only problem is that although hibernate works, when the machine restarts the video isn’t setup properly so X restarts at 1024×768 resolution. The only way I managed to fix this was to add 855resolution in the /etc/default/acpi-support in the following line,

STOP_SERVICES="mysql 855resolution"

However now when the system restarts X seems to restart which means you effectively get logged out (not even as nice as logged out since X restarts). I’ve tried playing with vbetool and the rest of the acpi-support file but haven’t worked out how to fix this yet.

With these changes you have a normal working laptop. If you have to give presentations then a 1280×768 isn’t going to work with most (if any) projectors. You need the i855crt tool (sudo apt-get install i855crt). Then when you plugin the projector use System -> Preferences -> Screen Resolution (or xrandr) to switch to 1024×768 then run

sudo i855crt swcursor overlaycrt on 1024x768@70

I’ve used my laptop for a couple of presentations and it’s worked well (even if it’s a bit of a fiddle). I was pretty happy with this setup but I was noticing myself hunching over the desk when I was using the laptop and was wondered if the graphics driver could be setup to use an external monitor for dual head. Well the answer is yes (follow the link to find out what all the bits on my desk are);

My desk

Here is my xorg.conf.dualhead – it took a bit of Googling and reading of the i810 driver man page (alot of the Intel chipsets all use the xorg i810 driver) to get this to work. Bear in mind this was tweaked for my particular external monitor.

When I’m at work I copy over the dualhead conf file then restart gdm, and before I leave I copy back the original single head conf file, then shutdown (since hibernate doesn’t work and would absolutely barf if I hibernate in dual screen and restart single screen). This is a bit of faff and not for the average user. It would be good if Intel, X.org, and Gnome could get together and sort out some way of making this easy.

For example RedHat have a nice tool in Fedora for configuring this sort of setup, but it still requires an X restart (i.e. logout and log in again) before the changes take effect. This is OK but it only works in RedHat – if it could be integrated into gnome system tools that would be a start – if the Xorg project could fix the need to restart the server then this would be ideal.

While it’s good that people are working on Xgl and Glitz and lots of other eye candy it would be nice if these fairly simple things were easy to setup and change, i.e. I plug the monitor in, it’s autodetected, and then a pop-up which says “External monitor detected, would you like to configure dualhead or mirroring”, then a small app to choose the orientation of the external screen (LeftOf or RightOf from the xorg.conf file) or mirroring. And no need to restart X. Anyway rant over.

(# :: posted Sep 1, 10:02 pm in Linux :: )