You are not logged in.

#1 2013-04-19 20:30:40

CEPfister
Member
Registered: 2011-08-10
Posts: 68

Switch to i915g instead of i915

Hello everyone !

A lot of people is still using gen2 and gen3 cards from intel i.e GMA 950/3000/X3000/X3100/3150. As stated in Phoronix,

http://phoronix.com/forums/showthread.p … he-Default

the i915g gallium2d driver from google is expected to be far better than the plain intel-dri one since it has full OpenGL 2.1 compliance. Arch Linux has always been the first distribution to stick to the newest tendencies until now !

Would you consider to do the switch?

Thanks a lot for your help !

Offline

#2 2013-04-19 20:42:50

Gusar
Member
Registered: 2009-08-25
Posts: 3,472

Re: Switch to i915g instead of i915

It's not "far better", it's a lot buggier: http://lists.freedesktop.org/archives/m … 37989.html. I wouldn't advocate switching until all those issues get fixed.

BTW, there's patches (one, two) that bring OpenGL 2.1 to the classic i915 driver.

Another BTW, X3000 and X3100 are gen4. Also, i915g does not support gen2.

And finally, nothing stops you from switching to i915g now. Just adjust the mesa PKGBUILD accordingly and compile.

Last edited by Gusar (2013-04-19 20:43:45)

Online

#3 2013-04-19 20:52:18

CEPfister
Member
Registered: 2011-08-10
Posts: 68

Re: Switch to i915g instead of i915

Thanks a lot for your enlightenment.  I would really like to try out i915g in order to see how it performs, but I am a bit scared to touch my mesa pkgbuild.

Do you think something like this is acceptable? I am not sure the intel-dri package is needed anymore, right?

# $Id: PKGBUILD 180351 2013-03-20 16:48:21Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>

pkgbase=mesa
pkgname=('intel-dri' 'mesa' 'mesa-libgl')
pkgver=9.1.1
pkgrel=1
arch=('i686' 'x86_64')
makedepends=('python2' 'libxml2' 'libx11' 'glproto' 'libdrm' 'dri2proto' 'libxxf86vm' 'libxdamage'
             'wayland' )
url="http://mesa3d.sourceforge.net"
license=('custom')
options=('!libtool')
source=(ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2
	    #ftp://ftp.freedesktop.org/pub/mesa/9.1/MesaLib-9.1-rc2.tar.bz2 # for RC testing
	    git-fixes.patch
        LICENSE)
md5sums=('6ea2bdc3b7ecfb4257b39814b4182580'
         'c3e45fe7287bbf8f620c209a872330dc'
         '5c65a0fe315dd347e09b1f2826a1df5a')

build() {
    cd ${srcdir}/?esa-*

    # pick 2 commits from master to
    # fix a nouveau crash: http://cgit.freedesktop.org/mesa/mesa/commit/?id=17f1cb1d99e66227d1e05925ef937643f5c1089a
    # and intel kwin slowness http://cgit.freedesktop.org/mesa/mesa/commit/?id=e062a4187d8ea518a39c913ae7562cf1d8ac3205
    patch -Np1 -i ${srcdir}/git-fixes.patch

    autoreconf -vfi # our automake is far too new for their build system :)

    ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --with-gallium-drivers=i915,swrast \
    --with-dri-drivers=i915,swrast \
    --enable-gallium-llvm \
    --enable-egl \
    --enable-gallium-egl \
    --with-egl-platforms=x11,drm,wayland \
    --enable-shared-glapi \
    --enable-gbm \
    --enable-glx-tls \
    --enable-dri \
    --enable-glx \
    --enable-osmesa \
    --enable-gles1 \
    --enable-gles2 \
    --enable-texture-float \
    --enable-xa \
    # --help
    # --with-llvm-shared-libs \ # enabling this would force us to move llvm-amdgpu-snapshot from community to extra, delay it until llvm 3.3 / Mesa 9.2/10.0

    make
    # fake installation
	mkdir $srcdir/fakeinstall
	make DESTDIR=${srcdir}/fakeinstall install
}

package_intel-dri() {
  pkgdesc="Mesa drivers for Intel"
  depends=("mesa-libgl=${pkgver}")

  install -m755 -d ${pkgdir}/usr/lib/xorg/modules/dri
  mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/i915_dri.so ${pkgdir}/usr/lib/xorg/modules/dri/

  install -m755 -d "${pkgdir}/usr/share/licenses/intel-dri"
  install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/intel-dri/"
}


package_mesa() {
  pkgdesc="an open-source implementation of the OpenGL specification"
  depends=('libdrm' 'libvdpau' 'wayland' 'libxxf86vm' 'libxdamage' 'systemd')
  optdepends=('opengl-man-pages: for the OpenGL API man pages')
  provides=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')
  conflicts=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')
  replaces=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')

  mv -v ${srcdir}/fakeinstall/* ${pkgdir}
  # rename libgl.so to not conflict with blobs - may break gl.pc ?
  mv ${pkgdir}/usr/lib/libGL.so.1.2.0 	${pkgdir}/usr/lib/mesa-libGL.so.1.2.0
  rm ${pkgdir}/usr/lib/libGL.so{,.1}

  install -m755 -d "${pkgdir}/usr/share/licenses/mesa"
  install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/"
}

package_mesa-libgl() {
  pkgdesc="Mesa 3-D graphics library"
  depends=("mesa=${pkgver}")
  provides=("libgl=${pkgver}")
  replaces=('libgl')
 
  # See FS#26284
  install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
  ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"

  ln -s mesa-libGL.so.1.2.0      ${pkgdir}/usr/lib/libGL.so
  ln -s mesa-libGL.so.1.2.0      ${pkgdir}/usr/lib/libGL.so.1
  ln -s mesa-libGL.so.1.2.0      ${pkgdir}/usr/lib/libGL.so.1.2.0

  install -m755 -d "${pkgdir}/usr/share/licenses/mesa-libgl"
  install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-libgl/"
}

Last edited by CEPfister (2013-04-20 15:56:36)

Offline

#4 2013-04-19 21:17:23

graysky
Member
From: The worse toilet in Scotland
Registered: 2008-12-01
Posts: 8,647
Website

Re: Switch to i915g instead of i915


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2013-04-19 21:19:59

CEPfister
Member
Registered: 2011-08-10
Posts: 68

Re: Switch to i915g instead of i915

It looks rather outdated.

Offline

#6 2013-04-20 11:52:49

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,402

Re: Switch to i915g instead of i915

CEPFister : then use it as a starting point and update it ?

after you've done that, please post a link to the new version on the aur comments so the maintainer can update it.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Online

#7 2013-04-20 11:58:49

CEPfister
Member
Registered: 2011-08-10
Posts: 68

Re: Switch to i915g instead of i915

Lone_Wolf wrote:

CEPFister : then use it as a starting point and update it ?

after you've done that, please post a link to the new version on the aur comments so the maintainer can update it.

That's what I have done actually. I have merged the official mesa PKGBUILD with the AUR one. I think the PKGBUILD I have shown two earlier posts is ok even if I haven't tried it out.

Offline

#8 2013-04-20 12:15:01

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,402

Re: Switch to i915g instead of i915

ok, that wasn't clear to me.

some comments about the PKGBUILD :

change the naming of the packages to something like mesa-i915g , intel-dri-i915g, mesa-libgl-i915g .
have them conflict and provide mesa, intel-dri and mesa-libgl .
added : also conflict and provide libgl
This helps a lot to prevent conflicts on updates.

add swrast to the gallium/dri drivers so users/program will have that as a fallback option incase something is terribly wrong with the i915g driver.

split packages are not supported by aur, check the splittest aur package for a workaround.

remove the line with $Id , it's only valid for official packages
change the 2 maintainer lines (jan de groot and adreas radke) to contributor , also add your own name (as maintainer or contributor, that's your choice).

Last edited by Lone_Wolf (2013-04-20 12:24:53)


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Online

#9 2013-04-20 16:02:47

CEPfister
Member
Registered: 2011-08-10
Posts: 68

Re: Switch to i915g instead of i915

I don't want to contribute to aur. However I have updated the PKGBUILD according to your recommendations.

# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>

pkgbase=mesa
pkgname=('intel-dri' 'mesa' 'mesa-libgl')
pkgver=9.1.1
pkgrel=1
arch=('i686' 'x86_64')
makedepends=('python2' 'libxml2' 'libx11' 'glproto' 'libdrm' 'dri2proto' 'libxxf86vm' 'libxdamage'
             'wayland' )
url="http://mesa3d.sourceforge.net"
license=('custom')
options=('!libtool')
source=(ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2
	    #ftp://ftp.freedesktop.org/pub/mesa/9.1/MesaLib-9.1-rc2.tar.bz2 # for RC testing
	    git-fixes.patch
        LICENSE)
md5sums=('6ea2bdc3b7ecfb4257b39814b4182580'
         'c3e45fe7287bbf8f620c209a872330dc'
         '5c65a0fe315dd347e09b1f2826a1df5a')

build() {
    cd ${srcdir}/?esa-*

    # pick 2 commits from master to
    # fix a nouveau crash: http://cgit.freedesktop.org/mesa/mesa/commit/?id=17f1cb1d99e66227d1e05925ef937643f5c1089a
    # and intel kwin slowness http://cgit.freedesktop.org/mesa/mesa/commit/?id=e062a4187d8ea518a39c913ae7562cf1d8ac3205
    patch -Np1 -i ${srcdir}/git-fixes.patch

    autoreconf -vfi # our automake is far too new for their build system :)

    ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --with-gallium-drivers=i915,swrast \
    --with-dri-drivers=i915,swrast \
    --enable-gallium-llvm \
    --enable-egl \
    --enable-gallium-egl \
    --with-egl-platforms=x11,drm,wayland \
    --enable-shared-glapi \
    --enable-gbm \
    --enable-glx-tls \
    --enable-dri \
    --enable-glx \
    --enable-osmesa \
    --enable-gles1 \
    --enable-gles2 \
    --enable-texture-float \
    --enable-xa \
    # --help
    # --with-llvm-shared-libs \ # enabling this would force us to move llvm-amdgpu-snapshot from community to extra, delay it until llvm 3.3 / Mesa 9.2/10.0

    make
    # fake installation
	mkdir $srcdir/fakeinstall
	make DESTDIR=${srcdir}/fakeinstall install
}

package_intel-dri() {
  pkgdesc="Mesa drivers for Intel"
  depends=("mesa-libgl=${pkgver}")

  install -m755 -d ${pkgdir}/usr/lib/xorg/modules/dri
  mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/i915_dri.so ${pkgdir}/usr/lib/xorg/modules/dri/

  install -m755 -d "${pkgdir}/usr/share/licenses/intel-dri"
  install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/intel-dri/"
}


package_mesa() {
  pkgdesc="an open-source implementation of the OpenGL specification"
  depends=('libdrm' 'libvdpau' 'wayland' 'libxxf86vm' 'libxdamage' 'systemd')
  optdepends=('opengl-man-pages: for the OpenGL API man pages')
  provides=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')
  conflicts=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')
  replaces=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')

  mv -v ${srcdir}/fakeinstall/* ${pkgdir}
  # rename libgl.so to not conflict with blobs - may break gl.pc ?
  mv ${pkgdir}/usr/lib/libGL.so.1.2.0 	${pkgdir}/usr/lib/mesa-libGL.so.1.2.0
  rm ${pkgdir}/usr/lib/libGL.so{,.1}

  install -m755 -d "${pkgdir}/usr/share/licenses/mesa"
  install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/"
}

package_mesa-libgl() {
  pkgdesc="Mesa 3-D graphics library"
  depends=("mesa=${pkgver}")
  provides=("libgl=${pkgver}")
  replaces=('libgl')
 
  # See FS#26284
  install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
  ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"

  ln -s mesa-libGL.so.1.2.0      ${pkgdir}/usr/lib/libGL.so
  ln -s mesa-libGL.so.1.2.0      ${pkgdir}/usr/lib/libGL.so.1
  ln -s mesa-libGL.so.1.2.0      ${pkgdir}/usr/lib/libGL.so.1.2.0

  install -m755 -d "${pkgdir}/usr/share/licenses/mesa-libgl"
  install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-libgl/"
}

Offline

#10 2013-04-20 21:34:05

graysky
Member
From: The worse toilet in Scotland
Registered: 2008-12-01
Posts: 8,647
Website

Re: Switch to i915g instead of i915

CEP- Good first draft, but it contains several errors.  I took a stab at it (running fine on my i7-3770K):  https://aur.archlinux.org/packages/mesa-i915g

Plz try it and report back.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2013-04-21 08:03:40

CEPfister
Member
Registered: 2011-08-10
Posts: 68

Re: Switch to i915g instead of i915

Great job. You take care of moving the right i915_dri.so, which is great. smile I'll try this.

Offline

#12 2013-04-21 10:55:01

graysky
Member
From: The worse toilet in Scotland
Registered: 2008-12-01
Posts: 8,647
Website

Re: Switch to i915g instead of i915

CEPfister wrote:

Great job. You take care of moving the right i915_dri.so, which is great. smile I'll try this.

Notice that I don't move it since that will destroy the ability to repackage if needed (makepkg -R).


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB