September 16, 2008

Ubuntu, Intel 945GM/GMS and external display

Filed under: geek,linux,ubuntu,x11 — @ 19:33

I’ve been running Ubuntu on my laptop for a while. When I work at home I connect it to an external flatscreen (ViewSonic VP181b).

Since the upgrade to Ubuntu 8 I’ve lost the 1280×960 resolution every time the folks at Ubuntu released a kernel update. The wrong graphics module, a crappy X-org config file or bad karma … you name it.

This is my hardware

00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)

After the recent upgrade to kernel 2.6.24-21 I had to do these tricks:

Install the i386 kernel.

sudo apt-get install linux-headers-2.6.24-21-386
cd /usr/src
sudo rm -rf linux
sudo ln -s linux-headers-2.6.24-21-386 linux
sudo reboot

Adjust your xorg.conf file (/etc/X11/xorg.conf)

Section “Device”
Identifier “Intel Corporation Mobile Integrated Graphics Controller”
Driver “intel”
# Driver “i810″
BusID “PCI:0:2:0″
EndSection

Section “Monitor”
Identifier “Generic Monitor”
Option “DPMS”
HorizSync 28-64
VertRefresh 43-60
Option “MonitorLayout” “CRT,LFP”
Option “Clone” “true”
EndSection

After disabling the “cloning” of screens in the “Screen Resolution” settings of Ubuntu you should be all set.

December 2, 2007

Adjust X11 resolution on the fly

Filed under: linux,ubuntu,x11 — @ 01:26

Modern X11 drivers support resolution changing on the fly (as in, you don’t need to restart your X11 server). You can check if your driver supports this when you see this

(==) RandR enabled
(II) Initializing built-in extension RANDR

Changing the resolution is very easy:

xrandr –size 1024×768

Entering xrandr without any options shows all the available resolutions.