Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need some help to get VAAPI support.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
redcap
n00b
n00b


Joined: 10 Jul 2010
Posts: 38

PostPosted: Tue Sep 10, 2013 10:03 pm    Post subject: Need some help to get VAAPI support. Reply with quote

Hi there,

I'm trying to set up a HTPC using xbmc and I'm running into some difficulities with VAAPI support. The machine has a i5-4670T
CPU with integrated Intel HD Graphics 4600. I'm able to launch Xbmc but video playback is unbearably slow (~ 4-5 fps). Curiously,
the CPU load is very low (~ 3%). Moreover, VAAPI support doesn't work at all. Executing vainfo results in

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 error: /usr/lib64/va/drivers/i965_drv_video.so init failed
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit


The file /usr/lib64/va/drivers/i965_drv_video.so actually exists.
Here is what dmesg has to say about it:

Code:

[ 3810.853051] WARNING: at drivers/gpu/drm/i915/intel_display.c:7894 intel_modeset_check_state+0x586/0x6a0()
[ 3810.853052] encoder's computed active state doesn't match tracked active state (expected 1, found 0)
[ 3810.853053] Modules linked in:
[ 3810.853056] CPU: 0 PID: 3635 Comm: X Not tainted 3.10.7-gentoo #1
[ 3810.853057] Hardware name: MSI MS-7850/H87-G41 PC Mate(MS-7850), BIOS V3.1 05/09/2013
[ 3810.853058]  ffffffff8160042b 0000000000000000 ffffffff8106536c ffff88040b022000
[ 3810.853060]  ffff88040cb36460 ffff88040cb36448 0000000000000001 ffff88040cb36000
[ 3810.853061]  ffffffff81065455 ffffffff8182a340 ffff880400000028 ffff88040272daf8
[ 3810.853063] Call Trace:
[ 3810.853066]  [<ffffffff8160042b>] ? dump_stack+0xd/0x17
[ 3810.853070]  [<ffffffff8106536c>] ? warn_slowpath_common+0x6c/0xa0
[ 3810.853071]  [<ffffffff81065455>] ? warn_slowpath_fmt+0x45/0x50
[ 3810.853073]  [<ffffffff813d3506>] ? intel_modeset_check_state+0x586/0x6a0
[ 3810.853076]  [<ffffffff8160376b>] ? __schedule+0x25b/0x730
[ 3810.853079]  [<ffffffff813a5a3b>] ? i915_read32+0x5b/0xf0
[ 3810.853081]  [<ffffffff81071be3>] ? lock_timer_base.isra.34+0x33/0x70
[ 3810.853083]  [<ffffffff81072017>] ? try_to_del_timer_sync+0x47/0x70
[ 3810.853085]  [<ffffffff813a5e71>] ? i915_write32+0x91/0x110
[ 3810.853087]  [<ffffffff813ec0af>] ? sandybridge_update_wm+0xdf/0x3b0
[ 3810.853088]  [<ffffffff813a5e71>] ? i915_write32+0x91/0x110
[ 3810.853091]  [<ffffffff813cae2d>] ? haswell_crtc_disable+0x15d/0x2d0
[ 3810.853094]  [<ffffffff8139c4cd>] ? drm_mode_obj_set_property_ioctl+0x32d/0x340
[ 3810.853096]  [<ffffffff8139c50c>] ? drm_mode_connector_property_set_ioctl+0x2c/0x40
[ 3810.853099]  [<ffffffff8138bae0>] ? drm_ioctl+0x460/0x560
[ 3810.853102]  [<ffffffff810ea21a>] ? handle_pte_fault+0x8a/0x780
[ 3810.853104]  [<ffffffff8139c4e0>] ? drm_mode_obj_set_property_ioctl+0x340/0x340
[ 3810.853107]  [<ffffffff8111f89a>] ? do_vfs_ioctl+0x8a/0x500
[ 3810.853109]  [<ffffffff81110b36>] ? __sb_end_write+0x26/0x60
[ 3810.853111]  [<ffffffff8110ef16>] ? vfs_write+0x196/0x1d0
[ 3810.853112]  [<ffffffff8111fd5d>] ? SyS_ioctl+0x4d/0xa0
[ 3810.853114]  [<ffffffff816059d6>] ? system_call_fastpath+0x1a/0x1f
[ 3810.853115] ---[ end trace ac949f6922761bed ]---


The user is in the video group and KMS is activated. I'm grateful for any helpful advice on the topic. To be honest, I'm entirely overwhelmed with the intricacies of the Linux graphics stack. Well, here are some installed packages along with their USE-flags:

Code:

emerge -vp xorg-server

[ebuild   R    ] x11-base/xorg-server-1.13.4:0/1.13.4  USE="ipv6 nptl suid udev xorg -dmx -doc -kdrive -minimal (-selinux) -static-libs -tslib -xnest -xvfb" 0 kB


Code:

emerge -vp xf86-video-intel

[ebuild   R    ] x11-drivers/xf86-video-intel-2.20.13  USE="dri sna udev -glamor -uxa -xvmc" 0 kB


Code:

emerge -vp libdrm

[ebuild   R    ] x11-libs/libdrm-2.4.45  USE="libkms -static-libs" VIDEO_CARDS="intel (-exynos) (-freedreno) -nouveau (-omap) -radeon -vmware" 0 kB


Code:

emerge -vp mesa

[ebuild   R    ] media-libs/mesa-9.1.2-r1  USE="bindist classic egl gallium llvm nptl shared-glapi -debug -gbm -gles1 -gles2 -openvg -osmesa -pax_kernel -pic (-r600-llvm-compiler) (-selinux) -vdpau (-wayland) -xa -xorg -xvmc" PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7 -python2_6" VIDEO_CARDS="intel -i915 -i965 -nouveau -r100 -r200 -r300 -r600 -radeon (-radeonsi) -vmware" 0 kB


Code:

emerge -vp libva

[ebuild   R    ] x11-libs/libva-1.0.15  USE="opengl -vdpau" VIDEO_CARDS="intel -dummy -fglrx -nvidia" 0 kB



... and emerge -- info

Code:

emerge --info
Portage 2.2.1 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.10.7-gentoo x86_64)
=================================================================
System uname: Linux-3.10.7-gentoo-x86_64-Intel-R-_Core-TM-_i5-4670T_CPU_@_2.30GHz-with-gentoo-2.2
KiB Mem:    16273220 total,  15668940 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Mon, 09 Sep 2013 19:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r2, 3.2.5-r2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo nektoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=corei7 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://gentoo.lagis.at/gentoo-distfiles/ rsync://ftp.halifax.rwth-aachen.de/gentoo/ rsync://ftp-stud.hs-esslingen.de/gentoo/ rsync://ftp.vectranet.pl/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/nektoo"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bindist bzip2 cli cracklib crypt cups cxx dri fortran gdbm iconv ipv6 mmx modules mudflap multilib ncurses nls nptl openmp pam pcre readline session sse sse2 ssl tcpd unicode vaapi zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


Thanks a lot in advance :-).
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Wed Sep 11, 2013 12:54 am    Post subject: Reply with quote

[s]Isn't that the ATI discrete card in that cpu?[/s]
Derp nvm!
Back to top
View user's profile Send private message
chrisyu
Apprentice
Apprentice


Joined: 10 Apr 2003
Posts: 207
Location: China

PostPosted: Thu Sep 12, 2013 8:25 am    Post subject: Reply with quote

You may need xbmc-fernetmenta to get proper vaapi support.

check this thread http://forum.xbmc.org/showthread.php?tid=116996
Back to top
View user's profile Send private message
redcap
n00b
n00b


Joined: 10 Jul 2010
Posts: 38

PostPosted: Fri Sep 13, 2013 8:59 pm    Post subject: Reply with quote

Thanks, chrisyu ... Unfortunately, I'm still stuck right at the beginning, i.e.
libva-intel-driver seems to be broken.

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 error: /usr/lib64/va/drivers/i965_drv_video.so init failed
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit


Meanwhile, I was able to fix xbmc's abysmal performance... problems with the sound card caused
the extremely slow playback. So even without vaapi video now runs smoothly. However, I'd still like
to benefit from VAAPI...
Back to top
View user's profile Send private message
weust
n00b
n00b


Joined: 28 Feb 2014
Posts: 26

PostPosted: Sun Apr 27, 2014 9:54 pm    Post subject: Reply with quote

Did you ever get vaapi to work?
Apart from your dmesg error I have the same problems.

Same error message with vainfo, and thus xbmc not using vaapi too.

I am running beta 4 of XBMC 13, but that doesn't matter for vaapi of course.
At the moment I am experiencing tearing and slight stuttering even though the CPU's aren't too busy.

My system is a Intel NUC new Haswell version.
Back to top
View user's profile Send private message
thender
Tux's lil' helper
Tux's lil' helper


Joined: 26 Aug 2013
Posts: 125

PostPosted: Mon Jun 16, 2014 6:28 am    Post subject: Reply with quote

Same thing here on a haswell based laptop.

Code:
# vainfo
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 error: /usr/lib64/va/drivers/i965_drv_video.so init failed
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
Back to top
View user's profile Send private message
weust
n00b
n00b


Joined: 28 Feb 2014
Posts: 26

PostPosted: Mon Jun 16, 2014 6:33 am    Post subject: Reply with quote

Try this topic https://forums.gentoo.org/viewtopic-t-990298.html.
Got it working myself in the end.

Documentation really lacks here.
As usual.
Back to top
View user's profile Send private message
thender
Tux's lil' helper
Tux's lil' helper


Joined: 26 Aug 2013
Posts: 125

PostPosted: Tue Jun 17, 2014 8:23 am    Post subject: Reply with quote

I got vaapi working by doing the opposite, I tried the newest unstable versions of the packages you suggested. In VLC, it's great- 10% CPU usage spikes on 1080p x264!

Bad news,nothing else works with VAAPI. Not mplayer,not avidemux.. so editing AVCHD video is terrible.

Avidemux says it has support for libva, but when I check it, and emerge libva-intel-driver, it doesn't do a damn thing. Over 100% CPU usage.

I tried x11-libs/libvdpau-va-gl. Now, when I use mplayer -vo vdpau, it WORKS, but I get identical CPU usage as I do when I do not use vdpau at all, and avidemux outright crashes when trying to use vdpau.

So this makes no sense, and is terribly disappointing and confusing. I cannot find a single linux video editor that works with hardware video acceleration on an intel GPU.. and that's sad.
Back to top
View user's profile Send private message
weust
n00b
n00b


Joined: 28 Feb 2014
Posts: 26

PostPosted: Tue Jun 17, 2014 9:24 am    Post subject: Reply with quote

Maybe some packages have been updated since I got it working, but at the time not all latest unstable was doing it for me.
I got sound but no video during playback in XBMC.
Menu and overlay stuff did all work though.

IMO it's all a bunch of crap slammed together lacking any useful documentation.
Back to top
View user's profile Send private message
thender
Tux's lil' helper
Tux's lil' helper


Joined: 26 Aug 2013
Posts: 125

PostPosted: Tue Jun 17, 2014 2:05 pm    Post subject: Reply with quote

weust wrote:
IMO it's all a bunch of crap slammed together lacking any useful documentation.


We seem to be in agreement about something! :lol: :twisted:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum