Intel 945GM + Compiz + AIGLX (updated)

Posted: June 18, 2007 in Intel, Linux

Recently, I got myself a Dell Inspiron 640m laptop. Looking at its spec: Core 2 T5300, 2GB RAM and Intel 945GM Express Integrated Graphics Controller, I realised, it is ideal to try out Compiz + AIGLX.

As I had done some reading over the net and knowing this time round, it seems this card should be quite simple to configured for Compiz + AIGLX. To my surprise, is not as simple as I had initially thought.

Today this article is about my attempt to get Compiz + AIGLX works with this system.


Let’s start by giving out some information of the system:

# lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
02:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)
02:01.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller
02:01.1 Generic system peripheral [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)
02:01.2 System peripheral: Ricoh Co Ltd Unknown device 0843 (rev 01)
02:01.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 0a)
02:01.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 05)
0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

Note the text in bold, there seems to be two display controllers in the system. Perhaps one is meant for external monitor, but in this little exercise, I only configure 00:02.0 not 00:02.1.


  • Setup X

The base system that I will be using is Slackware 12 rc1. Following the instructions from Intel I manage to build the kernel modules and activate it. As of now, it seems kernel 2.6.21.5 DRI for intel is older version than the link given by Intel.After that, run xorgcfg to create an initial xorg.conf at /etc/X11. From here, manually edit the generated xorg.conf:


Section “Module”
Load “dri”
Load “dbe”
Load “extmod”
Load “glx”
Load “xtrap”
Load “freetype”
Load “type1”
Load “record”
EndSection

and


Section “Device”
Identifier “Card0”
Driver “intel”
VendorName “Intel Corporation”
BoardName “Mobile 945GM/GMS/940GML Express Integrated Graphics Controller”
BusID “PCI:0:2:0”
Option “CacheLines” “32768”
Option “DRI” “true”
Option “AccelMethod” “EXA”
Option “PageFlip” “true”
Option “TripleBuffer” “true”
EndSection

I discover if I use the default X acceleration method of XAA, I can’t play any movies in XV. It keep giving error of lack of resources. Switching it to EXA solve the problem.

(update) Added Option for “PageFlip” and “TripleBuffer” – This should improve 3D performance (since I am using Compiz with all the visual stuff, I think this should be enabled).

Finally, make sure the following sections are added:

Section “DRI”
Mode 0666
EndSection

Section “Extensions”
Option “Composite” “Enable”
EndSection

Once we reached here, X should be configured with DRI+AIGLX+Composite. Next we need to setup compiz.


  • Setup Compiz

From here, install Compiz and gnome-compiz-manager. I am using DLG, so the following steps are more related with Gnome than KDE.

1st – Create shell script for starting compiz:

#!/bin/sh

LIBGL_ALWAYS_INDIRECT=1 compiz –replace –sm-disable gconf &
gtk-window-decorator –replace &

I name this file as compiz-start and save it in /usr/bin directory. LIBGL_ALWAYS_INDIRECT is needed here. If this is not set, compiz won’t start.

(update) add –sm-disable option fix the session problem.

2nd – Add compiz-start into the session.

compiz-start.jpg

Once this is done, exit and login again, compiz should be running now.

3rd – The next step will be configuring the plugins. Launch gconf-editor, edit /app/compiz/general/allscreens/options, make sure active_plugins is the following order:

gconf, dbus, svg, png, decoration, minimize, wobbly, fade, cube, rotate, switcher, move, resize, place, zoom, scale, annotate

4th – Fix the workspace switch problem by referring to this link: Workspace Switcher Fix

Once we reached here, compiz should be working with all the nice effect. Enjoy!


  • Issues:
  • Even though full acceleration is working, it is unable to run glxgear (a 3D application) properly. This will imply 3D application will encounter problem when execute. It is being reported as a known bug. Below is the link for the bug report:
    https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/116793
    Since it is still a know bug, and resolution has not been work out, there is no suggestion to resolve this problem.
  • Movie playback is working. However, if GL is enable, playing movie in full screen will be jerky.
Advertisements
Comments
  1. Jamsheed says:

    I am not much expert just show me how can I fix my sound and display in Acer travelmate 2480 for linux 7,04

  2. lenrek says:

    Linux 7.04? Are you referring Ubuntu 7.04?

    If your Acer Travelmate 2480 is the same spec as stated here, then it should be auto-detected by Ubuntu 7.04.

    If it does not, then you need to study out of dmesg and Xorg.X.log files to figure what happens to your sound and graphics.

    Good luck!

  3. chris says:

    I have the same laptop as you (Dell Inspiron 640M) I am running ubuntu :Linux chris-laptop 2.6.20-16-generic #2 SMP Sun Sep 23 19:50:39 UTC 2007 i686 GNU/Linux

    I followed your instructions above…but unfortunatelly I am not able to get this compiz running, is there something I overlooked?

    i am trying to start compiz with the following script (in ~/.Xsession):

    #!/bin/sh
    Xgl :1 -fullscreen -ac -accel xv -accel glx:pbuffer &
    DISPLAY=:1
    #LIBGL_ALWAYS_INDIRECT=1 compiz –replace –sm-disable gconf &
    LIBGL_ALWAYS_INDIRECT=TRUE compiz –replace gconf/ini&”
    kde-window-decorator -replace &
    compiz gconf decoration wobbly fade minimize cube rotate zoom scale move resize place menu switcher &
    exec startkde

  4. lenrek says:

    I notice you are using XGL. I am not familiar with the configuration of XGL. Sorry, can’t help you…

  5. chris says:

    No problem…

    I installed Ubuntu 7.10 and at first I could enable all the special desktop effects in gnome…But after installing the 915resolution the desktop features where not available anymore, even after uninstalling the 915resolution…I suspect that a driver has been overwritten…Can you send me the drivers you are using…as we having the laptop (inspiron 640M)…hope it helps..

    Kind regards,

    chris

  6. lenrek says:

    I am using Slackware 12, so I don’t think the packages for Slackware can be used for Ubuntu.

    915resolution should not cause such problem (it just modify the video bios, in order to display certain graphic resolutions). It should not overwrite existing files. Based on my experience, something else would have caused such problem.

    Let me repeat again, you are using Xgl, not AIGLX (frankly, I don’t understand why you would choose XGL). I suggest, look at your Xorg.* logs in your /var/log directory, most likely you will be able to find some clues to what had happened. From here, you should be able to find a solution or able to use it to ask for help from others who knows Xgl better (which I’m not).

    Your problem is most likely a setup issue, not drivers (unless you did something beside what you written here).

    Good luck!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s