VA API doesn't work with fglrx driver from restricted repos

Bug #974205 reported by Stefan Lands
76
This bug affects 16 people
Affects Status Importance Assigned to Milestone
libva (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

1)
Description: Ubuntu precise (development branch)
Release: 12.04

2)
$ apt-cache policy libva-dev libva-egl1 libva-glx1 libva-tpi1 libva-x11-1 libva1 vainfo fglrx
libva-dev:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libva-egl1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libva-glx1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libva-tpi1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libva-x11-1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libva1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
vainfo:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status
fglrx:
  Installed: 2:8.960-0ubuntu1
  Candidate: 2:8.960-0ubuntu1
  Version table:
 *** 2:8.960-0ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/restricted amd64 Packages
        100 /var/lib/dpkg/status

3)
vainfo should report something like this:
vainfo: Supported profile and entrypoints
      VAProfileH264High : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD

4)
instead I get this, vainfo exits with error:

$ vainfo
libva: VA-API version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/fglrx_drv_video.so
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 6310 Graphics
OpenGL version string: 4.2.11627 Compatibility Profile Context

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: vainfo 1.0.15-4
ProcVersionSignature: Ubuntu 3.2.0-21.34-generic 3.2.13
Uname: Linux 3.2.0-21-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.0-0ubuntu2
Architecture: amd64
Date: Thu Apr 5 14:19:23 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120224)
ProcEnviron:
 TERM=xterm
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: libva
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Stefan Lands (wireded) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libva (Ubuntu):
status: New → Confirmed
Revision history for this message
QIII (qiii) wrote :

Exactly the same output from vainfo.

Minor differences in environment: Kubuntu Precise, ATI HD 5870

Revision history for this message
QIII (qiii) wrote :

Pardon me for the additional post. To confirm original entry by Stefan

$ apt-cache policy libva-dev libva-egl1 libva-glx1 libva-tpi1 libva-x11-1 libva1 vainfo
libva-dev:
  Installed: (none)
  Candidate: 1.0.15-4
  Version table:
     1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
libva-egl1:
  Installed: (none)
  Candidate: 1.0.15-4
  Version table:
     1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
libva-glx1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libva-tpi1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libva-x11-1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libva1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
vainfo:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status

$ vainfo
libva: VA-API version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/fglrx_drv_video.so
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

$ fglrxinfo
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon HD 5800 Series
OpenGL version string: 2.1 (4.2.11627 Compatibility Profile Context)

Revision history for this message
Heikki Keränen (heikki-a-keranen) wrote :

I have a 32-bit installation, but had the same problem. It tries to open:

libva: Trying to open /usr/lib/i386-linux-gnu/dri/fglrx_drv_video.so

but there was no such file in that directory.

However I found the is two files in the system:
/usr/lib/dri/fglrx_drv_video.so
/usr/lib/va/drivers/fglrx_drv_video.so

So for a quick fix I made a symbolic link:
cd /usr/lib/i386-linux-gnu/dri/
ln -s /usr/lib/va/drivers/fglrx_drv_video.so fglrx_drv_video.so

At least the vainfo reports now video acceleration is working.

Revision history for this message
QIII (qiii) wrote :

In a 64 bit installation, I did not find fglrx_drv_video.so.

However, if I installed XvBA, I found a symlink to the XvBA .so in /usr/lib/va/drivers which was called fglrx_drv_video.so, but that still left me with failed initialization.

Revision history for this message
QIII (qiii) wrote :

With the XvBA package installed and a symlink as described by Heikki, my vainfo output is now:

$ vainfo
libva: VA-API version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/fglrx_drv_video.so
xvba_video: XVBA_CreateContext(): status 11
libva error: /usr/lib/x86_64-linux-gnu/dri/fglrx_drv_video.so init failed
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Revision history for this message
Heikki Keränen (heikki-a-keranen) wrote :

I switched to 64-bit installation and for me there seems to be no difference to 32-bit:

* fresh up to date 64 bit 12.04 beta2
* installation of FGLRX closed source driver from system settings
* installing packages: vainfo, xvba-va-driver, libva-egl1, libva-glx1

$ cd /usr/lib/x86_64-linux-gnu/dri/
$ sudo ln -s /usr/lib/va/drivers/fglrx_drv_video.so fglrx_drv_video.so

$ vainfo
libva: VA-API version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/fglrx_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
vainfo: Supported profile and entrypoints
      VAProfileH264High : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD

Revision history for this message
norberto (netcaster) wrote :

same issue.

$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: ATI Radeon HD 4200
OpenGL version string: 3.3.11627 Compatibility Profile Context

Revision history for this message
QIII (qiii) wrote :

@Heikki --

I'll try to remove all and start from the top with only vainfo, xvba-va-driver, libva-egl1, libva-glx1.

However, there is another bug reported against xvba-va-driver in Precise.

Will go find it and post back.

Revision history for this message
QIII (qiii) wrote :

Find other bug at Bug #969579

Revision history for this message
QIII (qiii) wrote :

No improvement after cleanup and reinstall:

$ vainfo
libva: VA-API version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/fglrx_drv_video.so
xvba_video: XVBA_CreateContext(): status 11
libva error: /usr/lib/x86_64-linux-gnu/dri/fglrx_drv_video.so init failed
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

$ apt-cache policy libva-dev libva-egl1 libva-glx1 libva-tpi1 libva-x11-1 libva1 xvba-va-driver vainfo fglrx
libva-dev:
  Installed: (none)
  Candidate: 1.0.15-4
  Version table:
     1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
libva-egl1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libva-glx1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libva-tpi1:
  Installed: (none)
  Candidate: 1.0.15-4
  Version table:
     1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libva-x11-1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
libva1:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
xvba-va-driver:
  Installed: 0.7.8-1ubuntu2
  Candidate: 0.7.8-1ubuntu2
  Version table:
 *** 0.7.8-1ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/multiverse amd64 Packages
        100 /var/lib/dpkg/status
vainfo:
  Installed: 1.0.15-4
  Candidate: 1.0.15-4
  Version table:
 *** 1.0.15-4 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status
fglrx:
  Installed: 2:8.960-0ubuntu1
  Candidate: 2:8.960-0ubuntu1
  Version table:
 *** 2:8.960-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/restricted amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
QIII (qiii) wrote :

On a hunch, I modified my xorg.conf.

I removed

load "dri"

Now, all seems well. Suggest perhaps issue is with xorg.conf conflict?

$ vainfo
libva: VA-API version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/fglrx_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
vainfo: Supported profile and entrypoints
      VAProfileH264High : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD

My xorg.conf:

Section "ServerLayout"
 Identifier "amdcccle Layout"
 Screen 0 "amdcccle-Screen[1]-0" 0 0
EndSection

Section "Module"
 Load "glx"
EndSection

Section "Monitor"
 Identifier "0-DFP3"
 Option "VendorName" "ATI Proprietary Driver"
 Option "ModelName" "Generic Autodetecting Monitor"
 Option "DPMS" "true"
 Option "PreferredMode" "1920x1080"
 Option "TargetRefresh" "60"
 Option "Position" "0 0"
 Option "Rotate" "normal"
 Option "Disable" "false"
EndSection

Section "Monitor"
 Identifier "0-DFP4"
 Option "VendorName" "ATI Proprietary Driver"
 Option "ModelName" "Generic Autodetecting Monitor"
 Option "DPMS" "true"
 Option "PreferredMode" "1920x1080"
 Option "TargetRefresh" "61"
 Option "Position" "1920 0"
 Option "Rotate" "normal"
 Option "Disable" "false"
EndSection

Section "Device"
 Identifier "amdcccle-Device[1]-0"
 Driver "fglrx"
 Option "Monitor-DFP3" "0-DFP3"
 Option "Monitor-DFP4" "0-DFP4"
 BusID "PCI:1:0:0"
EndSection

Section "Screen"
 Identifier "Default Screen"
 DefaultDepth 24
EndSection

Section "Screen"
 Identifier "amdcccle-Screen[1]-0"
 Device "amdcccle-Device[1]-0"
 DefaultDepth 24
 SubSection "Display"
  Viewport 0 0
  Virtual 3840 1920
  Depth 24
 EndSubSection
EndSection

Revision history for this message
Mikolaj (mikolaj-babiak) wrote :

My Ubuntu 12.04 running on HP Probook 6465b is also affected. I managed to sort of fix it and get HW accelerated playback in VLC and mplayer by manualy putting "fglrx_drv_video.so" in /usr/lib/x86_64-linux-gnu/dri/. I took it from the package xvba-video_0.8.0-1_amd64.deb. HW accelerated playback is confirmed by vainfo and lower cpu usage.

$ vainfo
libva: VA-API version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/fglrx_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.8.0
vainfo: Supported profile and entrypoints
      VAProfileH264High : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD

$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 6620G
OpenGL version string: 4.2.11627 Compatibility Profile Context

Revision history for this message
norberto (netcaster) wrote :

Following Mikolaj #14 and Heikki Keränen #5 workarounds I download the pakage xvba-video_0.8.0-1_amd64.deb from http://www.splitted-desktop.com/static/libva/xvba-video/ and install it, then on a termina execute:

cd /usr/lib/i386-linux-gnu/dri/
sudo ln -s /usr/lib/va/drivers/fglrx_drv_video.so fglrx_drv_video.so

and works for me.

Revision history for this message
Anatoly Berbeka (ekzotech) wrote :

libva: va_openDriver() returns 0

Is it an error? Using ubuntu 12.04 with ATi 4570 (AMD Catalyst 12.3 builded from *.run) and receive Smplayer error:

"mplayer: libmpcodecs/vf.c:283: vf_get_image: Assertion `h == -1 || h >= vf->h' failed.

MPlayer interrupted by signal 6 in module: decode_video
ID_SIGNAL=6"

Video set to vaapi.

Symbolic link doesn't help me.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Bugs that may be related: bug 800022 and bug 821691.

piotr zimoch (ebytyes)
Changed in libva (Ubuntu):
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
mmalmeida (mmalmeida) wrote :

piotr - could you tell me how this was fixed?

I have the packages fglrx-amdcccle-experimental-12 and fglrx-experimental-12 installed, as well as vainfo.

Output of fglrxinfo:
display: :0 screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 6310 Graphics
OpenGL version string: 4.2.12172 Compatibility Profile Context 12.10.17

Output of vainfo:
libva: VA-API version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/i386-linux-gnu/dri/fglrx_drv_video.so
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Naturally, running VLC doesn't run with hw accelleration.
Am I missing something, or is the fix not yet available?

Cheers!

Revision history for this message
ronin12 (ronin12) wrote :

I had same problem:
"Trying to open /usr/lib/i386-linux-gnu/dri/fglrx_drv_video.so" (returned -1)
I tryied to fix this
When I used:
"cd ~
sudo mkdir Builds
cd Builds
sudo apt-get build-dep libva1
git clone git://anongit.freedesktop.org/vaapi/libva
cd libva
git checkout vaapi-ext
sudo ./autogen.sh --prefix=/usr
sudo make
sudo make install
cd.."
from
http://www.mythtv.org/wiki/VAAPI
the vainfo now showes:
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/fglrx_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.34 (libva 1.0.16.pre1)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
vainfo: Supported profile and entrypoints
      VAProfileH264High : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD

My lspci:
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn PRO [Radeon HD 7850] (prog-if 00 [VGA controller])
 Subsystem: Micro-Star International Co., Ltd. [MSI] Device 2730
 Flags: bus master, fast devsel, latency 0, IRQ 47
 Memory at e0000000 (64-bit, prefetchable) [size=256M]
 Memory at f7e00000 (64-bit, non-prefetchable) [size=256K]
 I/O ports at e000 [size=256]
 Expansion ROM at f7e40000 [disabled] [size=128K]
 Capabilities: <access denied>
 Kernel driver in use: fglrx_pci
Which means that still I have got only "256MB" RAM (shound be 2GB!:( )

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.