Xorg and intel 855GM (i810/i830)

Translation of the original in Catalan. Read it in: CatalàCastellano

xorg.png
Xorg logo

While updating the gentoo portage I saw that it has moved from using XFree86 to Xorg as the graphical server. So, in order to keep up to date with the packages, I did the update and with that my new suffering with the X's began, just ask Josevi, a few weeks ago the two of us were suffering to fix the matter. So here I'll try to explain how I went about getting the graphics card of the laptop, an intel 855GM, to work with the Xorg graphical server.

What the system says about the card:

# lspci
0000:00:00.1 System peripheral: Intel Corp. 855GM/GME GMCH Memory I/O Control Registers (rev 02)
0000:00:00.3 System peripheral: Intel Corp. 855GM/GME GMCH Configuration Process Registers (rev 02)
0000:00:02.0 VGA compatible controller: Intel Corp. 82852/855GM Integrated Graphics Device (rev 02)
0000:00:02.1 Display controller: Intel Corp. 82852/855GM Integrated Graphics Device (rev 02)

If you want more details you already know you can do an lspci -v

As always with these problems the best thing is to start with the kernel, so after reading documentation from the Xorg and from gentoo, specifically the thing that made me decide was this document: Hardware 3D Acceleration Guide where it said that with the Xorg you had to stop using the DRM support of the kernel, since this, as the kernel documentation itself says, is for XFree86 4.x and not for Xorg 6.x

In the kernel configuration file I've left the options as they are explained in the document, the most important thing is this:

Processor type and features --->
<*> MTRR (Memory Type Range Register) support
Character devices --->
<M> /dev/agpgart (AGP Support)
[*] Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support
[ ] Direct Rendering Manager (XFree86 DRI support)

What the gentoo manual tells us is that to have DRI/DRM support in our kernel we have to install the x11-base/x11-drm package. To do so I recommend the following:

  • Define the environment variable: VIDEO_CARDS="i810" and then export it: export VIDEO_CARDS. It's also a good idea to put it in /etc/make.conf, since this variable is used to know which modules the x11-drm package has to compile.
  • Installing the newest possible version even if it's unstable is a good idea; a way to do this is: echo x11-base/x11-drm ~x86 >> /etc/portage/package.keywords.
  • Finally we do the emerge: emerge x11-base/x11-drm.
  • Don't forget to load the module afterwards: modprobe i810

This installs the i810.ko and i830.ko modules in /lib/modules/2.6.x/x11-drm. In theory with this we'll already have DRM/DRI support in the X's.

If you don't know how to configure the Xorg server, the gentoo people have this document: X Server configuration guide. Following this document to generate the X's configuration file I did:

# Xorg -configure

Then I tried it with:

# X -config /root/xorg.conf.new

If you want something to be loaded in this test, for example a terminal, you can put the following content in ~/.xinitrc

xterm &

If you don't know how to kill the graphical server without a window manager, a somewhat radical way to do it is with CONTROL+BACKSPACE (backspace=backspace, not delete). If the file works well you can copy it to /etc/X11/xorg.conf. I also recommend that you look at the code, since the automatic configuration is often not perfect and some things can be improved. You can look at my configuration file where you can clearly see what pof and I have been modifying in the xorg.conf file.

Now we can launch the X's as always with startx; if it doesn't load well for you, make sure you have deleted ~/.xinitrc.

In spite of everything I explain above, the X's log file (/var/log/Xorg.0.log) gives me the following error when loading:

...
(II) I810(0): [drm] drmOpen failed
(EE) I810(0): [dri] DRIScreenInit failed. Disabling DRI.
...

Which makes me think that, despite all the paraphernalia I've done, this doesn't quite work very well. But the important thing is that now the X's start and everything works much faster than before, so I'm satisfied. If anyone knows how to solve this error let me know, I haven't managed it.

1 comment

Comments from the old blog, as they were written. Comments are closed.

  1. brias

    EI hola,

    jo tenia le mateix problema i al final ho vaig solucionar canviant el mòdul que havia de carregar kernel:

    Intel 830M, 845G, 852GM, 855GM, 865G i dintre el i915 driver.

    Després de fer això ja apreix

    $ glxinfo |grep dire

    direct rendering: Yes

    que és la proba de que està funcionant correctament.

    de totes maneres glxgears no em mostra molts més FPS que abans...

    en fi, espero haver-te ajudat.