# OpenGL causes X to crash with Intel grahics device

## darkrose0510

Last few days I've been working on getting Gentoo on my Acer Aspire One, and it's all been going good till I tried running a 3D game (just to test OpenGL of course), at which point X crashed. A little experimentation shows the same thing happens (X crashes) when I try to run glxgears or glxinfo too... so obviously something is stuffed.

Anyway, as root I did "startx >> x.log 2>&1" then ran glxgears from an xterm, here's the contents of x.log:

```
xauth:  creating new authority file /root/.serverauth.5295

X Window System Version 1.3.0

Release Date: 19 April 2007

X Protocol Version 11, Revision 0, Release 1.3

Build Operating System: UNKNOWN 

Current Operating System: Linux dandelion 2.6.28 #6 SMP Fri Jan 2 09:13:41 EST 2009 i686

Build Date: 01 January 2009

   Before reporting problems, check http://wiki.x.org

   to make sure that you have the latest version.

Module Loader present

Markers: (--) probed, (**) from config file, (==) default setting,

   (++) from command line, (!!) notice, (II) informational,

   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

(==) Log file: "/var/log/Xorg.0.log", Time: Sat Jan  3 06:26:36 2009

(==) Using config file: "/etc/X11/xorg.conf"

(WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found

(II) Module already built-in

(II) Module already built-in

(II) Module already built-in

(WW) intel(0): Failed to set up write-combining range (0x20000000,0x10000000)

Synaptics DeviceInit called

SynapticsCtrl called.

Synaptics DeviceOn called

Unrecognized deviceID 27ae

Backtrace:

0: X(xf86SigHandler+0x81) [0x80c34f0]

1: [0xb7fdc400]

2: /usr/lib/xorg/modules/extensions//libglx.so [0xb7c92644]

3: /usr/lib/xorg/modules/extensions//libglx.so(DoMakeCurrent+0x236) [0xb7c60bc1]

4: /usr/lib/xorg/modules/extensions//libglx.so [0xb7c60ec7]

5: /usr/lib/xorg/modules/extensions//libglx.so [0xb7c62dd5]

6: X [0x814b6ba]

7: X(Dispatch+0x19f) [0x808bfd2]

8: X(main+0x491) [0x8074e68]

9: /lib/libc.so.6(__libc_start_main+0xdc) [0xb7d66fdc]

10: X(FontFileCompleteXLFD+0x1e5) [0x80741d1]

Fatal server error:

Caught signal 11.  Server aborting

X connection to :0.0 broken (explicit kill or server shutdown).

X connection to :0.0 broken (explicit kill or server shutdown).

xterm:  fatal IO error 32 (Broken pipe) or KillClient on X server ":0.0"

xterm:  fatal IO error 32 (Broken pipe) or KillClient on X server ":0.0"

xinit:  connection to X server lost.

login:  fatal IO error 32 (Broken pipe) or KillClient on X server ":0.0"

```

and my xorg.conf

```
Section "ServerLayout"

   Identifier     "X.org Configured"

   Screen      0  "Screen0" 0 0

   InputDevice    "Mouse0" "CorePointer"

   InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

   RgbPath      "/usr/share/X11/rgb"

   ModulePath   "/usr/lib/xorg/modules"

   FontPath     "/usr/share/fonts/misc/"

   FontPath     "/usr/share/fonts/TTF/"

   FontPath     "/usr/share/fonts/OTF"

   FontPath     "/usr/share/fonts/Type1/"

   FontPath     "/usr/share/fonts/100dpi/"

   FontPath     "/usr/share/fonts/75dpi/"

EndSection

Section "Module"

   Load  "extmod"

   Load  "record"

   Load  "dbe"

   Load  "GLcore"

   Load  "xtrap"

   Load  "dri"

   Load  "glx"

   Load  "freetype"

   Load  "type1"

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "kbd"

EndSection

Section "InputDevice"

   Identifier  "Mouse0"

   Driver      "synaptics"

   Option       "Protocol" "auto"

   Option       "Device" "/dev/input/mouse0"

   Option       "ZAxisMapping" "4 5 6 7"

   Option      "CorePointer"

EndSection

Section "InputDevice"

   Identifier   "Mouse1"

   Driver      "mouse"

   Option   "Device" "/dev/input/mouse1"

   Option   "Protocol" "auto"

   Option   "ZAxisMapping" "4 5"

   Option   "Buttons" "5"

   Option   "SendCoreEvents"

EndSection

Section "Monitor"

   #DisplaySize     200   110   # mm

   Identifier   "Monitor0"

   VendorName   "AUO"

   ModelName    "11c2"

EndSection

Section "Device"

   Identifier  "Card0"

   Driver      "intel"

   VendorName  "Intel Corporation"

   BoardName   "Unknown Board"

   BusID       "PCI:0:2:0"

   Option      "NoDDC"

EndSection

Section "Screen"

   Identifier "Screen0"

   Device     "Card0"

   Monitor    "Monitor0"

   SubSection "Display"

      Viewport   0 0

      Modes     "1024x600"

      Depth     24

   EndSubSection

EndSection

Section "Extensions"

   Option "Composite" "Enable"

   Option "RENDER" "Enable"

EndSection

Section "DRI"

   Mode 0666

EndSection

```

lspci | grep -i vga

```

00:02.0 VGA compatible controller: Intel Corporation Device 27ae (rev03)

```

I'm currently running kernel 2.6.28 straight from kernel.org, as it supports my SD Card reader better than the current gentoo-sources (2.6.27?) one, but tests with both kernels show the same result.

Ideas, suggestions, help! most appreciated.

----------

## dattaway

emerge -e world fixed it for me.

----------

## darkrose0510

I tried that seeing as there's been no other suggestions, it took 18 hours, and didn't fix anything.

Problem is still exactly as noted.

----------

## darkrose0510

If I comment out:

```

#   Load  "dri" 

```

in the module of xorg.conf X no longer crashes, but rendering is now very very slow. glxgears averages 50-70FPS.

----------

## darkrose0510

Well I got it to work.

The short version: unmask the latest xorg and emerge it.

The long version:

Add the following to your /etc/portage/package.keywords

```

~x11-base/xorg-x11-7.4

~x11-base/xorg-server-1.4.2

~x11-libs/libXrender-0.9.4

~media-libs/mesa-7.2

~x11-libs/xtrans-1.0.4

~x11-proto/renderproto-0.9.3

~x11-libs/libdrm-2.3.1

~x11-proto/xextproto-7.0.3

~x11-libs/libXext-1.0.4

~x11-proto/inputproto-1.4.4

~x11-libs/libX11-1.1.5

~x11-proto/xf86driproto-2.0.4

~x11-libs/libXxf86vm-1.0.2

~x11-apps/mesa-progs-7.1

~x11-drivers/xf86-video-intel-2.5.1

~x11-libs/libdrm-2.4.1

~x11-apps/x11perf-1.5

~x11-apps/xev-1.0.3

~x11-apps/mkfontdir-1.0.4

~x11-apps/xprop-1.0.4

~x11-libs/libXau-1.0.4

~x11-libs/libXrandr-1.2.3

~media-fonts/font-xfree86-type1-1.0.1

~x11-libs/libpciaccess-0.10.3

~x11-apps/xkbcomp-1.0.5

~x11-apps/sessreg-1.0.4

~x11-apps/xset-1.0.4

~x11-apps/mkfontscale-1.0.5

~x11-libs/xtrans-1.2.2

~x11-apps/xdpyinfo-1.0.3

~x11-libs/libXinerama-1.0.3

~x11-libs/libXmu-1.0.4

~x11-apps/xrdb-1.0.5

~x11-libs/libFS-1.0.1

~x11-apps/xwininfo-1.0.4

~x11-apps/xauth-1.0.3

~x11-apps/luit-1.0.3

~x11-misc/util-macros-1.1.6-r1

~x11-misc/xinput-1.3.0

~x11-libs/libSM-1.1.0

~x11-libs/libXfont-1.3.3

~x11-libs/libXv-1.0.4

~x11-apps/xrandr-1.2.3

~x11-libs/libXScrnSaver-1.1.3

~x11-libs/libxkbfile-1.0.5

~x11-libs/libXft-2.1.13

~x11-base/xorg-server-1.5.2

~x11-apps/xwd-1.0.2

~x11-libs/pixman-0.12.0

~x11-proto/xproto-7.0.13

~x11-misc/xkeyboard-config-1.3

~x11-apps/rgb-1.0.3

~x11-apps/xinit-1.0.8-r3

~x11-proto/randrproto-1.2.2

~x11-drivers/xf86-input-keyboard-1.3.1

~x11-drivers/xf86-video-vesa-2.0.0

~x11-drivers/xf86-input-evdev-2.0.6

~x11-drivers/xf86-input-mouse-1.3.0

~x11-drivers/xf86-input-joystick-1.3.2

~x11-drivers/xf86-input-synaptics-0.99.3

```

Now emerge xorg-x11:

```

emerge xorg-x11

```

Now emerge video/keyboard/mouse/touchpad drivers:

```

emerge xf86-video-intel xf86-input-mouse xf86-input-keyboard xf86-input-synaptics

```

and emerge mesa:

```

emerge mesa

```

Next configure X:

```

Xorg -configure

```

And move the new xorg.conf to the right place:

```

mv xorg.conf.new /etc/X11/xorg.conf

```

Uncomment the line for NoDDC in the Device section so you don't have supersized fonts:

```

Option "NoDDC"

```

Finally restart X:

```

/etc/init.d/xdm restart

```

Login, open an xterm, and run glxgears, it all should work.

Here's my xorg.conf now:

```

Section "ServerLayout"

   Identifier     "X.org Configured"

   Screen      0  "Screen0" 0 0

   InputDevice    "Mouse0" "CorePointer"

   InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

   ModulePath   "/usr/lib/xorg/modules"

   FontPath     "/usr/share/fonts/misc/"

   FontPath     "/usr/share/fonts/TTF/"

   FontPath     "/usr/share/fonts/OTF"

   FontPath     "/usr/share/fonts/Type1/"

   FontPath     "/usr/share/fonts/100dpi/"

   FontPath     "/usr/share/fonts/75dpi/"

EndSection

Section "Module"

   Load  "extmod"

   Load  "record"

   Load  "dbe"

   Load  "glx"

   Load  "xtrap"

   Load  "dri"

   Load  "freetype"

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "kbd"

EndSection

Section "InputDevice"

   Identifier  "Mouse0"

   Driver      "mouse"

   Option       "Protocol" "auto"

   Option       "Device" "/dev/input/mice"

   Option       "ZAxisMapping" "4 5 6 7"

EndSection

Section "Monitor"

   Identifier   "Monitor0"

   VendorName   "Monitor Vendor"

   ModelName    "Monitor Model"

EndSection

Section "Device"

        Option     "NoDDC"

   Identifier  "Card0"

   Driver      "intel"

   VendorName  "Intel Corporation"

   BoardName   "Unknown Board"

   BusID       "PCI:0:2:0"

EndSection

Section "Screen"

   Identifier "Screen0"

   Device     "Card0"

   Monitor    "Monitor0"

   SubSection "Display"

      Viewport   0 0

      Depth     1

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     4

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     8

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     15

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     16

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     24

   EndSubSection

EndSection

```

----------

