# Xorg 7 and i910

## derverstand

How do I enable DRI in Xorg 7 for i910?  It was working before the "update" to Xorg 7....

Here 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/75dpi"

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

        FontPath     "/usr/share/fonts/TTF"

        FontPath     "/usr/share/fonts/Type1"

EndSection

Section "Module"

        Load  "glx"

        Load  "extmod"

        Load  "xtrap"

        Load  "record"

        Load  "dbe"

        Load  "dri"

        Load  "freetype"

        Load  "type1"

EndSection

Section "InputDevice"

        Identifier  "Keyboard0"

        Driver      "kbd"

        Option "XkbLayout"    "de"

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"

        ### Available Driver options are:-

        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",

        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"

        ### [arg]: arg optional

        #Option     "NoAccel"                   # [<bool>]

        #Option     "SWcursor"                  # [<bool>]

        #Option     "ColorKey"                        #Option     "CacheLines"                # <i>

        #Option     "Dac6Bit"                   # [<bool>]

        Option     "DRI" "True"                 # [<bool>]

        #Option     "NoDDC"                     # [<bool>]

        #Option     "ShowCache"                 # [<bool>]

        #Option     "XvMCSurfaces"              # <i>

        #Option     "PageFlip"                  # [<bool>]

        Identifier  "Card0"

        Driver      "i810"

        VendorName  "Intel Corporation"

        BoardName   "Mobile 915GM/GMS/910GML Express Graphics Controller"

        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

 #

```

glxgears says "no dri"... Its not the permissions (root neither got dri). Xorg itself says "DRIScreenInit failed. Disabling DRI" (thx). Anybody got it working and has a COMPLETE setup for me?

Best regards.

----------

## mebrelith

Is "dri" in your useflags? Did you configured properly the VIDEO_CARDS setting?

----------

## derverstand

dri is in USEflags and VIDEOCARDS is configured as should be. Please post a complete setup...

----------

## mebrelith

Hrmmm heres my Xorg... hope it helps.

```

Section "ServerLayout"

   Identifier     "Default Layout"

   Screen      0  "Screen0" 0 0

   InputDevice    "Mouse0" "CorePointer"

   InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

   FontPath   "/usr/share/fonts/misc:unscaled"

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

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

   FontPath   "/usr/share/fonts/TTF"

   FontPath   "/usr/share/fonts/Type1"

   FontPath   "/usr/share/fonts/corefonts"

   FontPath   "/usr/share/fonts/freefonts"

   FontPath   "/usr/share/fonts/sharefonts"

   FontPath   "/usr/share/fonts/terminus"

   FontPath   "/usr/share/fonts/ttf-bitstream-vera"

   FontPath   "/usr/share/fonts/unifont"

   FontPath   "/usr/share/fonts/artwiz"

EndSection

Section "Module"

   Load  "dbe"

   Load  "extmod"

   Load  "fbdevhw"

   Load  "glx"

   Load  "record"

   Load  "freetype"

   Load  "type1"

   Load  "dri"

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "kbd"

   Option      "AutoRepeat"   "500 30"

   Option       "XkbRules"   "xorg"

   Option       "XkbModel" "pc105"

   Option       "XkbLayout" "latam"

EndSection

Section "InputDevice"

   Identifier  "Mouse0"

   Driver      "mouse"

   Option       "Protocol" "IMPS/2"

   Option       "Device" "/dev/psaux"

   Option       "ZAxisMapping" "4 5"

   Option       "Emulate3Buttons" "yes"

EndSection

Section "Monitor"

   Identifier   "Monitor0"

   VendorName   "Monitor Vendor"

   ModelName    "Q71-9"

   DisplaySize  339   271

   HorizSync    30.0 - 70.0

   VertRefresh  50.0 - 160.0

   Option       "dpms"

EndSection

Section "Device"

   Identifier  "Videocard0"

   Driver      "i810"

   VendorName  "Videocard vendor"

   BoardName   "Intel 845"

   BusID   "PCI:0:2:0"

   Option   "NoAccel"   "false"

   Option   "DRI"   "true"

EndSection

Section "Screen"

   Identifier "Screen0"

   Device     "Videocard0"

   Monitor    "Monitor0"

   DefaultDepth     24

   SubSection "Display"

      Viewport   0 0

      Depth     16

      Modes    "800x600" "640x480"

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     24

      Modes    "1280x1024" "1152x864" "1152x768" "1024x768" "800x600" "640x480"

   EndSubSection

EndSection

Section "DRI"

   Mode         0666

EndSection

```

----------

## derverstand

Question: Does your DRI work for the i910?? I didn't get any further... :<

----------

## vonr

 *mebrelith wrote:*   

> 
> 
> ```
> Option   "DRI"   "true"
> ```
> ...

 

Setting this is redundant, see man i810:

```
Option "DRI" "boolean"

              Disable or enable DRI support.  Default: DRI is enabled for con-

              figurations where it is supported.
```

On topic:

What does your Xorg.0.log say besides 'DRIScreenInit failed. Disabling DRI'?

----------

## olger901

1. Make sure that VIDEO_CARDS="i810" and USE="dri opengl" is set in /etc/make.conf and 

2. Emerge xorg-x11

3. Run emerge -pv x11-drm mesa to see if it has also emerged these two packages. If portage hasn't emerged them, emerge those packages.

NOTE: Make sure you disable DRM support in the kernel!

4. Run modprobe i810 (add i810 to your /etc/modules.autoload.d/kernel-2.6 aswell and run modules-update -f afterwards).

5. Edit /etc/X11/xorg.conf and make sure that:

- The lines Load "glx" and Load "dri" are uncommented.

- That the Video driver is set to i810 instead of vesa.

- Make sure that you also uncomment the following  3 lines (most of the times, these lines can be found at the bottom of the file)

Section "DRI"

	Mode         0666

EndSection

Next to that could you please post your xorg.conf log file, we might be able to get more information out of there.

----------

## menschmeier

Hi,

might be order some modules are loaded. I found in /var/log/Xorg.0.log:

 *Quote:*   

> (WW) RADEON(0): [agp] AGP not available
> 
> (EE) RADEON(0): [agp] AGP failed to initialize. Disabling the DRI.
> 
> (II) RADEON(0): [agp] You may want to make sure the agpgart kernel module
> ...

 

I do have the same problem with my radeon card. I am checking it out right now ...

menschmeier

----------

## derverstand

Hi,

Got a little bit further: modprobing i915 from xorg-x11 doesn't work:

```
[drm] Initialized drm 1.0.1 20051102

ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 16 (level, low) -> IRQ 18

PCI: Setting latency timer of device 0000:00:02.0 to 64

[drm:drm_fill_in_dev] *ERROR* Cannot initialize the agpgart module.

BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000

 printing eip:

e0b84577

*pde = 00000000

Oops: 0000 [#1]

Modules linked in: i915 i830 i810 drm agpgart arc4 ieee80211_crypt_wep sha256 aes snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss rfcomm l2cap bluetooth serial_cs ufs battery snd_intel8x0 snd_ac97_codec snd_ac97_bus snd_pcm snd_timer snd soundcore snd_page_alloc loop ide_cs pcmcia pcmcia_core ipw2200 ieee80211 ieee80211_crypt tg3 dm_crypt dm_mod

CPU:    0

EIP:    0060:[<e0b84577>]    Not tainted VLI

EFLAGS: 00010246   (2.6.17-gentoo-r8 #12) 

EIP is at drm_lastclose+0xc3/0x2de [drm]

eax: 00000000   ebx: fffffff4   ecx: ffffffea   edx: 00000000

esi: de79a000   edi: e0b7d94c   ebp: e0b7d9c0   esp: d72ebe9c

ds: 007b   es: 007b   ss: 0068

Process modprobe (pid: 7997, threadinfo=d72ea000 task=de0b8a10)

Stack: ffffffea de79a000 e0b7d94c e0b873aa df61dc00 e0b7d9c0 c035a53f 00000040 

       de79a000 df61dc00 e0b7d9c0 e0b7d94c e0b87570 e0b7d9c0 e0b7dac4 e0b7dac4 

       ffffffed c022a12d c01c8d9c df61dc00 c01c8dcc e0b7dac4 df61dc00 e0b7daf0 

Call Trace:

 <e0b873aa> drm_fill_in_dev+0x1da/0x1e6 [drm]  <c035a53f> pcibios_set_master+0x75/0x79

 <e0b87570> drm_get_dev+0x7d/0x109 [drm]  <c022a12d> __driver_attach+0x0/0x59

 <c01c8d9c> pci_call_probe+0xa/0xc  <c01c8dcc> __pci_device_probe+0x2e/0x3f

 <c01c8dfb> pci_device_probe+0x1e/0x30  <c022a08a> driver_probe_device+0x44/0x95

 <c022a163> __driver_attach+0x36/0x59  <c0229888> bus_for_each_dev+0x35/0x59

 <c022a197> driver_attach+0x11/0x13  <c022a12d> __driver_attach+0x0/0x59

 <c0229c40> bus_add_driver+0x52/0x81  <c022a51d> driver_register+0x76/0x7b

 <c01c92ad> pci_get_subsys+0xad/0xb5  <c01c8f80> __pci_register_driver+0x37/0x47

 <e0b84817> drm_init+0x85/0x134 [drm]  <e0b8484e> drm_init+0xbc/0x134 [drm]

 <c01251a7> sys_init_module+0x87/0x13a  <c01022ab> sysenter_past_esp+0x54/0x75

Code: 74 20 31 c0 83 c9 ff 89 d7 f2 ae f7 d1 49 89 d0 e8 1e 71 5b df c7 06 00 00 00 00 c7 46 04 00 00 00 00 8b 96 cc 00 00 00 8d 5a f4 <8b> 7b 0c 83 ef 0c 8d 86 cc 00 00 00 39 c2 74 3d 8d 4b 0c 8b 43 

EIP: [<e0b84577>] drm_lastclose+0xc3/0x2de [drm] SS:ESP 0068:d72ebe9c

 

```

Any hints?

Best regards.

----------

