[LINUX] HOW-TO use VAAPI HW Acceleration in Intel Core i3 / i5 / i7 integrated GPU

  Thread Rating:
  • 4 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
warpnine Offline
Junior Member
Posts: 11
Joined: Sep 2011
Reputation: 0
Post: #261
Hey guys,

I have the following problem:

Playing DTS-HD Master or Dolby True-HD Files I can only see, that the receiver is playing DTS or Dolby Digital over HDMI. Or won't I see the DTS-HD Master sign on the receiver because it is lpcm and not bitstreaming?

Many greetings!

Gigabyte GA-H55N-USB3
ITX with a Intel Core i3 540 passive cooling
Ubuntu 10.10 (Maverick) 64-bit Desktop
Samsung PS50C7790 TV
Onkyo TX-NR905 AV-Receiver
find quote
Mus_ Offline
Junior Member
Posts: 35
Joined: Mar 2011
Reputation: 0
Post: #262
hey guys,

I didn't check the whole thread and I didn't even use the guide, but have any of you seen this kind of screen corruption?

http://www.youtube.com/watch?v=hYi5QKt2KfA

It happens on my Arch Linux machine (Intel G620T, XBMC compiled from Git yesterday, libva 1.0.14). I reinstalled the machine and it was working fine before, so this must have been caused by some update I guess.

I tried different video settings, but none of it fixes it (except disabling VAAPI obviously).

It also doesn't happen always, sometimes it starts as soon as I start the movie, sometimes after a few minutes, sometimes not for hours, it's totally random...

Maybe anyone of you has a clue. I'm not really in the mood to downgrade packages. Wink

There is nothing interesting in the log file btw...
find quote
couchtyp Offline
Junior Member
Posts: 4
Joined: Sep 2011
Reputation: 0
Post: #263
xbmc_pitti Wrote:Hi couchtyp,
the problem you describe is related to the latest 7.12 mesa builds on xedgers-ppa. You can fix this by using the 7.11 Mesa packages from Ubuntu ONERIC.

Cu Pitti

Litte update on my part...
  • removed everything related to xorg-edgers ppa
  • dist-upgrade to oneiric
  • reinstalled xorg and xbmc
  • created Lircmap.xml for mceusb remote to work with lirc 0.9.0 Wink

Works like a charm now.
find quote
warpnine Offline
Junior Member
Posts: 11
Joined: Sep 2011
Reputation: 0
Post: #264
warpnine Wrote:Playing DTS-HD Master or Dolby True-HD Files I can only see, that the receiver is playing DTS or Dolby Digital over HDMI. Or won't I see the DTS-HD Master sign on the receiver because it is lpcm and not bitstreaming?

Does anybody have an solution or explanation for my question above?? Would be great, if somebody has an idea for me Smile

I really, really wants to get the DTS-Master and True-HD-Sound Big Grin

Gigabyte GA-H55N-USB3
ITX with a Intel Core i3 540 passive cooling
Ubuntu 10.10 (Maverick) 64-bit Desktop
Samsung PS50C7790 TV
Onkyo TX-NR905 AV-Receiver
(This post was last modified: 2011-10-02 21:18 by warpnine.)
find quote
muzah Offline
Junior Member
Posts: 1
Joined: Oct 2011
Reputation: 0
Post: #265
I bought a lenovo laptop with Intel HD Graphic. I'm glad to find a howto and have this kind of result :

Code:
vainfo
libva: libva version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.32
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileH264Baseline           :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointVLD

Everything seems good but this what mplayer says :

Code:
VIDEO:  [avc1]  1280x544  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
Error opening/initializing the selected video_out (-vo) device.

Why vdpau talk about nvidia driver when I do not have any nvdia gpu in the laptop ? Is there any link or something to do ?

sorry for my rusty english, I hope you understand something... And many thanks to alan for this howto !
find quote
tofxbmc Offline
Junior Member
Posts: 1
Joined: Oct 2011
Reputation: 0
Post: #266
I'm seeking for some help too.
I can't get VAAPI to work for decoding x264 video.

OS/XBMC version :
Debian GNU/Linux unstable (sid), 3.0.0-1-amd64 x86_64. Built on Sep 12 2011 (Git:Unknown)
This build is from debian-multimedia repository.
xbmc is started in standalone mode without a window manager.
X.Org X Server version : 1.11.1
Debian sid up to date as 2011-10-14.

Hardware (CPU/Video) : Intel® Core™ i3-2100 CPU @ 3.10GHz

vainfo :
Code:
libva: libva version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.32
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileH264Baseline           :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileVC1Simple              :    VAEntrypointVLD
      VAProfileVC1Main                :    VAEntrypointVLD
      VAProfileVC1Advanced            :    VAEntrypointVLD

XBMC log : http://pastebin.com/8n2ivX24

XBMC logs related to VAAPI :
Code:
12:18:36 T:140354858755840   DEBUG: CDVDFactoryCodec: compiled in hardware support: CrystalHD:no OpenMax:no VDPAU:yes VAAPI:yes
12:18:36 T:140354867148544   DEBUG: VAAPI - attempting to open codec 28 with profile 100 at level 41 with 4 reference frames
12:18:36 T:140354867148544   DEBUG: VAAPI - initialize version 0.32
12:18:36 T:140354867148544   DEBUG: VAAPI - profile 0
12:18:36 T:140354867148544   DEBUG: VAAPI - profile 1
12:18:36 T:140354867148544   DEBUG: VAAPI - profile 5
12:18:36 T:140354867148544   DEBUG: VAAPI - profile 6
12:18:36 T:140354867148544   DEBUG: VAAPI - profile 7
12:18:36 T:140354867148544   DEBUG: VAAPI - profile 8
12:18:36 T:140354867148544   DEBUG: VAAPI - profile 9
12:18:36 T:140354867148544   DEBUG: VAAPI - profile 10
12:18:36 T:140354867148544   DEBUG: VAAPI - making sure 7 surfaces are allocated for given 4 references
12:18:36 T:140354883933952 WARNING: Decode - avcodec_decode_video didn't consume the full packet. size: 8611, consumed: 0
Can the problem be caused by the last warning ?
Any other idea that could help identifying/fixing the problem ?
find quote
alexb38 Offline
Junior Member
Posts: 44
Joined: Nov 2010
Reputation: 0
Location: France
Post: #267
Hi, I cannot make VAAPI acceleration work. Everytime I activate it there is no video, the audio is playing and I see XBMC controls and the poster of the film in front of a black screen (I can make a screenshot if needed). If I hit "stop", then XBMC freezes and I must restart it.

I'm having exactly the same problem since may :
http://forum.xbmc.org/showthread.php?tid...age=23#229 (some answers on the next page, but nothing helpful)

Although I updated almost every package of my setup, the problem is exactly the same as before.

I tried another XBMC profile : same problem again.
I was using the main branch of xbmc git, but now I'm using opdenkamp's branch (xbmc-pvr) and same problem too.


With VLC it works totally fine, I can see the video :

Code:
DISPLAY=:0 vlc -v --ffmpeg-hw somefilm.mkv
...
libva: VA-API version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva: va_openDriver() returns 0
[0x1c41630] avcodec decoder: Using VA API version 0.32 for hardware decoding.

So it's an XBMC related problem I guess.

Here is what vainfo returns :

Code:
libva: VA-API version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Intel i965 driver - 1.0.15
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD

Here is the log when playing x264 movies :

Code:
14:45:31 T:140359237617408   DEBUG: CDVDFactoryCodec: compiled in hardware support: CrystalHD:no OpenMax:no VDPAU:no [b]VAAPI:yes[/b]
...
14:45:31 T:140359237617408  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: [b]H.264[/b] / AVC / MPEG-4 AVC / MPEG-4 part 10
...
14:45:31 T:140359091230464   DEBUG: VAAPI - attempting to open codec 28 with profile 100 at level 41 with 3 reference frames
14:45:31 T:140359237617408   DEBUG: CheckPlayerInit - dropping packet type:2 dts:125000,000000 to get to start point at 167000,000000
14:45:31 T:140359091230464   DEBUG: VAAPI - initialize version 0.32
14:45:31 T:140359091230464   DEBUG: VAAPI - profile 0
14:45:31 T:140359091230464   DEBUG: VAAPI - profile 1
14:45:31 T:140359091230464   DEBUG: VAAPI - profile 5
14:45:31 T:140359091230464   DEBUG: VAAPI - profile 6
14:45:31 T:140359091230464   DEBUG: VAAPI - profile 7
14:45:31 T:140359091230464   DEBUG: VAAPI - making sure 6 surfaces are allocated for given 3 references
14:45:31 T:140359237617408   DEBUG: CDVDPlayer::SetCaching - caching state 0
14:45:31 T:140359026824960   DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
14:45:31 T:140359026824960   DEBUG: RemoveActiveDevice - Removing device 0
14:45:31 T:140359901468544   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/ImageLib-x86_64-linux.so)
14:45:31 T:140359901468544   DEBUG: Loading: /usr/lib64/xbmc/system/ImageLib-x86_64-linux.so
14:45:31 T:140359026824960   DEBUG: PulseAudio: Context authorizing
14:45:31 T:140359026824960   DEBUG: PulseAudio: Context setting name
14:45:31 T:140359026824960   DEBUG: PulseAudio: Context ready
14:45:31 T:140359026824960   DEBUG: PulseAudio: Stream ready
14:45:31 T:140359026824960   DEBUG: PulseAudio: Default buffer attributes, maxlength=4194304, tlength=48000, prebuf=4
4164, minreq=3840
14:45:31 T:140359026824960   DEBUG: PulseAudio: Choosen buffer attributes, maxlength=4194304, tlength=48000, prebuf=4
4164, minreq=3840
14:45:31 T:140359026824960   DEBUG: CPulseAudioDirectSound::Initialize - Channels: 2 - SampleRate: 48000 - SampleBit:
16 - Resample false - IsMusic false - IsPassthrough 3 - audioDevice: default@default
14:45:31 T:140359026824960   DEBUG: CDVDPlayerAudio:: synctype set to 0: clock feedback
14:45:31 T:140359026824960   DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(10000,000000, 1)
14:45:31 T:140359026824960   DEBUG: CDVDPlayerAudio:: Discontinuity - was:4248,934000, should be:0,000000, error:-424
8,934000
14:45:31 T:140359237617408   DEBUG: CDVDPlayer::HandleMessages - player started 1
14:45:31 T:140359901468544   DEBUG: CGUIInfoManager::SetCurrentMovie(smb://192.168.0.2/data/somefilm.mkv)
14:45:31 T:140359901468544   DEBUG: GetMovieId (smb://192.168.0.2/data/somefilm.mkv), query = select idMovie from movie where idFile=5802
14:45:31 T:140359901468544   DEBUG: LoadVideoInfo, got movie info!
14:45:31 T:140359901468544   DEBUG:   Title = Somefilm
14:45:31 T:140359901468544   DEBUG: CAnnouncementManager - Announcement: OnPlay from xbmc
14:45:31 T:140359901468544   DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPlay
14:45:31 T:140359901468544   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
14:45:31 T:140359026824960   DEBUG: CDVDPlayerAudio:: Discontinuity - was:443970,185000, should be:309981,691467, err
or:-133988,493533
14:45:32 T:140359026824960   DEBUG: CDVDPlayerAudio:: Discontinuity - was:821298,644467, should be:713666,666667, err
or:-107631,977800
14:45:32 T:140359026824960   DEBUG: CDVDPlayerAudio:: Discontinuity - was:1097187,551667, should be:980166,384791, er
ror:-117021,166875
14:45:34 T:140359026824960   DEBUG: CDVDPlayerAudio:: Discontinuity - was:2130646,756791, should be:2152626,239765, e
rror:21979,482973
14:45:35 T:140359026824960   DEBUG: CDVDPlayerAudio:: Discontinuity - was:3303848,342765, should be:3374500,502729, e
rror:70652,159965
14:45:36 T:140359026824960   DEBUG: CDVDPlayerAudio:: Discontinuity - was:4494725,268729, should be:4521509,678838, e
rror:26784,410109
14:45:38 T:140359026824960   DEBUG: CDVDPlayerAudio:: Discontinuity - was:6790161,902838, should be:6807177,170504, e
rror:17015,267666
14:45:39 T:140359026824960 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
14:45:43 T:140359901468544   DEBUG: ------ Window Deinit (Pointer.xml) --
14:46:08 T:140359162083072   DEBUG: Thread Jobworker 140359162083072 terminating (autodelete)
14:46:08 T:140359254402816   DEBUG: Thread Jobworker 140359254402816 terminating (autodelete)
14:46:08 T:140359262795520   DEBUG: Thread Jobworker 140359262795520 terminating (autodelete)
14:46:08 T:140359346558720   DEBUG: Thread Jobworker 140359346558720 terminating (autodelete)

Here is my setup :
MB : Zotac H55-ITX-C-E
CPU : Intel Core i3 540 (Clarkdale with "Intel HD Graphics")
OS : Gentoo Linux 10.0, kernel 3.1.5-gentoo-ipv6-64
XBMC : XBMC-PVR (opdenkamp's xbmc fork) git from today (xbmc-pvr is merged with XBMC mainline's git every week or so).

Packages for VAAPI and XBMC :

Code:
[color=green]x11-libs/libdrm-2.4.27[/color]  USE="-libkms -static-libs" VIDEO_CARDS="intel -nouveau -radeon -vmware"
[color=green]media-libs/mesa-7.11.2[/color]  USE="classic egl gallium llvm nptl shared-glapi -bindist -debug -gbm -gles -motif -openvg -osmesa -pax_kernel -pic (-selinux) -shared-dricore" VIDEO_CARDS="intel -mach64 -mga -nouveau -r128 -radeon -savage -sis -tdfx -via -vmware"
[color=green]x11-base/xorg-server-1.11.2-r2[/color]  USE="ipv6 nptl udev xorg -dmx -doc -kdrive -minimal -static-libs -tslib -xnest -xvfb"
[color=green]x11-drivers/xf86-video-intel-2.17.0-r3[/color]  USE="dri -sna"
[color=green]x11-libs/libva-intel-driver-1.0.15[/color]
[color=green]x11-libs/libva-1.0.15[/color]  USE="opengl" VIDEO_CARDS="intel -dummy -fglrx -nvidia"
[color=green]media-video/ffmpeg-9999[/color]  USE="X alsa ass bzip2 encode faac hardcoded-tables mmx mp3 network pulseaudio qt-faststart rtmp sdl ssse3 theora threads truetype vaapi vorbis vpx x264 xvid zlib -3dnow -3dnowext -aac -aacplus (-altivec) -amr -avx -bindist -cdio -celt -cpudetection -debug -dirac -doc -frei0r -gnutls -gsm -ieee1394 (-iwmmxt) -jack -jpeg2k -libv4l -mmxext -modplug (-neon) -openal -openssl -oss -pic -schroedinger -speex -static-libs -test -v4l -vdpau (-vis)"
[color=green]media-tv/xbmc-pvr-9999[/color]  USE="airplay airtunes alsa avahi bluray css debug projectm pulseaudio rsxs rtmp samba sse sse2 udev vaapi webserver xrandr (-altivec) -goom -joystick -midi -profile -vdpau"

I have the same versions of packages as specified here :
http://intellinuxgraphics.org/2011Q4.html

When the VAAPI option isn't activated, everything works fine.

Any Ideas ? Am I the only one who has this problem with VAAPI acceleration in XBMC ?
find quote
alanwww1 Offline
Team-XBMC Member
Posts: 1,299
Joined: Nov 2008
Reputation: 31
Location: Hungary
Post: #268
Guys, I have a brand new guide, which is a lot more simplified and probably works a lot better with first generation Core processors.

http://forum.xbmc.org/showthread.php?tid=114368

I'd appreciate if someone could test it on first gen Core GPUs so that I can recommend the new guide to other users with the CPUs.

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.
find quote
alexb38 Offline
Junior Member
Posts: 44
Joined: Nov 2010
Reputation: 0
Location: France
Post: #269
It didn't help for me (and I'm using Gentoo so the commands are different Wink), but for Ubuntu users your guide looks very simple indeed, good work.
find quote
alexb38 Offline
Junior Member
Posts: 44
Joined: Nov 2010
Reputation: 0
Location: France
Post: #270
Well, it looks like it came from that configure option :
--enable-external-libraries

I recompiled XBMC without it and now it works !

Even if my external ffmpeg was up to date from the git everytime and with VAAPI activated, it looks like it was messing up with the VAAPI of XBMC... So now I'm using XBMC's internal ffmpeg, I will test different video formats to see if everything is ok.
find quote
Post Reply