LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 08-21-2011, 08:27 PM   #1
liquidkaleidoscopes
LQ Newbie
 
Registered: Aug 2011
Posts: 27

Rep: Reputation: Disabled
No 3D hardware acceleration with i915


Hello, this is my first post here. I installed L.F.S. 6.8 and some packages from B.L.F.S., the svn/development version. I have a working X environment, with OpenBox. I have a few problems, but the main one that bothers me is that I have no hardware 3D acceleration.

I'm using a Panasonic Toughbook CF-51, which has an integrated Intel i915 adapter. My kernel .config file is from my Gentoo installation (in which hardware acceleration works) -- I ran 'make menuconfig' with it and made sure that it worked, and everything else that's related to the kernel seems ok. I have no Xorg configuration file; I haven't needed one in a long time. L.F.S. lives on the same hard drive as Gentoo, and if I boot into Gentoo, it works fine. However, in LFS, XScreensaver is quite choppy, and some programs (Pidgin and Firefox/Aurora) crash when I drag and drop things with an error which I read could be caused by lack of hardware acceleration.

I'm not sure what the problem is because everything recognizes DRI(2) and OpenGL support. I can provide logs or anything else that seems relevant. I'm just not sure where to begin, since I've tried recompiling Mesa, xf86-video-intel, and xorg-server, checking the ./configure options for anything I missed.
 
Old 08-22-2011, 04:13 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,508

Rep: Reputation: 571Reputation: 571Reputation: 571Reputation: 571Reputation: 571Reputation: 571
Kernel version?

i915 is the thing that was so bad m$ wanted it out of PCs before they released vista. Did you see
https://wiki.archlinux.org/index.php...ode_Setting.29
 
Old 08-22-2011, 06:22 AM   #3
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
What does it say about dri in /var/log/Xorg.0.log? It should say something like
Quote:
[ 6.538] (II) Loading sub module "dri2"
[ 6.538] (II) LoadModule: "dri2"
[ 6.539] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
[ 6.539] (II) Module dri2: vendor="X.Org Foundation"
[ 6.539] compiled for 1.10.1, module version = 1.2.0
[ 6.539] ABI class: X.Org Server Extension, version 5.0
[ 6.539] (==) Depth 24 pixmap format is 32 bpp
[ 6.540] (II) intel(0): [DRI2] Setup complete
[ 6.540] (II) intel(0): [DRI2] DRI driver: i915
What options did you use to compile libdrm and mesa? What versions of libdrm and mesa did you use?
 
Old 08-22-2011, 08:01 PM   #4
liquidkaleidoscopes
LQ Newbie
 
Registered: Aug 2011
Posts: 27

Original Poster
Rep: Reputation: Disabled
My kernel version is 2.6.37. My card is actually a 945GM, apparently, and kernel mode setting is enabled for it in the kernel.

I added i915.modeset=1 to grub.conf. I don't use an initrd, so some of that page doesn't apply to me.

Here is what Xorg.0.log says about dri:

Code:
(II) LoadModule: "dri"
(II) Loading /usr/lib/X11/modules/extensions/libdri.so
(II) Module dri: vendor="X.Org Foundation"
(II) LoadModule: "dri2"
(II) Loading /usr/lib/X11/modules/extensions/libdri2.so
(II) Module dri2: vendor="X.Org Foundation"
(==) Matched intel as autoconfigured driver 0
(==) Matched vesa as autoconfigured driver 1
(==) Matched fbdev as autoconfigured driver 2
(==) Assigned the driver to the xf86ConfigLayout
(II) Loading /usr/lib/X11/modules/drivers/intel_drv.so
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: node name is /dev/dri/card0
(II) intel(0): [DRI2]   DRI driver: i915
(II) Loading extension XFree86-DRI
{II) Loading extension DRI2
(II) intel(0): [DRI2] Setup complete
(II) intel(0): [DRI2]   DRI driver: i915
(II) intel(0): direct rendering: DRI2 Enabled
(II) GLX: Initialized DRI2 GL provider for screen 0
(II) AIGLX: Loaded and initialized /usr/lib/dri/i915_dri.so

It also says '(EE) Failed to load module "fbdev" (module does not exist, 0)' and '(EE) Failed to load module "vesa" (module does not exist, 0). I think that this is irrelevent, but please tell me if I am wrong.

I have libdrm-2.4.26, MesaGLUT-7.10.3.tar.bz2 and MesaLib-7.10.3.tar.bz2.

Code:
libdrm 2.4.26 will be compiled with:

  libkms         yes
  Intel API      yes
  vmwgfx API     no
  Radeon API     no (I might have compiled with this enabled last time, since it does so by default for me)
  Nouveau API    no
Mesalib:
Code:
./configure $XORG_CONFIG --enable-xcb --enable-gallium-i915 --with-x --with-dri-drivers=i915
Thanks for your replies!

Edit: I tried installing Mesa 7.9 per the main B.L.F.S. guide, and this got faster frame rates, though not as fast as in Gentoo. I'm not sure why this is, since I compiled it with the same option. After this, I had a fun time uninstalling it and reinstalling 7.10.3 so that it worked properly.

Code:
ldd /usr/bin/glxgears
	linux-gate.so.1 =>  (0xffffe000)
	libGL.so.1 => /usr/lib/libGL.so.1 (0xb7803000)
	libc.so.6 => /lib/libc.so.6 (0xb7688000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0xb7569000)
	libm.so.6 => /lib/libm.so.6 (0xb7543000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0xb7534000)
	libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb7531000)
	libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb752c000)
	libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb7527000)
	libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb751d000)
	libpthread.so.0 => /lib/libpthread.so.0 (0xb7503000)
	libdl.so.2 => /lib/libdl.so.2 (0xb74fe000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7415000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xb73f9000)
	/lib/ld-linux.so.2 (0xb7867000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb73e0000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0xb73dd000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb73d7000)
	librt.so.1 => /lib/librt.so.1 (0xb73ce000)
Code:
ldd /usr/bin/xscreensaver
	linux-gate.so.1 =>  (0xffffe000)
	libXmu.so.6 => /usr/lib/libXmu.so.6 (0xb7781000)
	libXi.so.6 => /usr/lib/libXi.so.6 (0xb7773000)
	libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb776e000)
	libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb7767000)
	libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb775d000)
	libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb775a000)
	libSM.so.6 => /usr/lib/libSM.so.6 (0xb7752000)
	libICE.so.6 => /usr/lib/libICE.so.6 (0xb773b000)
	libXt.so.6 => /usr/lib/libXt.so.6 (0xb76e9000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0xb75ca000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0xb75bb000)
	libpam.so.0 => /lib/libpam.so.0 (0xb75af000)
	libdl.so.2 => /lib/libdl.so.2 (0xb75ab000)
	libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7579000)
	libc.so.6 => /lib/libc.so.6 (0xb73fe000)
	libuuid.so.1 => /lib/libuuid.so.1 (0xb73fa000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb73e0000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0xb73dd000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb73d8000)
	/lib/ld-linux.so.2 (0xb77a3000)
Is Xscreensaver even using OpenGL?

Edit edit: xscreensaver-gl-helper is loading libGL.so.1.

Last edited by liquidkaleidoscopes; 08-22-2011 at 10:25 PM.
 
Old 08-23-2011, 02:48 AM   #5
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,508

Rep: Reputation: 571Reputation: 571Reputation: 571Reputation: 571Reputation: 571Reputation: 571
Quote:
It also says '(EE) Failed to load module "fbdev" (module does not exist, 0)' and '(EE) Failed to load module "vesa" (module does not exist, 0). I think that this is irrelevent, but please tell me if I am wrong.
Yes, this doesn't matter, as long as it loads the i915 driver. I think yopu're doing fairly well, and just need to find the final hurdle and jump it. Post the o/p of

glxinfo |grep OpenGL
 
Old 08-25-2011, 09:11 PM   #6
liquidkaleidoscopes
LQ Newbie
 
Registered: Aug 2011
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
Yes, this doesn't matter, as long as it loads the i915 driver. I think yopu're doing fairly well, and just need to find the final hurdle and jump it. Post the o/p of

glxinfo |grep OpenGL
I maybe cheated a bit by booting into Gentoo and seeing what compilation options it used for the package. I have improved it, though it is not quite as fast as it should be. I am going to try with this:

Code:
./configure $XORG_CONFIG --with-driver=dri --enable-xcb --disable-debug --enable-glx-tls --enable-asm --with-dri-drivers=i915 --enable-gallium --with-state-trackers=glx,dri,egl,vega --disable-gallium-nouveau --enable-gallium-i915 --disable-gallium-radeon --disable-gallium-r600
Code:
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on i915 (chipset: 945GM)
OpenGL version string: 1.3 Mesa 7.10.3
Something looks weird there. Why in the world is it VMware? That's probably part of the problem. It's faster now, but not as fast as it should be.

At least I fixed the problem in with gtk programs crashed when I tried to drag and drop; apparently, gtk2 has that problem when it's compiled with -fomit-frame-pointer, which I used to compile things. After I disabled that cflag for that particular package, recompiled and reinstalled it, my gtk programs no longer crash.
 
Old 08-26-2011, 03:54 AM   #7
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,508

Rep: Reputation: 571Reputation: 571Reputation: 571Reputation: 571Reputation: 571Reputation: 571
I am not able to pass much comment on Mesa options, because I have forgotten that stuff, having achieved stability. I think you can leave out all the gallium options except --enable-gallium-i915. If it barfs on that, try removing glx-tls first.
FYI, here's my glxinfo |grep OpenGL
Quote:
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: Mesa DRI R600 (RV730 9495) 20090101 x86/MMX+/3DNow!+/SSE TCL DRI2
OpenGL version string: 2.1 Mesa 7.9.2
OpenGL shading language version string: 1.20
OpenGL extensions:
I concur that vmware looks odd in the render string.
 
Old 08-26-2011, 04:39 AM   #8
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Rep: Reputation: 396Reputation: 396Reputation: 396Reputation: 396
The primary Mesa/gallium development is done by vmware. You are using the intel gallium3D driver, which the folks at vmware (not intel) developed. That's why you have vmware as the vendor. It does provide 3D acceleration. This driver may not perform as well as the driver developed by Intel (which does not use the gallium infrastructure).

When you built mesa, did you end up with another i915_dri.so driver? If not, try rebuilding mesa without the --enable-gallium-i915 option.

Adam

Last edited by adamk75; 08-26-2011 at 04:47 AM.
 
Old 08-26-2011, 09:47 AM   #9
liquidkaleidoscopes
LQ Newbie
 
Registered: Aug 2011
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by adamk75 View Post
When you built mesa, did you end up with another i915_dri.so driver?
I did get that file. It looks like simplicity was best:

Code:
./configure $XORG_CONFIG --disable-debug --disable-gallium --with-dri-drivers=i915
Made it work perfectly. Thanks for all your help!

Edit: It worked perfectly for a while... but it's messed up again. I'm not sure what went wrong between then and now, but I'm trying to figure it out. I installed quite a few things, working on qt3, installing Firefox 6, avahi, cups... I at least have this right:

Code:
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) 945GM  x86/MMX/SSE2
OpenGL version string: 1.4 Mesa 7.10.3
Edit 2: Ok, this is messed up: If I start something CPU-intensive, like compilation, then the 3D acceleration works fine. For example, if I start compiling Firefox, then xscreensaver (this or glxgears is the quickest test I can run) runs at full speed. If I cancel the compilation, whatever I'm running that uses 3D acceleration instantly becomes jerky and slow.

Last edited by liquidkaleidoscopes; 08-26-2011 at 06:51 PM.
 
Old 08-27-2011, 02:49 AM   #10
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,508

Rep: Reputation: 571Reputation: 571Reputation: 571Reputation: 571Reputation: 571Reputation: 571
Might just be a load of broken pipes, and memory to be reorganised.
There has been recent kernel advances in the area of control groups and scheduling. I can't claim to be an expert (Haven't a clue really but you may have all that reorganisation sidelined into the control group of your user, slowing the other processes there.
 
Old 08-27-2011, 04:11 AM   #11
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Rep: Reputation: 396Reputation: 396Reputation: 396Reputation: 396
Please do not test with glxgears or xscreensavers. There are dozens of explanations as to why glxgears is not a benchmark and I'm willing to bet those reasons apply to most of the OpenGL xscreensaver hacks. Instead, test with something that actually stresses your video card. My suggestion would be openarena, which comes with a built-in benchmark.

Adam
 
Old 08-27-2011, 09:27 PM   #12
liquidkaleidoscopes
LQ Newbie
 
Registered: Aug 2011
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by adamk75 View Post
There are dozens of explanations as to why glxgears is not a benchmark and I'm willing to bet those reasons apply to most of the OpenGL xscreensaver hacks.
I'm downloading OpenArena. I've read what you're saying about GLXGears and XScreenSaver not being benchmarcks, but I find it difficult not to wonder: If they work fine on the same computer in one Linux O.S. with a similar configuration, why not in L.F.S.?

I've been curious of kernel 3 for a while anyway, and I noticed that my performance was better when I used the Gentoo kernel (2.6.39-r3), so I downloaded kernel 3.0.3 and started with a blank configuration (well, except for the vanilla kernel seed at www.kernel-seeds.org. I had made my other L.F.S. kernel with my previous .config file and 'make oldconfig'. I'm booted into 3.0.3 now and it seems to work well; I'm recompiling it now with cgroup support, which I somehow forgot the first time. I'll work on installing OpenArena and try to get a more definitive benchmark.

Edit:

http://dri.freedesktop.org/wiki/Benchmarking
Code:
./openarena.i386 +exec anholt 2>&1 | egrep -e '[0-9]+ frames'
Code:
840 frames 47.3 seconds 17.8 fps 15.0/56.3/285.0/17.9 ms
In Gentoo, which runs on another partition on the same hard drive, it is thrice as fast (about 45f.p.s.).

Last edited by liquidkaleidoscopes; 08-30-2011 at 06:56 PM.
 
Old 08-30-2011, 11:48 PM   #13
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 205

Rep: Reputation: 20
You need to recompile your kernel. In the menuconfig, you must activate option of
Code:
Device Driver --> Graphic Support --> Direct Rendering Manager -->
<M> Intel 850M, 845G, 852GM, 855GM, 865G
<M>   i915 driver
That should do
 
Old 08-31-2011, 06:36 AM   #14
liquidkaleidoscopes
LQ Newbie
 
Registered: Aug 2011
Posts: 27

Original Poster
Rep: Reputation: Disabled
Mine looks slightly different, probably because we're using different kernels. This is what I have in the same section:

Code:
<*>   Intel 8xx/9xx/G3x/G4x/HD Graphics
[*]     Enable modesetting on Intel by default
 
Old 08-31-2011, 11:29 AM   #15
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 205

Rep: Reputation: 20
Yeah, that one also (I f'got to mention it, sorry). The main point is: check all the options regarding 'Intel' on your graphics.
Anyways, just to make sure, what version is your kernel?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
looking for i915 parameter document or Is i915 good for N10? kaz2100 Debian 6 07-10-2011 06:17 PM
No hardware acceleration Medicati0in Linux - Newbie 1 08-23-2004 04:42 AM
3D Hardware Acceleration askGODdotcom Linux - Hardware 1 07-03-2004 11:52 AM
Hardware acceleration RedNex Linux - Newbie 3 06-14-2004 08:34 AM


All times are GMT -5. The time now is 12:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration