nvidia-180-libvdpau packages both libvdpau and libvdpau_nvidia

Bug #432172 reported by Stephen Warren on 2009-09-17
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers (Debian)
Fix Released
nvidia-graphics-drivers (Ubuntu)
Alberto Milone

Bug Description

According to http://packages.ubuntu.com/jaunty/i386/nvidia-180-libvdpau/filelist, the package nvidia-180-libvdpau includes not just the NVIDIA VDPAU driver, but also the VDPAU "wrapper" and "trace" libraries (libvdpau.so*, libvdpau_trace.so*). Moving forward, it should only contain the NVIDIA driver; the wrapper/trace libraries should be packaged elsewhere.

The rationale behind this is that VDPAU headers, the wrapper and trace library are all freely licensed, and hopefully soon to become a standard API with multiple implementations. At some unspecified point in the future,
the NVIDIA-provided driver packages (NVIDIA-*.run) will no longer ship these files. However, the NVIDIA implementation itself will still be part of our driver, and should continue to be packaged as such.

In summary, I expect the following packages to exist:

libvdpau (free):
(built from freedesktop.org source; see URL below)

/usr/lib/libvdpau.so.1 ->
/usr/lib/libvdpau_trace.so ->

libvdpau-dev (free):
(built from freedesktop.org source; see URL below)

/usr/lib/libvdpau.so -> /usr/lib/libvdpau.so.1

nvidia-180-libvdpau (restricted):
(built from NVIDIA .run file)

/usr/lib/libvdpau_nvidia.so ->

(where -> denotes a symlink)

FYI, see also:

This applies to both nvidia-180-* and nvidia-185-*.

Changed in nvidia-graphics-drivers (Debian):
status: Unknown → New
Bryce Harrington (bryce) on 2009-10-09
tags: added: jaunty
Stephen Warren (srwarren) wrote :

I've created a PPA containing libvdpau:

Mario Limonciello (superm1) wrote :

Once the ITP goes through in debian at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549626, we'll be able to sync that in and fix all the ubuntu packages. If it doesn't happen in a timely fashion during Lucid, we can pull it in manually, but it's much more preferable for them to put it in themselves first.

Mario Limonciello (superm1) wrote :

Stephen or Aaron:

Can you address Andres' concerns on those two debian bugs about the lack of version info on libvdpau_trace? I'd like to make sure we can have this package in Lucid, and that's the last pending concern it looks like.

Aaron Plattner (aplattner) wrote :

I just pushed a change that should address the concerns. Please let me know if this is sufficient or if additional changes are necessary. http://cgit.freedesktop.org/~aplattner/libvdpau/commit/?id=0537b13e292bc772e984872a3986e41fb51f9258

Aaron Plattner (aplattner) wrote :

Mario, does this layout look okay to you? I'd like to make an 0.3 release tonight.

Yet-to-be-released NVIDIA drivers will install:

/usr/lib/libvdpau.so -> libvdpau.so.1
/usr/lib/libvdpau.so.1 -> libvdpau.so.190.NN
/usr/lib/libvdpau_nvidia.so -> vdpau/libvdpau_nvidia.so.190.NN
/usr/lib/libvdpau_trace.so -> vdpau/libvdpau_trace.so.190.NN
/usr/lib/vdpau/libvdpau_nvidia.so.1 -> libvdpau_nvidia.so.190.NN
/usr/lib/vdpau/libvdpau_trace.so.1 -> libvdpau_trace.so.190.NN

git HEAD libvdpau will install:

/usr/lib/libvdpau.so -> libvdpau.so.1.0.0
/usr/lib/libvdpau.so.1 -> libvdpau.so.1.0.0
/usr/lib/vdpau/libvdpau_trace.so -> libvdpau_trace.so.1.0.0
/usr/lib/vdpau/libvdpau_trace.so.1 -> libvdpau_trace.so.1.0.0

The library will look for drivers in /usr/lib/vdpau/libvdpau_<driver>.so

Aaron Plattner (aplattner) wrote :

> The library will look for drivers in /usr/lib/vdpau/libvdpau_<driver>.so
I'm sorry, that should have read /usr/lib/vdpau/libvdpau_<driver>.so.1
(i.e. versioned in case we ever change the libvdpau <-> driver interface)

Mario Limonciello (superm1) wrote :

Hi Aaron:

Just took a look. Things look great, thanks for getting this arranged.

Aaron Plattner (aplattner) wrote :

Thanks Mario. I just made an 0.3 release with these changes: http://lists.freedesktop.org/archives/xorg-announce/2009-November/001200.html

It now builds the documentation too, so you'll probably want a libvdpau-doc package at some point.

Changed in nvidia-graphics-drivers-180 (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Alberto Milone (albertomilone)
affects: nvidia-graphics-drivers-180 (Ubuntu) → nvidia-graphics-drivers (Ubuntu)
Changed in nvidia-graphics-drivers (Ubuntu):
status: In Progress → Fix Released
Alberto Milone (albertomilone) wrote :

I have fixed this in Ubuntu Lucid:

$ dpkg-deb --contents nvidia-current_190.53-0ubuntu4_i386.deb | grep vdpau
-rw-r--r-- root/root 1472992 2010-01-11 23:02 ./usr/lib/nvidia-current/libvdpau_nvidia.so.190.53
lrwxrwxrwx root/root 0 2010-01-11 23:02 ./usr/lib/nvidia-current/libvdpau_nvidia.so -> libvdpau_nvidia.so.190.53

Stephen Warren (srwarren) wrote :

That doesn't look quite right; those files should be in /usr/lib/vdpau not /usr/lib/nvidia-current. Also, open-source libvdpau looks for libvdpau_${driver}.so.1 not libvdpau_${driver}.so. Of course, I suppose the libvdpau package could have been patched relative to the distributed source...

Alberto Milone (albertomilone) wrote :

Is the path to those libraries really important if ldconfig knows where to find them?

I put them in /usr/lib/nvidia-current because they belong to the nvidia-current package and, thanks to the new alternatives system that I implemented, each driver can have its own libraries that live in separate directories so that nvidia-current, nvidia-96 and nvidia-173 can be all installed at the same time. According to which one of them you choose the use, ldconfig will point to the directory where the libraries for that driver are located (i.e. /usr/lib/nvidia-current, in this case). Of course this is not particularly useful in this case, as only 1 driver supports vdpau.

As regards libvdpau_${driver}.so.1, good point, I forgot to add a link. I'll fix it.

Stephen Warren (srwarren) wrote :

libvdpau explicitly searches for /usr/lib/vdpau/libvdpau_${driver}.so.1. So, the files must exist there. There is a fallback in libvdpau to just search for libvdpau_${driver}.so (with no path) which will rely on ldconfig, but that's only to support older drivers that put the VDPAU driver directly in /usr/lib instead of in /usr/lib/vdpau. There shouldn't be any libvdpau_nvidia.so (i.e. without .1) in the new scheme. The files shouldn't be in the ldconfig search path, because applications don't directly link against them.

Alberto Milone (albertomilone) wrote :

Just to be clear, what happens if, for example, I have different versions of the nvidia driver (e.g. 190.53 and 185.xx.xx) installed at the same time? Does libvdpau pick up whatever /usr/lib/vdpau/libvdpau_nvidia.so.1 points to?

If so, I can make sure that all libvdpau_${driver} libraries are installed in /usr/lib/vdpau/ and that libvdpau_nvidia.so.1 points to the driver in use (as a slave link in the alternatives system).

Stephen Warren (srwarren) wrote :

Well, I don't think having multiple versions installed in parallel is a supported configuration, or even that useful?

Anyway, the rules are as follows, assuming I'm remembering correctly:

Open-source libvdpau.so* loads /usr/lib/vdpau/libvdpau_${driver}.so.1 (which is the defined canonical location now) and if that doesn't work, falls back to libvdpau_${driver}.so via ldconfig path. This fallback mechanism is because open-source libvdpau.so* needs to support both recent NVIDIA driver release (which place files into /usr/lib/vdpau) and older releases (which place files into /usr/lib).

The libvdpau.so* shipped with the NVIDIA binary driver only searches for libvdpau_${driver}.so (via ldconfig path) since the binary driver installer always installs the library, or a link to it, into /usr/lib/libvdpau_nvidia.so. Since /usr/lib may be named /usr/lib, /usr/lib32, /usr/lib64, ..., and the single binary we ship must work on all distros, it's simpler to rely on ldconfig path for our binary libvdpau.so*.

In simpler terms, what you propose sounds like it should work.

Alberto Milone (albertomilone) wrote :

Ok, version 190.53-0ubuntu6 should fix this.

Changed in nvidia-graphics-drivers (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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