Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
a i915 965GM DRI Howto
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
vap0rtranz
Tux's lil' helper
Tux's lil' helper


Joined: 08 Jun 2004
Posts: 121
Location: USA, Earth, Sol, Milk Way, ...

PostPosted: Fri Aug 08, 2008 2:10 am    Post subject: a i915 965GM DRI Howto Reply with quote

New laptop; new problems -- namely DRI. I made it a point to avoid ATI this time but getting DRI to work for Intel is becoming just as difficult. I'm jotting down this makeshift Howto about what I've done so far in hopes that some kind of official Howto will be written specifically for the i915/965GM chipset.

Brief

Here's what worked and what broke:

  • X is working in 2D
  • X crashes the system hard when running 3D apps, aka. CTRL-ALT-BS, CTRL-ALT-DEL, do nothing after glxgears is resized or xscreensaver starts

So far the Howto's I've used are:

  1. Gentoo's Handbook on DRI - cites a mysterious "i8x0" and not "i915"
  2. Gentoo Wiki on Intel GMA - cites a mysterious "intel" driver instead of "i915"

I say "mysterious" because there are references in these forums and Howtos on i810 versus i830, and intel over i915, et cetera; I'm no expert but I hope the following blurb and links will minimize confusion. The problematic graphics card and chipset that I (and others are struggling with[1][2]) is Intel's integrated mobile 965GM chipset with "X3100" graphics card (see FAQ), not the desktop 945G, nor its cousin, the 945GM, nor other Intel mobile chipsets[1]. This probably only needs to be mentioned because our chips look to be sitting on PCI-Express, which is a point that Xorg makes clear (if lscpi hadn't already). Xorg's docs also differentiate i915/945 from 965 so I think this is no small footnote, and I will mention it again ... in psuedo-footnote fashion. :)

Forum discussions that have been marked "[SOLVED]" give some anecdotal help but either a) follow the xorg.conf misconfiguration Red Herring, or b) remain ambiguous about the steps needed to get DRI working correctly on different Intel chipsets. For example, one solved post concluded that:

Quote:
intel-agp, agp, drm, and i915 are all compiled in or with the kernel


Which ones are compiled as modules?? and:

Quote:
~86 branch of xorg-X11, xorg-server, and mesa


This sounds like it merely means the 32-bit versions but it could be easily confused with allow keywords or unmask the unstable version of mesa (which I discuss below). Another thread seems to suggest that these packages need unmasking or keywords yet it is specific to a different Intel chipset. A final example merely highlights the need of getting all the steps into one Howto. Collating all the relevant sources and writing down my steps finally resulted in a solution that I expect will work for all 965GM users.

Problem

When the system freezes, the following is logged (in /var/log/messages):
Code:

[drm:i915_wait_irq] *ERROR* EBUSY


Freedesktop has an open bug about this and the Intel graphics guys list the same problem so this is not a Gentoo specific problem. I think it noteworthy that X issues a warning on this chipset (in /var/log/Xorg.0.log) even though I have not set a BusID in /etc/X11/xorg.conf -- and can someone verify that BusID's should be used even if there is only one graphics card:

Code:
(WW) intel: No matching Device section for instance (BusID PCI:0:2:1)
found
(--) Chipset 965GM found


It's almost like X is confused after loading its i810 driver. More on that below. My method for getting X working (in 2D) has been:

  1. Code:
     make menuconfig
    CONFIG_AGP=m
    CONFIG_AGP_INTEL=m
    CONFIG_DRM=m
    CONFIG_DRM_I915=m


    Note that i810 is not included as a kernel module and that the kernel appears void of documentation about Intel's graphics chipsets (other than the framebuffer drivers). Perhaps X isn't sure about which driver to use. Xorg's docs state that their xf86-video-intel driver is intended for 965 chipsets, but there's no package with that name in Portage and the summary of their package has a dead link. It gets no less confusing :( Since there's only two Intel video drivers in Portage, i710 and i810, I enable the latter because I have seen Xorg.0.log loading the driver and claiming to support 965GM, so here is an emerge of stuff for X:

  2. Code:
     vi /etc/make.conf
    VIDEO_CARDS="i810"
    USE="dri xorg"


  3. Code:
     emerge xorg-server xf86-video-i810 mesa
    [ebuild   R   ] media-libs/mesa-6.5.2-r1  USE="nptl -debug -doc -motif
    -pic -xcb" VIDEO_CARDS="i810 -mach64 -mga -none -r128 -radeon -s3virge -savage
    -sis (-sunffb) -tdfx -trident -via" 0 kB
    [ebuild   R   ] x11-base/xorg-server-1.3.0.0-r6  USE="dri ipv6 nptl xorg -3dfx
    -debug -dmx -kdrive -minimal -sdl -xprint" INPUT_DEVICES="evdev keyboard mouse
    -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300
    -elographics -fpit -hyperpen -jamstudio -joystick -magellan -microtouch
    -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957 -ur98 -vmmouse
    -void -wacom" VIDEO_CARDS="i810 -apm -ark -chips -cirrus -cyrix -dummy -epson
    -fbdev -fglrx -glint -i128 -i740 (-impact) -imstt -mach64 -mga -neomagic
    (-newport) -nsc -nv -nvidia -r128 -radeon -rendition -s3 -s3virge -savage
    -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb)
    (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l -vesa -vga -via -vmware
    -voodoo" 0 kB
    [ebuild   R   ] x11-drivers/xf86-video-i810-2.1.1  USE="dri -debug" 0 kB


    Just to be sure, we cross-reference the versions that Xorg claims will work and find that they match, i.e. the video driver is at 2.1.1, the X server is greater than 1.3.0, and -- STOP. Mesa is not at version 7.0.4.

    Solution

    Xorg had merely noted that OpenGL 2.0 works with version 7 but Keith Packard's announcement specifically cited Mesa 6.5.3. So I hack Mesa 7 working with Xorg 1.3:
  4. Code:
     vi /etc/portage/package.keywords:
    media-libs/mesa ~x86
    x11-apps/mesa-progs ~x86
    x11-proto/xf86driproto ~x86

  5. Code:
     vi /etc/portage/package.use:
    x11-base/xorg-server -nptl


    And emerge everything related to DRI:
  6. Code:
     emerge mesa xorg-server xf86-video-i810 mesa-progs xf86driproto



It works. I can maximize glxgears and the system doesn't freeze; I can run xscreensaver as well. My xorg.conf was irrelevant to this functioning, i.e. I made no changes from the version working in 2D. So the solution to 3D problems for 965GM chipsets is to essentially match versions that have been documented to work by the Xorg crowd and get Portage to emerge them on your system, via keywords, USE variables, etc. Blanketing packages with unmasks or keywords is unnecessary (and could induce byproducts).

Wrap-up

Was writing this all out overkill? I hope not for the people who, like me, wasted several hours by banging their heads against the myriad of terms used -- such as the i810 driver versus i810 kernel module -- that we read about in other threads and documents. Portage is not the only system whose developers or administrators decide, for various reasons, to name things differently than their upstream provider, but the confusion caused by inconsistent nomenclature never, IMHO, merits renaming something downstream. ... Anyways, let me know if it works for you!

Cheers!
_________________
"Here on the moon, our weekends are so advanced, they encompass the entire week." ~ Ignignokt


Last edited by vap0rtranz on Sat Aug 09, 2008 2:30 am; edited 1 time in total
Back to top
View user's profile Send private message
pigeon768
l33t
l33t


Joined: 02 Jan 2006
Posts: 675

PostPosted: Fri Aug 08, 2008 5:00 am    Post subject: Re: a i915 965GM DRI Howto Reply with quote

vap0rtranz wrote:
Gentoo Wiki on Intel GMA - cites a mysterious "intel" driver instead of "i915"
[/list]
I say "mysterious" because there are references in these forums and Howtos on i810 versus i830, and intel over i915, et cetera;
fyi:
Code:
$ ls -l /usr/lib/xorg/modules/drivers/i810_drv.so
lrwxrwxrwx 1 root root 12 2008-08-03 10:01 /usr/lib/xorg/modules/drivers/i810_drv.so -> intel_drv.so


The main problem with the confusion nomenclature is there are so many different 'intel' drivers. There are two different framebuffer drivers: FB_I810 and FB_INTEL, one old and one new, neither of which you need. There is CONFIG_AGP_INTEL, to control the north bridge of the i*** chipsets. There is DRM_I830 and DRM_I915, which, well, I don't know what they do, but you need one or the other. If you have a i8 series chip you need the I830, if you have a i9 series or X3*** or X4*** you need the I915. Then there's the Xorg driver, which is xf86-driver-i810, which you need if you have an i810 or newer card. There's also the i740, which you only need for the i740. Gentoo, to my knowledge, does not rename any of these.
Back to top
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 690

PostPosted: Fri Aug 08, 2008 7:54 am    Post subject: I have the Intel drivers working Reply with quote

As you've seen, there are a bunch of drivers and kernel parts.
You need AGP support in the kernel, of course, but NOT the Intel frame buffer drivers. If you want FB, use the normal FB_VESA driver in the kernel. For DRI and the rest, you need the x11-drivers/xf86-intel-810 package. IIUC, the FB driver and the x11-drivers are complementary, not co-requisites. The reason for not using the Intel FB drivers is a comment on one of the newgroups about the i810 package that it fights with the FB versions, and anyway I couldn't get the Intel FB drivers to handle anything other than the most basic video mode.

(In the stuff below, I use X11 and Xorg depending on the package names. I only have Xorg installed, the X11 references are just the package names, I don't think there's any real X11 dependency as against Xorg.)

The "i810" X11 driver is the same as the X11 "intel" - they're renaming it in the later versions, 'cos it supports rather a lot of other chips than just 810.

The current Gentoo version of xf86-intel-810 is 2.1.1. The later testing versions all lose DRI, as far as I know, unless you upgrade your xorg-server to 1.4, and that's also still in testing, and I've not had the enthusiasm to try that yet. 2.1.1 gives me just over 800 FPS on glxgears. If you go to the later drivers it drops to around 200, AFAIR, because it uses software emulation because of this xorg-server problem.

You need a very simple xorg.conf file - the 2.1.1 driver does a good job of probing the hardware.

You will also find the 1.7.4 driver about. It's still quite popular - it supports "Zaphod" mode - two hardware displays as distinct desktops, whereas the 2.x series only support "clone" or virtual desktop mode (i.e. one big display area spanning both displays), which is not the same as xinerama. (I've not tried xinerama.)

You'll find it worth reading up on xrandr, which will let you switch display configurations on the 2.x series driver. A useful hint is to include a "Virtual 1600x1200" statement in your xorg.conf file to allow plugging in a large VGA or digital screen.
_________________
Greybeard
Back to top
View user's profile Send private message
astaecker
Guru
Guru


Joined: 28 Apr 2003
Posts: 403
Location: Hamburg / Germany

PostPosted: Fri Aug 08, 2008 8:10 am    Post subject: Re: a i915 965GM DRI Howto Reply with quote

vap0rtranz wrote:

Gentoo Wiki on Intel GMA - cites a mysterious "intel" driver instead of "i915"

The driver (for all Intel graphic chips since 830G) consists of two parts: the userspace driver and the kernel driver. The userspace driver is the xf86-video-intel driver for Xorg. It offers 2D and 3D support. If you want 3D support, you also need the kernel driver, which consists of an AGP driver (kernel modules agp and agp_intel) and a DRM (Direct Rendering Manager) driver (kernel modules drm and i915). There is another DRM kernel driver called i830, but that is only for the old Xfree 4.3 (which is since some time no longer in the portage tree).
The only "mystery" here is, that Gentoo has no xf86-video-intel driver, but the xf86-video-i810 driver. In the past that was the name for the xf86-video-intel driver, but it was renamed after a big reworked of the driver (>= version 1.7 IMO). But because it will break a lot of user boxes (they need to change the configuratuion), the Gentoo devs didn't move the xf86-video-i810 ebuild to the new name. But inside it install of course the new xf86-video-intel driver.

So the Gentoo Wiki guide is actually right, but doesn't include a history section :-).
Back to top
View user's profile Send private message
vap0rtranz
Tux's lil' helper
Tux's lil' helper


Joined: 08 Jun 2004
Posts: 121
Location: USA, Earth, Sol, Milk Way, ...

PostPosted: Sat Aug 09, 2008 2:30 am    Post subject: Re: a i915 965GM DRI Howto Reply with quote

pigeon768 wrote:
fyi:
Code:
$ ls -l /usr/lib/xorg/modules/drivers/i810_drv.so
lrwxrwxrwx 1 root root 12 2008-08-03 10:01 /usr/lib/xorg/modules/drivers/i810_drv.so -> intel_drv.so


Thank you very much. Someone had mentioned this on a thread but you pinpointed the proof ... not that I'm a skeptic or anything ;)

pigeon768 wrote:
The main problem with the confusion nomenclature is there are so many different 'intel' drivers.


Yes, that was one of my major points, and I had held the framebuffer devices as a kind of constant or outlier because they aren't needed for DRI.

I'm removing i830 per your recommendations.
_________________
"Here on the moon, our weekends are so advanced, they encompass the entire week." ~ Ignignokt
Back to top
View user's profile Send private message
vap0rtranz
Tux's lil' helper
Tux's lil' helper


Joined: 08 Jun 2004
Posts: 121
Location: USA, Earth, Sol, Milk Way, ...

PostPosted: Sat Aug 09, 2008 2:37 am    Post subject: Re: I have the Intel drivers working Reply with quote

Goverp wrote:
You need AGP support in the kernel, of course, but NOT the Intel frame buffer drivers.


Which is why they're not included in my blurb above. Perhaps they should be mentioned merely for clarification but as I said previously, they're not involved in DRI afaik -- other than causing it to fail. BTW: I also use FB_VESA alongside I915; the only problem I had to correct was both writing to the same memory space via mtrr which caused severe distortion when X started. It was easily corrected by disabling mtrr for vesa.

Goverp wrote:
You'll find it worth reading up on xrandr, which will let you switch display configurations on the 2.x series driver.


You must read minds because that was my next project: getting a Dell 2700fp working via xrandr :)
_________________
"Here on the moon, our weekends are so advanced, they encompass the entire week." ~ Ignignokt
Back to top
View user's profile Send private message
vap0rtranz
Tux's lil' helper
Tux's lil' helper


Joined: 08 Jun 2004
Posts: 121
Location: USA, Earth, Sol, Milk Way, ...

PostPosted: Sat Aug 09, 2008 2:40 am    Post subject: Re: a i915 965GM DRI Howto Reply with quote

arlsair wrote:
So the Gentoo Wiki guide is actually right, but doesn't include a history section :-).


Can you fit into my pocket? :) That history was absolutely necessary, even in retrospect.
_________________
"Here on the moon, our weekends are so advanced, they encompass the entire week." ~ Ignignokt
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum