• 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 19
[LINUX] HOW-TO use VAAPI HW Acceleration in Intel Core i3 / i5 / i7 integrated GPU
#91
Edit:

There should be no need to Roll back. just install ubuntu-desktop with synaptic or apt-get, it will still use the updated packages from edgers. remove /etc/X11/xorg.conf completely, run apt-get install ubuntu-desktop, wait till it finishes, reboot and then try to follow the instructions on the first page (minus the vainfo/glxinfo part that might not work and eventually skipping the ppa stuff - but there is no harm doing that again). Removing xorg.conf and installing ubuntu-desktop should give you a working Ubuntu Desktop Edition to play with.

After that try creating/adjusting the xorg.conf, etc.

Good Luck!

---
My i3 530 VAAPI experience so far:

Had 4GB RAM, 2x2GB, one was defective, so after a lot of weird errors I found the defective RAM and pulled 1x2GB out of the system. Iḿ not sure if this still is the source for my problems (no dual channel RAM right now) or if its just general limitations of the I3 GPU.

Most 1080p MKVs play perfect and nice, but I got a few movies that stutter really bad. Pressing "O" I see the Framerate is between 15 and 20 most of the time. This works perfectly when I disable VAAPI and let the CPU decode the stuff.

Is 1080p perfect for everybody else and this is just me? It it a limitation? I'm quite disappointed how the I3 GPU performs right now...
Reply
#92
ingrimsch Wrote:Most 1080p MKVs play perfect and nice, but I got a few movies that stutter really bad. Pressing "O" I see the Framerate is between 15 and 20 most of the time. This works perfectly when I disable VAAPI and let the CPU decode the stuff.Is 1080p perfect for everybody else and this is just me? It it a limitation? I'm quite disappointed how the I3 GPU performs right now...

Hi Ingrimsch ! Thanks for all the feedback. I really appreciate it.
You are right that there are some high bitrate h264 files play with low fps.
Now it is completely different thing than what we had with with surface reuse problem. I have e sense that we have some lack of gpu resource here as the gpu is not rendering enough frames/second. Note that with the gpu we decode h264, render and it is scaling the image with shaders in one time. Maybe this is too much for the core i3 gpu. One user wrote that overclocking the gpu helped him. I think we already having a huge improvement with drivers as a few months back i was not able to have 25fps with bicubic upscaler on. Now we have more that 60. That's a great improvement already. I think it will be better and better. Also i am very much looking forward to the new Sandy Bridge motherboards and cpus. They will be 2x fast with all tasks with a 35-45W TDP. They will surely handle any h264 file without even having vaapi.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#93
alanwww1 Wrote:Hi Ingrimsch ! Thanks for all the feedback. I really appreciate it.
You are right that there are some high bitrate h264 files play with low fps.
Now it is completely different thing than what we had with with surface reuse problem. I have e sense that we have some lack of gpu resource here as the gpu is not rendering enough frames/second. Note that with the gpu we decode h264, render and it is scaling the image with shaders in one time. Maybe this is too much for the core i3 gpu. One user wrote that overclocking the gpu helped him. I think we already having a huge improvement with drivers as a few months back i was not able to have 25fps with bicubic upscaler on. Now we have more that 60. That's a great improvement already. I think it will be better and better. Also i am very much looking forward to the new Sandy Bridge motherboards and cpus. They will be 2x fast with all tasks with a 35-45W TDP. They will surely handle any h264 file without even having vaapi.

Overclocking definately helps, it seems to be a limitation of the gpu, I tried it and the stuttering MKVs play all smooth now. Maybe I'll measure both versions (OCed VAAPI vs. CPU Decoding) with a Power Meter tomorrow... would be interested to know what helps most in the means of saving energy just out of interest Big Grin Rolleyes Big Grin

Disappointed might be the wrong term. I changed from an Atom/Ion Combo to the I3 only Version, so I see the I3 VAAPI shortcomings to the ION setup I had before, but they are really not as bad as i make them sound. Following the evolution of this thread and VAAPI makes me believe there might be hope for better high bitrate performance. This was just a problem NV Ion users like me dont know about, high bitrate is no problem there. But using a Lanczos upscaler for example kills the Ion performance wise. The iGPU/VAAPI is way better on that front. Or used to kill as I havent tested this again lately. I also really like that I can use the nice Compiz visuals and XBMC at the same time without rendering one useless to enjoy the other. This is also something an ION user can only dream about until today.

But apart from all that the I3 can still render everything in software if all else fails. I'll keep the I3, and watch this thread closely to see what the time will bring. I'm sure the EDID detection will get fixed and there might be more small revolutions like the perfomance gain you mentioned before on the way. Again: Thanks for collecting the information, summing it all up and spoonfeeding the lazy masses (like me) Wink
Reply
#94
ingrimsch Wrote:Overclocking definately helps, it seems to be a limitation of the gpu, I tried it and the stuttering MKVs play all smooth now. Maybe I'll measure both versions (OCed VAAPI vs. CPU Decoding) with a Power Meter tomorrow... would be interested to know what helps most in the means of saving energy just out of interest Big Grin Rolleyes Big Grin

Thanks for the info. I am very much interested in knowing which one is more power efficient. Pure Software decoding, or with VAAPI.

When you overclock the GPU, does that also help with VAAPI performance ? That makes the problematic files smooth for you ? I think in the very near future we will only use software decoding with modern CPUs as they will handle any bitrate h264 files with no problem so there will be no sense using gpu decoding. I mean with Sandy Bridge, you can have a full 35W system which could have a 100% faster than the Core i3, thanks for the advanced new single core turbo. And that is all that matters, because in xbmc (and ffmpeg) h264 decoding is still single threaded.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#95
alanwww1 Wrote:When you overclock the GPU, does that also help with VAAPI performance ? That makes the problematic files smooth for you ?

Yep, makes all my stuttering files play smooth.

alanwww1 Wrote:Thanks for the info. I am very much interested in knowing which one is more power efficient. Pure Software decoding, or with VAAPI.

I tried a few things today while I was enjoying another day off Big Grin

My System right now is not 100% optimized for power efficiency (a Pico PSU or a smaller (maybe 300W) 80+ PSU would help to get power usage down another 5-10W in my opinion but they are just too expensive right now to live up to the costs. Beside that I have replaced a 4 Port NAS that ate constant 60-80W just for the 4 Harddrives, so this power consumption is better than my previous ION/NAS Combo.

My Test-Setup
Quote:Lian Li PC-Q08B
Zotac H55ITX-C-E with an Intel I3 530
2GB of Kingston Value Ram
4x 2TB 3.5" Samsung Drives as Storage
1x 1TB 2.5" Samsung Drive for OS and moving data / data in use
LG BH10LS30 Bluray Writer
550W BeQuiet PSU
3 Fans in the Case
(PCI-E discreet GPU - Zotac GT430 Zone Edition ZT-40601-20L) which I was trying to get rid of by using VAAPI and the iGPU

This is just to give you an overview what draws the Power. Idle means Ubuntu Desktop 10 Minutes after booting the system giving all the HDDs and the CPU/GPU time to settle down. I cant overclock the iGPU itself, so I had to OC the CPU/FSB instead which also OCs the iGPU. Undervolting means every Voltage has the minimum setting that crappy Zotac Board/BIOS allows. PHC Kernels I tried all had problems with Speedstepping so I havent tested them here. By XBMC I mean XBMC playing a 1080p high bitrate mkv for 5 Minutes. The GT430 was of course removed from the System when measuring VAAPI/Software power draw and was installed for the external GPU test while the iGPU was disabled in the BIOS. Here are my results:

Normal Setup, XBMC using Software decoding
Quote:72W Idle
88W XBMC

Undervolted System, XBMC using Software decoding
Quote:72W Idle
84W XBMC

Overclocked System to ~3,4GHz, XBMC using VAAPI
Quote:73W Idle
85W XBMC

Overclocked and Undervolted System, XBMC using VAAPI
Quote:73,5W Idle
86W XBMC

Normal Setup (no OC, no undervolting) using an Nvidia GT430 and VDPAU
Quote:78W Idle
92W XBMC

Undervolted System using an NVidia GT430 and VDPAU
Quote:76W Idle
90,5W XBMC

And thats it. At the end I´m very suprised how low the difference between all the setups was. Even with the GT430 the power consumption was pretty OK, which is why I tried that card too. It´ll be very interesting to see how the Sandy Bridge CPUs perform energy wise. Though I have to say that the I3 is completely capable of software decoding every content I tried perfectly and smooth. This might vary using HQ Upscalers / Deinterlacing on some material but I haven´t noticed any shortcomings. I for myself just like to have the CPU resources free for other tasks that might be running in the background and could interfere with the Software Renderer. But thats just my preference. Big Grin

Having the NVidia vs Intel iGPU experience here are a few things I noticed for every setup:

NVidia
Quote:+ EDID works, and every single 1080p Content plays absolutely smooth
- Compiz needs to be disabled
- ION is not very powerful, some upscalers might kill it performance wise (the GT430 is fine for everything though)

Intel
Quote:+ No need for a discreed, maybe expensive GPU
+- I think the Content plays a little bit (barely noticeable, a real micro stuttering, but it bugs me a little - maybe its just me?) less smooth in some situations like long, constant speed, camera movements. See this point neutral/sceptical as that might have had something to do with my modelines/my eyes/my brain... NV just feels slightly better. I don´t know how to describe it more precisely...
- my I3 stutters on *some* high bitrate 1080p content, a GPU limit which can be overcome by overclocking the iGPU
- iGPU doesn´t Dim/Black the Screen after a while running XBMC (which is a big minus for me, as I now have to worry about switching my AtmoLight off instead of just leaving the room. In the Ubuntu Desktop environment the Screen goes Black but the lights stay on... this is different with NVidia)

Thats just my experience of course. Maybe someone else can make use of this when building a new XBMC Setup. WinkBig GrinWink
Reply
#96
@ingrimsch

This was really a professionally done test. A lot of great new information.

For me the surprising number is how low the software decoding numbers are. I thought HW decoding should be much more power efficient than pure software one. But that is absolutely not the case.

About smoothness. I know what you are talking about. I think the difference is that with nvidia hw vertical sync is better handled. I see a slight tearing in menus with intel. I think that is what we feel as a slight smoothness difference. Maybe there is a way to tweak the xorg.conf to eliminate this little difference. Also i think with Wayland Display Server we will have much better synchronized frame display. Note that Wayland is only supported by Intel and AMD opensource drivers, because it needs Kernel Mode Setting enabled which is one thing Nvidia and AMD proprietary drivers don't have at all. I really look forward to the Sandy Bridge architecture. Maybe we can find the perfect hardware al last.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#97
I updated the guide with the following:

- New way of source code fetching from GIT. Note that the source completely moved to github. SVN repositories won't be upgraded anymore. http://xbmc.org/theuni/2011/01/02/xbmc-moves-to-git/

- Added libbluray compile and compile xbmc with libbluray support

- Made some facts clearer, added some new links
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#98
Great to see you so active on this Alan. I think this soon will beat ION.

Do you know how VAAPI handles color correction, sharpening, de-interlacing and divx upscaling?

And simultaneously audio over HDMI and SPdif?
Reply
#99
Robotica Wrote:Great to see you so active on this Alan. I think this soon will beat ION.Do you know how VAAPI handles color correction, sharpening, de-interlacing and divx upscaling?And simultaneously audio over HDMI and SPdif?

I have another good news. With updated drivers (Git 04.01.2011) from xorg edegers ppa (just do "sudo apt-get update" than "sudo apt-get upgrade". ALL my h264 files play perfectly smooth. Even the 30fps very high bitrate (over 40Mbps) Bluray files play perfectly :-)

About the other things you asked:
-Audio over HMDI is perfect. You can use 8channel LPCM sound up to 24bits and 192khz. Also when implementation will be ready by the Audio Engine developers, native passthrough of DTS-MA and Dolby TrueHD will work on this hw and drivers.
- Spdif also works as expected (i have not tested simultaneous hdmi-spdif sound)
- Divx hq upscaling with OpenGL shaders works perfectly with new drivers
- Deinterlacing only works with software decode so far. But that looks great. Great developer Bobo1on1 promised that he can implement the OpenGL based deinterlacing we use for software decoding to be also usable with VAAPI decoding. In that case that will be perfect.

I have only 2 issues remaining.
- Auto refresh rate WITH smoothvideo TOGETHER still not working. Only separatelly. Bobo1on1 told that this is caused by thread Video Reference Clock hanging when screenmode change. This problem can be eliminated if we can stop this thred while screenmode change happens. I will try to look into the code to help him fix this.
- I realized that in some cases when i start a video i have horrible playback with only a few fps speed rendering. If i pause and restart it goes back to normal. Maybe the cause of this thing is something similar to what we have with the previous problem.

That is it. I think we will have a system that is in par with ION pretty soon.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
Just a little bit more feedback from me.

I suppose because my ASRock 100HT is mobile i3 based I have a little less horsepower to play with - I can't decode full bluray MKV movies on CPU alone. With the overclocked GPU it works 95% perfectly, as I initially reported.

As for the remaining 5%:
* I have noticed the same issue you just mentioned - video stuttering until you pause/rewind and start again.
* Fast Forwarding/Rewinding the (full bluray) movie files breaks it completely, it chokes on the frames and never recovers. I am hoping this will clear up with driver updates perhaps.
* Occasionally I see a short drop in performance. It doesn't really drop frames according to XBMC but seems to slow down playback nonetheless for a second or two, then goes back to normal. It's not a show stopper, but if you're quality minded enough to want full Bluray movies that will most likely annoy you.

There is one option that I have courtesy of the mobile chipset; there's a Mini PCI-E slot on the mobo that I could use for a Broadcom CrystalHD I suppose...I am still considering that.

I had an ASRock ION 330HT-BD before, comparing the two I must say I would recommend the ION over VAAPI at present for anyone starting out with a new system. ION works out of the box with Dharma Live and without this excellent thread people would have little hope of getting the 100HT working correctly (as windows drivers have a refresh rate bug).
The advantage of the 100HT is certainly the extra horsepower, which is noticed using plugins, flicking through pictures etc.

I was hoping I would be able to play interlaced VC1 movies as well (BBC Stuff) but apparently that is not possible, not due to VAAPI but because FFMPEG can't deal with it. If you own Galapagos, Life, or any other BBC interlaced stuff, that's something to take into consideration.
Reply
Thnx for your anwers & sorry for asking so much (but I think it is good that the info is available)...
  • suspend / wakeup / WOL: Does this work? Can you suspend and wake up with your remote?
  • perfect playback at 23.97 or 59.94 Hz. Does this work?

ps. Also noticed all you dev work on TRAC. Great!
Reply
Robotica Wrote:
  • suspend / wakeup / WOL: Does this work? Can you suspend and wake up with your remote?
  • perfect playback at 23.97 or 59.94 Hz. Does this work?

Suspend, wakeup works perfectly, but (specially on Maverick) You have to do some tricks (That is not only needed for Core i3 systems. ION and other systems need this as well) . See my post here: http://forum.xbmc.org/showpost.php?p=658...tcount=168
I can add these steps into the guide if you guys want.

Perfect Playback of 23.97 and 59.94 works, but as auto refresh rate AND smoothvideo together not working yet, you have to disable smoothvideo to get it work (or enable smoothvideoand switch to the correct refresh rate manually). I will work on this problem. I hope i can fix this in the weekend. Also you need modelines in xorg.conf as in first post.

Robotica Wrote:ps. Also noticed all you dev work on TRAC. Great!


I am not in DEV status yet. I am just a guy who helps out the project in any way i can help. Well I hope i can be in dev status, once I reach a level in knowledge that I can be useful for the team in that way.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
Thnx. again. If it wasn't for you, VAAPI support (and some related issues) weren't at this level so don't be modest; there always will be something to learn about XBMC. In my opinion it is more a matter of dedication, attitude, general (IT) intelligence and focus than skills since you can't know it all on forehand. I hope soon someone like you will step up and do the same for AMD Fusion (and 780, 785 and 890 chipset). I think you already paved the way for that guy...

ps. Maybe this help identifying the USB-port:
root ~ # dmesg | grep mceusb

and than to enable something like:
echo enabled > /sys/bus/usb/devices/4-2/power/wakeup
Reply
Robotica Wrote:ps. Maybe this help identifying the USB-port:
root ~ # dmesg | grep mceusb

Yes. Thanks for the tip. That works ok, but i can not find a way to determine the other part with USB0, USB1 ... So far only HAL could be used to deterimine which HUB gets used, but now as we don't have HAL this is not working.

Also i will try to make a script that can handle these things automatically for ALL users. Even with other receivers not only mce remote.

Ps.: I read that AMD is working on native VAAPI support http://www.phoronix.com/scan.php?page=ne...&px=ODk4MQ and an opensurce driver for the 6xxx architecture (that includes Fusion as i know) http://www.phoronix.com/scan.php?page=ne...&px=ODk4OQ
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
alanwww1 Wrote:Yes. Thanks for the tip. That works ok, but i can not find a way to determine the other part with USB0, USB1 ... So far only HAL could be used to deterimine which HUB gets used, but now as we don't have HAL this is not working.

Also i will try to make a script that can handle these things automatically for ALL users. Even with other receivers not only mce remote.

Ps.: I read that AMD is working on native VAAPI support http://www.phoronix.com/scan.php?page=ne...&px=ODk4MQ and an opensurce driver for the 6xxx architecture (that includes Fusion as i know) http://www.phoronix.com/scan.php?page=ne...&px=ODk4OQ

Yes, I am actively following all news related to AMD Fusion. Maybe, check the Fusion topic for a good read on that... Patches are received very well. (I switched from i3 to AMD Fusion as my favorite HTPC platform....)

About the receivers:
Can you find that HUB info in the output from lsmod? Or root ~ # lsusb? Or root ~ # irw? Otherwise, I am sure you can ask openelec (or check his git); he solved most of those issues. i.e. http://openelec.tv/forum/36-solved-bug-r...-r4118#408
Reply
  • 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 19

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO use VAAPI HW Acceleration in Intel Core i3 / i5 / i7 integrated GPU4