This is very experimental. Not for beginers. Don't do it on your everyday system !!
This guide is constantly updated as solutions come so check back often.
This piece of HW is really ideal for a htpc with very low power consumption having hw accelerated decoding of HD material. The problem was that the drivers were not in a state to really enjoy these boards with XBMC.
Now in Win7, with current svn, current drivers it is already working perfectly with DXVA2 acceleration, multichannel lpcm, and all things what nvidia cards can do.
On Linux, it is not so perfect, but we are already getting somewhere here. This is what i want to share. To have more people test this platform, because with a little help XBMC devs and Intel devs can make this a perfect hw.
What is working:
Smooth playback with SD and HD material.
VAAPI accelerated HD playback of h264 and mpeg2 files
Suspend to RAM
Up to 8 channels Multichannel LPCM over hdmi, dts,ac3 passthrough
HQ shader based upscalers
All this with totally opensource drivers
Not working yet:
vaapi acceleration for vc1 decoded files (this is not yet implemented in the drivers)
This guide will probably work for G45 (once support is ready) and the new Sandy Bridge architecture).
G45: MPEG2 only
Ironlake (first gen Intel HD graphics) MPEG2, H264
Sandy Bridge (2nd gen Intel HD graphics 2000 3000) MPEG2, H264, VC1 (progressive)
We will need an Ubuntu Maverick install (mini or full)
If you have a minimal install, start with installing basic packages and add you to the video group.( this is actually important, because without this xserver can not access your gpu directly and falls back to software rasterizer)
sudo apt-get update
sudo apt-get install udisks upower xorg alsa-utils mesa-utils
sudo adduser YourUserName video
sudo adduser YourUserName audio
Than let's start the real work.
We will update the intel drivers (http://intellinuxgraphics.org/index.html) to the very bleeding edge fresh git version as we need these for this hw at the moment. Later all these drivers get into the Linux kernel so we won't need this step in the near future. Luckily we don't have to compile anything. Because the ubuntu X-team has a great ppa with the newest packages. https://launchpad.net/~xorg-edgers/+archive/ppa (Please read the disclaimer here!)
sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libva1 vainfo i965-va-driver libva-glx1 libva-dev
You can check if lib vaapi is installed (when running X, with startx for minimal systems) with
Note that when you run startx on a minimal system only an xterm terminal shows on your top-left corner of screen. You have to make it active with a mouse click. If you can't see it, you can try to adjust your TV's overscan settings.
You should see something like this:
vainfo: VA API version: 0.31
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
Let's check if we have properly upgraded the X drivers
Should see something like this in the middle part:
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Ironlake Desktop GEM 20100330 DEVELOPMENT x86/MMX/SSE2
OpenGL version string: 2.1 Mesa 7.10-devel
OpenGL shading language version string: 1.20
Let's install a vaapi enabled xbmc. You can not use the main ppa version as it is not compiled with vaapi support. You have to compile one. Here is how we do it.
Fist install some dependencies for building xbmc.
sudo apt-get install git-core make g++ gcc gawk pmount libtool nasm yasm automake cmake gperf zip unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-gnutls-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libwavpack-dev libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs autopoint dh-autoreconf
Optional alternative step: Bluray navigation support
(that is handy if you have m2ts files with index files and you want to navigate to certain chapters on the bluray disc)
First compile libbluray:
git clone git://git.videolan.org/libbluray.git
sudo make install
Now the compile of xbmc:
git clone git://github.com/xbmc/xbmc.git
./configure --prefix=/usr --enable-vaapi --enable-libbluray
I have an untested patch for having smoothvideo working along with auto refresh rate. See http://trac.xbmc.org/ticket/10925 To use it just do it like this:
wget http://paste.kde.org/7020/raw/ -O ./ReferenceClockHang.patch
patch -p1 < ./ReferenceClockHang.patch
If there is no error message we are good. Now we can compile.
sudo make install
Somehow xbmc looks for the libva libraries with the wrong filename, so i create symbolic links to the proper files.
sudo ln -s /usr/lib/libva.so.1 /usr/lib/libva-0.31.1.1.so.1
sudo ln -s /usr/lib/libva-glx.so.1 /usr/lib/libva-glx-0.31.1.1.so.1
Now you can run xbmc and check playing of some movies. You should be playing files without stuttering.
With the newest drivers, any HQ upscaling method (like bicubic, lanczos) works without a problem. With older drivers we had some artifacts but thanks to Intel and mesa developers this is solved.
Also multichannel lpcm over hdmi is workin perfectly. You can test it (when X is running and unmuted iec devices)
speaker-test -Dhdmi -c6
Even channel mapping is perfect. Not like Nvidia 9400. This is great because this way you can play ANY unpassthroughable multichannel sound formats played in full surround (eg. flac, wma)
For auto refresh rate to work, we need custom modlines defined in xorg.conf. The reason for this is that the available refresh rates don't get properly enumerated, despite that raw EDID data gets read properly. See bug report: https://bugs.freedesktop.org/show_bug.cgi?id=32512
To create a proper xorg.conf, you have to check which output is used on your motherboard. To do this run:
When Xorg is running and check which port is plugged. Eg. HDMI1 or HDMI2 (in my case). The other task is to get modelines to your TV. Or just use mine. They suit for a normal 1080p full HD LCD or Plasma. Now create the xorg.conf:
sudo nano /etc/X11/xorg.conf
VendorName "INTEL Corporation"
Modes "[email protected]" "[email protected]" "[email protected]" "[email protected]"
HorizSync 14.0 - 70.0
VertRefresh 24.0 - 62.0
Modeline "[email protected]" 74.230 1920 2560 2604 2752 1080 1084 1089 1125 +hsync +vsync
Modeline "[email protected]" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
Modeline "[email protected]" 148.352 1920 1960 2016 2200 1080 1082 1088 1125 +hsync +vsync
Modeline "[email protected]" 148.500 1920 2008 2056 2200 1080 1084 1089 1125 +hsync +vsync
Of course you have to change HDMI2 to your output value.
If you have some problematic files that don't play well with vaapi you might want to try if how these h264 files work in mplayer. You can do the following:
sudo apt-get build-dep mplayer
tar -xpvf mplayer-vaapi-latest-FULL.tar.bz2
sudo make install
You can check a movie with the following command:
mplayer -vo vaapi -va vaapi moviename.mkv
Of course in time these drivers will get into the new Kernel releases and than we won't need anything to update, it will work out of the box with the next Ubuntu distro 11.04 Natty.
Any feedback, test results are more than welcome.