libva1 trying to open /usr/lib/dri/nvidia_drv_video.so ends up with segmentation fault

Bug #773466 reported by Leuke
326
This bug affects 70 people
Affects Status Importance Assigned to Milestone
Libva
Fix Released
Undecided
Unassigned
libva (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The version of libva included in Ubuntu 11.04 does not work with nvidia vdpau for hardware acceleration. Indeed typing vainfo in a console, it returns:

libva: libva version 0.31.1
Xlib: extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/nvidia_drv_video.so
Errore di segmentazione

And for example vlc, trying to use Gpu acceleration crashes with the same error.
This is a regression, because the previous version worked perfectly with vdpau in Ubuntu 10.10.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: libva1 1.0.8-3
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Fri Apr 29 19:05:33 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
ProcEnviron:
 LANGUAGE=it_IT:en
 LANG=it_IT.UTF-8
 SHELL=/bin/bash
SourcePackage: libva
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Leuke (leuke) wrote :
Revision history for this message
Con Kolivas (kernel-kolivas) wrote :

There didn't even seem to be a way to make it play back with the hardware acceleration disabled as vlc just kept segfaulting. A custom mplayer build spawned lots of errors too. It was literally impossible to play back any H264 videos.

For what it's worth, to get it working for myself I had to recompile libva, libvdpau and vdpau-video manually. I used unpatched versions of:
libva-1.0.12
libvdpau-0.4.1
vdpau-video-0.7.2

Revision history for this message
Ron Lewkowicz (blu-zee) wrote :

I just downgraded to the libva packages from 10.10 and it works OK now.

Revision history for this message
tong (tong) wrote :

@Ron:
could you please give a quick description of the procedure you followed ?
Thanks.

Revision history for this message
flandolt (landolt-f) wrote :
Revision history for this message
Zakhar (alainb06) wrote :

It might not be the same bug, because on the bug you are referring, VLC is still running and showing some images, be it low quality and with frame drops.

As the first poster says, in this case VLC is NOT running but spitting out a SEGFAULT.

My procedure to reproduce the bug :

- Have a clean Maverick installed.
- Add VLC
- Add VDPAU/VAAPI support
- Activate it in VLC
- Do a "dist-upgrade" to upgrade to Natty

=> BUG : VLC is now segfaulting.

I don't know if it does the same starting with a clean install (not tried it).

Since VLC, for some BluRay tracks readings is the reason why I had double boot Lucid/Maverick, I removed Natty and reverted to my Lucid (main) / Maverick (VLC BluRay & acceleration read), and I'll wait this bug is corrected (or workaround if it should work with a clean install for instance)

Revision history for this message
dw40 (xoobxa) wrote :

I've tried newer version of libva (1.0.12-1~xup ) from Ubuntu-X PPA and VLC works with nvidia vdpau without crashing. Ubuntu-X home page is

https://launchpad.net/~ubuntu-x-swat/+archive/x-updates?field.series_filter=

Revision history for this message
Rick Gabriel (klaxian1) wrote :

libva 1.0.12-1~xup seems to improve certain cases, but it doesn't work most of the time for me.

Revision history for this message
Anthony Williams (anthony-justsoftwaresolutions) wrote :

I have an ATI graphics card, using the ATI Catalyst fglrx proprietary drivers, and have the same problem.

vlc was crashing after call va_getDriverName():

VLC media player 1.1.9 The Luggage (revision exported)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
[0x1b83120] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Blocked: call to setlocale(6, "")
Blocked: call to setlocale(6, "")
brainfart cropping not supported, this could look slightly wrong ...
libva: libva version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0".
libva: va_getDriverName() returns 0
Segmentation fault

Setting the LIBVA_DRIVER_NAME environment variable to **anything** fixes the crash, even if it's not a valid driver name (e.g. "fred"):

VLC media player 1.1.9 The Luggage (revision exported)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
[0x18aa120] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Blocked: call to setlocale(6, "")
Blocked: call to setlocale(6, "")
brainfart cropping not supported, this could look slightly wrong ...
libva: libva version 0.32.0
libva: User requested driver 'fred'
libva: Trying to open /usr/lib/dri/fred_drv_video.so
libva: va_openDriver() returns -1

Setting LIBVA_DRIVER_NAME to "fglrx", and ensuring that /usr/lib/dri/fglrx_drv_video.so is linked to /usr/lib/va/drivers/fglrx_drv_video.so allows VLC to use the fglrx driver

Revision history for this message
msznapka (bigmartin) wrote :

after adding ppa:ubuntu-x-swat/x-updates, installing new updates and downgrading nvidia-current (to the version from ppa):

Xlib: extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/nvidia_drv_video.so
libva error: /usr/lib/dri/nvidia_drv_video.so has no function __vaDriverInit_0_32
libva: va_openDriver() returns -1
[0xea2550] avcodec decoder warning: Failed to open VA API

Revision history for this message
Marco Scholl (traxanos) wrote :

i can confirm it

Revision history for this message
sanktnelson (launchpad-maibaums) wrote :

confirmed for natty/32bit, nvidia GTS250

Revision history for this message
sanktnelson (launchpad-maibaums) wrote :

downgrading to libva1 and libva-X11-1 from maverick fixes vainfo for me, but vlc still crashes occaisonally and has serious video glitches.

Revision history for this message
Two Point Oh (twopt0) wrote :

nvidia ION graphics: GT218 [ION] (rev a2). When viewing videos (size matters not: same thing with 360p, 720p, 1080p) with vlc using libva1 1.0.12-1~xup from the ubuntu-x-swat-x-updates ppa, gpu acceleration works and the video plays fine up to a point at which vlc abruptly consumes all 4 GB of ram in the computer (Intel Atom D525 cpu) and starts to fail.
Example: downloading this Youtube video and playing in vlc: http://www.youtube.com/watch?v=rR94NDIfGmA
However, there is at least one test case that does not fail: downloading this Youtube video and playing it in vlc gives no problem, no weird memory usage, even at 720p: http://www.youtube.com/watch?v=9qY2MOe8j2M

Revision history for this message
SleepZ (davidrak) wrote :

I'd had the same issue with vdpau and vlc. I'm running a Geforce GT 430 with the proprietary driver 270.41.19. To solve I recompiled the latest vlc from source (I believe I manually installed a copy of libva as well) and everything is working fine now.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

There is upstream bugreport in Debian bugtracker: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626861

Did you try to update vdpau-va-driver package? From ppa:ed10vi86/video for example.

Revision history for this message
valdi (informatyk74) wrote :

In my case update vdpau-va-driver package from ppa:ed10vi86/video helped on this bug. Thanks, RussianNeuroMancer!

Revision history for this message
José L. Domingo López (ubuntu-24x7linux) wrote :

After updating vdpau-va-driver package to the latest version in the PPA from #16 now VLC doesn't crash, although HD DVB-T decoding is far slower than expected (lots of frames dropped and CPU @ 100% with a nVidia Corporation GT218 [GeForce 210] graphic card). And both vainfo and vdpauinfo still exit with error:

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

$ vdpauinfo
display: :0 screen: 0
Error creating VDPAU device: 1

I'll try to investigate the performance issue somewhere else, as I'm not sure if an AMD Athlon(tm) 64 Processor 3000+ if powerful enough for real-time HD content decoding with no frame drops.

Revision history for this message
Mahendra Tallur (mahen) wrote :

Hmm, I was about to ask "why don't you just update libva1 from the X updates PPA ?" but I figured out you have to get the new nvidia drivers as well and the 175.x nvidia driver from the PPA has some issues (at least in my case, it makes fullscreen apps slower under KDE 4.6.x, GF 9800 GTX).

... issues that were not triggered under Arch Linux, but it's probably because it needs some other newer components.

So, well, one has to make a choice :)

Revision history for this message
Mahendra Tallur (mahen) wrote :

Actually, please ignore my previous post, I misread the thread regarding the benefits of the X Updates PPA.
(well, it empasizes the fact it's not such a good idea to update the nvidia drivers at the same time anyway, if you use KDE)

Revision history for this message
Zakhar (alainb06) wrote :

It's one of these bugs that will never be fixed!

Well, that's open source... and as I don't have the skill myself to correct that, I'll skip entirely this version of Ubuntu (it's a show-stopper for me) and hope they'll do a better job on Oneiric.

Changed in libva (Ubuntu):
status: New → Confirmed
Revision history for this message
Maarten Bezemer (veger) wrote :

For me it works for ATI/fglrx with these steps:
1) Install fglrx and libva1 1.0.12-1~xup from https://launchpad.net/~ubuntu-x-swat/+archive/x-updates
2) Download and install http://www.splitted-desktop.com/~gbeauchesne/xvba-video/xvba-video_0.8.0-1_amd64.deb (the version from the repositories seems to be missing functions)
3) libva looks in /usr/lib/dri/ for its drivers and xvba-video installs in /usr/lib/va/ so create a symolic link to fix this: ln -s /usr/lib/va/fglrx_drv_video.so /usr/lib/dri/ (see comment #9)
4) set LIBVA_DRIVER_NAME to fglrx (export LIBVA_DRIVER_NAME=fglrx) eg in ~/.bashrc to prevent vlc crashes (see comment #9)
5) Optional, install vainfo and run the comment to see that everything is working correctly, for me (ATI HD5870) it returns:
libva: libva version 0.32.0
libva: User requested driver 'fglrx'
libva: Trying to open /usr/lib/dri/fglrx_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.32
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.8.0
vainfo: Supported profile and entrypoints
      VAProfileH264High : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD

So to return to this bug report, adding the LIBVA_DRIVER_NAME=fglrx and creating the symbolic link worked for me as a fix/workaround. So I suppose it should be included in the/a package so it is set automatically?

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

> So to return to this bug report, adding the LIBVA_DRIVER_NAME=fglrx and creating the symbolic link worked for me as a fix/workaround. So I suppose it should be included in the/a package so it is set automatically?

There is separate ticket about that: https://bugs.launchpad.net/xvba-video/+bug/800022

Revision history for this message
Brandon Snider (brandonsnider) wrote :

I updated the X-Updates ppa with libva 1.0.14 and with the newest version of vdpau-video. This solves, at the very least, the problem mentioned in comment #10, which was caused by a symbol mismatch between libva and vdpau-video.

The libva update will contain newer Intel code, and may address some issues on that platform.

Keep in mind for Nvidia users you need not only libva1 and its associated packages but also the nvidia proprietary driver and the vdpau-va-driver package to be installed. That's in addition to VLC, and libvdpau1.

Revision history for this message
Pablo Piaggio (papibe) wrote :

This is still not working for the regular Joe (official repos). Any update on this?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty

$ uname -a
Linux vanhalen 2.6.38-11-generic-pae #48-Ubuntu SMP Fri Jul 29 20:51:21 UTC 2011 i686 i686 i386 GNU/Linux

From Software Center:
    libvdpau1: 0.4.1-2ubuntu1
    vdpau-va-driver: 0.6.3-1
    libva1: 1.0.8-3
    libva-x11-1: 1.0.8-3

$ vainfo
libva: libva version 0.31.1
Xlib: extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/nvidia_drv_video.so
Segmentation fault

$ vlc --version
VLC media player 1.1.9 The Luggage (revision exported)
VLC version 1.1.9 The Luggage (exported)
Compiled by buildd on vernadsky.buildd (Jul 21 2011 11:32:22)
Compiler: gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)

Regards.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

vdpau-va-driver 0.7.3 is uploaded to Oneiric: http://packages.ubuntu.com/oneiric/vdpau-va-driver
Please check: is this issue still present in Oneiric?

Revision history for this message
Zakhar (alainb06) wrote :

With Oneiric, it works "out of the box".

But I have a complete freeze of the PC after around 15min inside a HD (1920) movie. Complete freeze meaning that even CTRL-ATL-F1 is not responsive, so you can't even shutdown properly the PC with a command.
Furthermore, I suspect (I haven't fully investigated) that Oneirci comes with some kind of compositing video (Compiz?) by default. And compositing + full screen video is bad because it generally means you get some "tearing" in the images.
With 10.10/10.04 I run with plain old not-compsiting metacity and I have a perfect image.

Not sure the freeze is related to VLC though, as Oneiric is quite young and might have this kind of nasty bug.

At the moment I'm reverting back to 10.10 for my BluRay/HD player Linux box.

Revision history for this message
Filip Vařecha (xaralis) wrote :

For me, everything works as expected in Oneiric. No crashes and definitely not something described by previous comment. This is Dell e6410 (core i5) + Nvidia NVS 320.

And for the record, Oneiric does have Compiz installed by default since it's Unity UI depends on it. If you don't want Compiz running, I suppose it can be done by using Gnome Classic session and turning of Compiz. I would not suggest trying to purge it from the system completely as the consequences might be a little unhappy for your Ubuntu installation (but I didn't tried it really).

Revision history for this message
Michele Giacomoli (michele-giacomoli) wrote :

Trying Maarten's procedure it worked on my notebook!! I'm using Ubuntu 11.10 Oneiric with Unity on an ATI HD 5600M with the last fglrx driver you can find in the Ubuntu repository (8.881-0ubuntu4)

Revision history for this message
Adam Niedling (krychek) wrote :

1. I have ATI HD 4330 and Ubuntu 11.10
2. Installed the latest propriatery driver from Ati's website (11.11)
3. Installed libva1 package from Ubuntu's official repo
4. Installed xvba-driver from splitted desktop
5. Set the symlink (sudo ln -s /usr/lib/va/drivers/fglrx_drv_video.so /usr/lib/dri/fglrx_drv_video.so)
6. Set the environment variable (export LIBVA_DRIVER_NAME=fglrx)
7. Now I get this output:

$ vainfo
libva: libva version 0.32.0
libva: User requested driver 'fglrx'
libva: Trying to open /usr/lib/dri/fglrx_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.32
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.8.0
vainfo: Supported profile and entrypoints
      VAProfileH264High : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD

However VLC and Mplayer are still laggy as hell, 100% CPU, so nothing has changed. Is there anything else that needs to be done to get this thing working? Thanks.

Revision history for this message
Maarten Bezemer (veger) wrote :

You enabled hardware acceleration in VLC? When looking at the output of 'vlc -vvv' you should see that vlc is accessing libva for hardware acceleration support. Otherwise it is not used.

Revision history for this message
Adam Niedling (krychek) wrote :

I didn't change anything in VLC, it always attepts to use acceleration by default, doesn't it?
Could you check this log file for me? I think it looks like VLC is using libva, but it's still sooo slow. (of course without -vvv it's faster, but still too slow)

Revision history for this message
Maarten Bezemer (veger) wrote :

It does not attempt it by default, the option can be found at Tools -> Preferences > Input&Codecs -> "Use GPU acceleration (experimental)"

But your vlc log shows that hardware acceleration is enabled (I see kind of the same in my logs):
libva: va_openDriver() returns 0
xvba_video: XVBA_GetSurface(): status 2
[0x89b09c4] avcodec decoder: Using VA API version 0.32 for hardware decoding.

But, your log also shows the vainfo output:
Xlib: extension "XFree86-DRI" missing on display ":0.0".

This looks like an error to me, unfortunately I do not know how to fix it (as I did not experience this error myself).
Hopefully someone else is able to help!

Revision history for this message
Adam Niedling (krychek) wrote :

I was able to make it work with libva1, libva-dev, xvba-video and mplayer-vaapi. I got all of these packages from splitted desktop. I compiled mplayer from source. Even the ""XFree86-DRI" missing" error message has gone away.

The problem is now that I can't install vlc, smplayer or do any apt-get upgrading because Ubuntu wants to upgrade libva1 and libva-dev now. Somehow I need to tell it to leave those packages alone.

1080p runs real smooth now, now I have evidence that this thingy is working.

Revision history for this message
Adam Niedling (krychek) wrote :

I opened bug #901863 for Ati owners having trouble with video acceleration.

Leuke (leuke)
summary: - libva1 trying to open /usr/lib/dri/nvidia_drv_video.so ends with
+ libva1 trying to open /usr/lib/dri/nvidia_drv_video.so ends up with
segmentation fault
Revision history for this message
Bob Bib (bobbib) wrote :

It's not reproducible in Ubuntu 12.04 LTS with vainfo 1.0.15-4.
Probably already fixed.

Changed in libva:
status: New → Fix Released
Changed in libva (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Maarten Bezemer (veger) wrote :

On a clean(-ish) system:
$ sudo apt-get install libva1 vainfo
<...>
Setting up vainfo (1.0.15-4) ...

$ 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

So I do not think it got fixed... at least not for my system

Revision history for this message
Maarten Bezemer (veger) wrote :

Oh... I was too hasty. This is another error... :(

Revision history for this message
Brandon Snider (brandonsnider) wrote :

cmatomic, have you got the vdpau-va-driver package installed?

Revision history for this message
CMatomic (cmatomic) wrote :

nvidia VA-API doesn't work in Ubuntu 12.04 LTS 64bits
in 64-bit version, the libva1 is detected with vlc player, but does not work in reality.
is more noticeable on Blu-rays with bit-rates above 35 Mbit / s (35000kb / s)
$ 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/nvidia_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.3
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264High : VAEntrypointVLD
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD

Revision history for this message
CMatomic (cmatomic) wrote :

" have you got the vdpau-va-driver package installed?"

Brandon Snider , yes i have vdpau-va-driver package installed in ubuntu 12.04 32 bits

Revision history for this message
Michalis Zisis (mixasgr) wrote :

I can confirm, in 12.04 64-bit there is this error...

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.