[LINUX] HOW-TO use VAAPI HW Acceleration in Intel Core i3 / i5 / i7 integrated GPU - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: XBMC General Help and Support (/forumdisplay.php?fid=111)
+---- Forum: Linux and Live support (/forumdisplay.php?fid=52)
+---- Thread: [LINUX] HOW-TO use VAAPI HW Acceleration in Intel Core i3 / i5 / i7 integrated GPU (/showthread.php?tid=86581)
[LINUX] HOW-TO use VAAPI HW Acceleration in Intel Core i3 / i5 / i7 integrated GPU - alanwww1 - 2010-12-02 00:50
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)
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!)
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:
Let's check if we have properly upgraded the X drivers
Should see something like this in the middle part:
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.
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:
Now the compile of xbmc:
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:
If there is no error message we are good. Now we can compile.
Somehow xbmc looks for the libva libraries with the wrong filename, so i create symbolic links to the proper files.
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)
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:
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:
You can check a movie with the following command:
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.
- Hannes The Hun - 2010-12-02 00:53
thanks a lot for this, alan. I'd say this needs to become a wiki page.
Thank you - BoBeRzE - 2010-12-02 14:32
Thank you for the nice TUT. I will try what if im back from the office.
Core i5 650
Intel Intel X25-M G2 80GB SSD
I try this with a Ubuntu 10.10 Minimal Installation
Sorry for my poor english
My Linux experience is near Zero
- alanwww1 - 2010-12-02 14:50
BoBeRzE Wrote:My Linux experience is near Zero
I will make a step by step test on a minimal install and add some more explanations for you guys with little Linux experience. I think i screwed up the libva installation part. It is confusing because at some packages the intel libva part is called libva-driver-i965 on other ppa-s it is called i965-va-driver.
I will double check that and let you know.
- BoBeRzE - 2010-12-02 15:05
is it necessarily to add ppa:team-xbmc-svn/ppa an a few stps later ppa:lars-opdenkamp/xbmc-pvr? Or need we ppa:team-xbmc-svn/ppa to install libva1 libva-driver-i965?
I hope you know what i mine
- alanwww1 - 2010-12-02 16:48
That's where i made a mistake. I will correct it as soon as i get home. I have to check where we can get a properly compiled libva package.
- typhoe - 2010-12-02 18:35
today I was trying to use vaapi acceleration with my notebook too.
It's a Gateway NS10:
+ Core i3 330UM 1.2 GHz
+ Intel HD Graphics Dynamic Video Memory Technology 5.0 (Arrandale, not Clarkdale in my case)
+ 11.6" TFT 1366 x 768 ( WXGA )
I was stuck and doing some searchs on google when I found this topic...
Using the ubuntu repositories, the command line to install the packages for me, was:
sudo apt-get install libdrm2 libva1 i965-va-driver vainfo
So it's indeed i965-va-driver and not libva-driver-i965 using the Ubuntu repo
My problem (where I'm stuck) is that I don't get the VAProfileH264 support in vainfo with these packages...
I get only:
So now I'm looking for a ppa providing the libva package too, that will add the h264 support...
I found the instruction to install it manually (for example on this page: http://doityourselfhtpc.wordpress.com/2010/09/09/intel-core-i3-h264-gpu-acceleration-using-ubuntu-and-xbmc/ ) but I'd rather use a ppa.
So if you find anything, well, I'll watch this topic :-)
- George - 2010-12-02 18:53
alanwww1 Wrote:I created a guide for people having Intel Core i3 integrated motherboard, with onboard gpu.
I got it working like this a couple of days ago. But what's not working for my setup is my television switching modes, I mean: when I play a 23.something movie my tv used to switch to 24p mode. And when playing a DVD my tv used to switch to 50Hz mode. That was with a Nvidia card. But I cannot get that to work on my new computer. Could you please let me know whether you got that working?
- Hotemetoot - 2010-12-02 22:14
I found this article on the web. It might be intresting: http://doityourselfhtpc.wordpress.com/2010/09/09/intel-core-i3-h264-gpu-acceleration-using-ubuntu-and-xbmc/
- typhoe - 2010-12-02 22:17
Hotemetoot Wrote:I found this article on the web. It might be intresting: http://doityourselfhtpc.wordpress.com/2010/09/09/intel-core-i3-h264-gpu-acceleration-using-ubuntu-and-xbmc/
That's the link I put in my post just above ;-)