Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 252627 - DRI fails on 2.6.28 kernels
Summary: DRI fails on 2.6.28 kernels
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo X packagers
URL: http://bugs.freedesktop.org/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-26 18:01 UTC by gfl3162+gbugzilla
Modified: 2009-05-10 17:13 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
my xorg.conf (xorg.conf,1.79 KB, text/plain)
2008-12-26 18:08 UTC, gfl3162+gbugzilla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gfl3162+gbugzilla 2008-12-26 18:01:14 UTC
I just upgraded my 2.6.27 kernel to 2.6.28, and now every time I start X, I get this error:

(EE) intel(0): Failed to pin front buffer: Cannot allocate memory

Fatal server error:
Couldn't bind memory for BO front buffer

dmesg shows this error:
[drm] Initialized drm 1.1.0 20060810
pci 0000:00:02.0: setting latency timer to 64
[drm] Initialized i915 1.6.0 20080730 on minor 0
[drm:i915_gem_object_bind_to_gtt] *ERROR* GTT full, but LRU list empty
[drm:i915_gem_object_pin] *ERROR* Failure to bind: -12

and Xorg.0.log shows this:
(II) intel(0): xf86BindGARTMemory: bind key 0 at 0x03e3f000 (pgoffset 15935)
(II) intel(0): xf86BindGARTMemory: bind key 1 at 0x03e40000 (pgoffset 15936)
(II) intel(0): xf86BindGARTMemory: bind key 2 at 0x06000000 (pgoffset 24576)
(EE) intel(0): Failed to pin front buffer: Cannot allocate memory

Fatal server error:
Couldn't bind memory for BO front buffer

(II) intel(0): xf86UnbindGARTMemory: unbind key 0
(II) intel(0): xf86UnbindGARTMemory: unbind key 1
(II) intel(0): xf86UnbindGARTMemory: unbind key 2

This is probably due to the inclusion of GEM in the 2.6.28 kernels.
Comment 1 gfl3162+gbugzilla 2008-12-26 18:08:33 UTC
Created attachment 176452 [details]
my xorg.conf
Comment 2 gfl3162+gbugzilla 2008-12-26 23:09:49 UTC
Actually, I figured out that DRI does work with the newer kernel, but under two conditions:
1. in xorg.conf, "AccelMethod" has to be "UXA"
2. mesa from git has to be used because only that supports GEM
Comment 3 gfl3162+gbugzilla 2008-12-29 18:50:35 UTC
Using comment #2, it works, but I get corrupt graphics all over the place (random lines, squares) on the screen. Also, OpenGL is extremely messed up when a compositing manager is NOT running. It also happens to be very unstable; it crashes randomly.
Comment 4 Rémi Cardona (RETIRED) gentoo-dev 2009-01-12 12:28:29 UTC
You might want to disable the "Legacy3D" option in your Device section. That should help a bunch.

And please try the unmasked packages in the x11 overlay. You shouldn't need any -9999 packages anymore.

Thanks
Comment 5 Donnie Berkholz (RETIRED) gentoo-dev 2009-01-21 06:52:05 UTC
(In reply to comment #4)
> You might want to disable the "Legacy3D" option in your Device section. That
> should help a bunch.
> 
> And please try the unmasked packages in the x11 overlay. You shouldn't need any
> -9999 packages anymore.

Had a chance to try this? Please reopen when you reply. Thanks!
Comment 6 gfl3162+gbugzilla 2009-01-22 01:31:57 UTC
Legacy3D is turned off, as it is already turned of by default (man intel(4))
Comment 7 gfl3162+gbugzilla 2009-01-22 01:34:36 UTC
Actually, sorry about the last post :-/

manual page was messed up
Comment 8 gfl3162+gbugzilla 2009-01-22 01:49:45 UTC
First, I'm REALLY sorry for changing this bug's status 3 times in a row.

Turning off legacy3d brings me back to the EXA driver, which doesn't work if legacy3d is on. Everything is back to normal now.

Also, something else I should mention is that MigrationHeuristic should be set to greedy in xorg.conf, or there will be random corruption in pixmaps.
Comment 9 Rémi Cardona (RETIRED) gentoo-dev 2009-01-22 08:00:29 UTC
Please provide your emerge --info and the versions of the following packages :
 - libdrm
 - xorg-server
 - mesa
 - xf86-video-intel

Thanks
Comment 10 gfl3162+gbugzilla 2009-01-23 02:33:22 UTC
emerge --info:
Portage 2.2_rc23 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r1, 2.6.28-gentoo-r1-fast i686)
=================================================================
System uname: Linux-2.6.28-gentoo-r1-fast-i686-Intel-R-_Pentium-R-_D_CPU_2.66GHz-with-glibc2.0
Timestamp of tree: Thu, 22 Jan 2009 03:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.5.4-r1
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.2
sys-apps/sandbox:    1.3.2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=nocona -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-Os -march=nocona -pipe"
DISTDIR="/var/portage/distfiles"
FEATURES="ccache distlocks fixpackages metadata-transfer parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="http://gentoo.llarian.net/ http://gentoo.mirrors.easynews.com/linux/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US zh zh_CN zh_HK"
MAKEOPTS="-j4 -l6"
PKGDIR="/var/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=10 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/desktop-effects /usr/local/portage/layman/x11 /var/portage/local/rgba /var/portage/local/polkit /var/portage/local/own /var/portage/local/ubuntu /var/portage/local/tmp"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa ao bash-completion berkdb branding bzip2 cairo caps cdda cdr cjk cli cracklib crypt css cups curl dbus dri dvd dvdr dvdread eds emboss encode esd evo exif fam fbcon ffmpeg firefox flac gdbm gif gmp gnome gnome-keyring gnutls gphoto2 gpm gstreamer gtk guile hal iconv ipod ipv6 isdnlog jpeg jpeg2k kdeprefix lame ldap libnotify lzo mad midi mikmod mmx mng mono mp2 mp3 mpeg musicbrainz ncurses nls nntp nptl nptlonly ogg opengl openmp pam pcre pdf perl png policykit ppds pppd python qt3support qt4 quicktime readline reflection samba scanner sdl session sndfile spell spl sse sse2 ssl startup-notification subversion svg sysfs tcpd theora threads tiff truetype unicode usb vorbis wifi win32codecs x264 x86 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US zh zh_CN zh_HK" USERLAND="GNU" VIDEO_CARDS="i810 intel fbdev vesa vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

libdrm-2.4.4
xorg-server-1.5.3-r1
mesa-7.3
xf86-video-intel-2.6.1

I just upgraded to the latest stable x11 overlay packages, and everything runs fine so long "MigrationHeuristic" is "greedy" and "AccelMethod" is "EXA". UXA is still slow and unstable, and "Legacy3D" still has to be off.
Comment 11 Rémi Cardona (RETIRED) gentoo-dev 2009-01-23 10:42:41 UTC
I guess you just won a free trip to FreeDesktop's bugzilla :)

Please read http://intellinuxgraphics.org/how_to_report_bug.html and please add "remi@gentoo.org" as a CC on the freedesktop bug so I can keep track of it.

Thanks
Comment 12 Rémi Cardona (RETIRED) gentoo-dev 2009-02-05 15:32:44 UTC
Please paste the url here if you ever open a bug in fd.o

Thanks
Comment 13 Blu3 2009-02-05 17:24:00 UTC
Reopen please, it's a legitimate issue and I've seen your postings about the issue on the list.  Bug already exists at FD - a new bug doesn't need to be opened.  https://bugs.freedesktop.org/show_bug.cgi?id=18974
Comment 14 Rémi Cardona (RETIRED) gentoo-dev 2009-02-05 18:27:02 UTC
Reopening
Comment 15 Rémi Cardona (RETIRED) gentoo-dev 2009-02-05 18:28:25 UTC
(In reply to comment #13)
> Reopen please, it's a legitimate issue

That's not the problem. The real issue is that I can't fix anything. I'm just a packager as far as the Intel driver is concerned.

> and I've seen your postings about the
> issue on the list.  Bug already exists at FD - a new bug doesn't need to be
> opened.  https://bugs.freedesktop.org/show_bug.cgi?id=18974

Thanks for the link, I'll CC myself there and we'll track the issue upstream.

Closing again.
Comment 16 Scott H 2009-03-11 10:26:37 UTC
For anyone else who gets a front buffer error - I cannot use UXA (X hangs after 3 seconds...) but I can use XAA if default depth is set to 15 or lower. Depth 24 results in front buffer error, 16 in gross screen corruption.

dmesg still shows 
[drm:i915_gem_object_bind_to_gtt] *ERROR* GTT full, but LRU list empty
[drm:i915_gem_object_pin] *ERROR* Failure to bind: -12<3>[drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 1

But the system is usable.

I should perhaps add that this is on an 865G.

lspci: 00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
Comment 17 gfl3162+gbugzilla 2009-03-12 03:21:26 UTC
(In reply to comment #16)
> For anyone else who gets a front buffer error - I cannot use UXA (X hangs after
> 3 seconds...) but I can use XAA if default depth is set to 15 or lower. Depth
> 24 results in front buffer error, 16 in gross screen corruption.
> 
> dmesg still shows 
> [drm:i915_gem_object_bind_to_gtt] *ERROR* GTT full, but LRU list empty
> [drm:i915_gem_object_pin] *ERROR* Failure to bind:
> -12<3>[drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for
> disabled pipe 1
> 
> But the system is usable.
> 
> I should perhaps add that this is on an 865G.
> 
> lspci: 00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated
> Graphics Controller (rev 02)
> 
I am also on the 865G, and you can try adding these options to your Device section:
        Option      "AccelMethod" "EXA"
        Option      "MigrationHeuristic" "greedy"
        Option      "Legacy3D" "Off"
        Option      "PageFlip" "On"
        Option      "TripleBuffer" "On"