Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 01-03-10, 01:49 AM   #1
Benni1233444
Registered User
 
Join Date: Oct 2009
Posts: 17
Default Mplayer+vdpau+composite = screen corruption

Dear Nvidia developers, in gentoo's bugzilla, there is a recent question about whereas mplayer's linking to libvdpau_nvidia.so is incorrect and should be replaced by a link to libvdpau.so.1

The maintainer of the nvidia-drivers ebuild from gentoo says that the current mplayer implementation may lead to screen corruption. Is this correct?
I can quote him here with:

http://bugs.gentoo.org/show_bug.cgi?id=297239#c10

Quote:
The VDPAU libraries belong in /usr/lib[32,64]/vdpau. Read the release notes by NVIDIA for 190.53. Applications should never link directly against libvdpau_nvidia.so but it appears some applications are incorrectly doing this. The ABI has changed to libvdpau_nvidia.so so applications will experience problems. Applications should always use libvdpau.so, which provides a proper abstraction for the specific implementation. x11-libs/libvdpau-0.3 has been updated by NVIDIA to use the new paths and as such its properly listed as a PDEPEND in the 190.53 ebuilds.

Rather than incorrectly changing the paths back, please say which apps you are having a problem with so they may be fixed. The big issue that apps will have is the fact that VDPAU is no longer a mutually exclusive operation and can be multiplexed with other operations such as OpenGL and even other VDPAU instances. This requires apps to use proper locks, which none of them do because the locking mechanism is abstracted away inside libvdpau. So using
VDPAU and OpenGL at the same time for an app that uses libvdpau_nvidia.so directly will result in screen corruption.
Is this correct?

The reason why I'm asking this to the nvidia developers is, that the gentoo maintainer of nvidia-drivers has written an ebuild package where applications cannot longer link to libvdpau_nvidia.so but must use libvdpau.

Unfortunately, since mplayer seems to link to libvdpau_nvidia.so, mplayer does not work with that ebuild.

Is the concern of the gentoo nvidia-drivers maintainer correct?
Is it true, that mplayer erroneously links to the wrong vpdau library which may lead to "screen corruption?

In this connection, it may be said that other gentoo users seem to have discovered a strange libvdpau bug:

http://bugs.gentoo.org/show_bug.cgi?id=297239#c22

Quote:
I've run ldd on all executables [of mythtv] in /usr/bin, as well as all shared libraries in /usr/lib64 and grepped for vdpau - in all cases I only found libvdpau.so.1 being requested. In no case did I find libvdpau_nvidia.so.

However, unless I either symlink libvdpau_nvidia.so to /usr/lib64 or I add /usr/lib64/vdpau to
ld.so.conf (through LDPATH in /etc/env.d/*) MythTV fails with "Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory."

I think there may be a bug in how libvdpau-0.3 is looking for the library and it can't find it unless it's in the ld.so.conf library path.
Dear nvidia developers, can you say something on this issue? Is it true that there is such a bug in libvdpau-0.3
Benni1233444 is offline   Reply With Quote
Old 01-03-10, 09:39 AM   #2
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: Mplayer+vdpau+composite = screen corruption

Correct, applications should not be linking directly against libvdpau_nvidia. However, doing so shouldn't be able to cause any corruption problems, it should be harmless.

As for finding the correct library, there have been problems in the past on some distributions where a stale copy of libvdpau 0.2 is left lying around and getting picked up by applications, which doesn't look in /usr/lib/vdpau for libvdpau_nvidia. Are you sure the correct version of libvdpau is being used by your applications? If so, please try running mplayer or mythtv with "strace -eopen" to see where it's looking. Even if the old version were being used, it should look at /usr/lib/libvdpau_nvidia.so which the .run installer creates as a symlink to /usr/lib/vdpau/libvdpau_nvidia.so.<version>.
AaronP is offline   Reply With Quote
Old 01-03-10, 02:31 PM   #3
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: Mplayer+vdpau+composite = screen corruption

Quote:
Originally Posted by Benni1233444 View Post
Dear Nvidia developers, in gentoo's bugzilla, there is a recent question about whereas mplayer's linking to libvdpau_nvidia.so is incorrect and should be replaced by a link to libvdpau.so.1
AFAICT, no MPlayer svn version was ever intended to be linked against libvdpau_nvidia.so, but libvdpau.so.1 since the first VDPAU commit in February (either via dynamic linking, or dynamic loading at runtime).

Carl Eugen
cehoyos is offline   Reply With Quote
Old 01-04-10, 02:15 AM   #4
devsk
Registered User
 
Join Date: Jun 2006
Posts: 46
Default Re: Mplayer+vdpau+composite = screen corruption

And the gentoo dev is right. I had created the symlink myself (/usr/lib/libvdpau_nvidia.so pointing to /usr/lib/vdpau/libvdpau_nvidia.so.<version>) and I observed server corruption after playing a movie in the composite enabled kde4.3.4.

Without that symlink, mplayer fails to run with -vo vdpau:

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

So, this is fixable only in mplayer?
devsk is offline   Reply With Quote
Old 01-04-10, 12:51 PM   #5
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: Mplayer+vdpau+composite = screen corruption

> So, this is fixable only in mplayer?

No, it sounds like there's either a driver installation problem, libvdpau installation problem, or a packaging error.

Applications must link to libvdpau.so. It's not possible for an application to link against libvdpau_nvidia.so and work at all; applications call an API in libvdpau.so (vdp_device_create_x11) that is not present in libvdpau_nvidia.so.

How it works is: App calls vdp_device_create_x11 in libvdpau.so. Then, libvdpau.so searches for libvdpau_nvidia.so. For some reason, your libvdpau.so isn't finding the libvdpau_nvidia.so that is installed on your system.

Questions:
1) How did you install the NVIDIA driver? From the .run file, from an ebuild, ...? Which version do you have installed?
2) How did you install libvdpau? From source, from an ebuild, ...? Which version do you have installed?
3) Please execute the following command:

ls -l /usr/lib*/*vdpau*

Thanks.
Stephen Warren is offline   Reply With Quote
Old 01-04-10, 02:01 PM   #6
devsk
Registered User
 
Join Date: Jun 2006
Posts: 46
Default Re: Mplayer+vdpau+composite = screen corruption

Quote:
Originally Posted by Stephen Warren View Post
1) How did you install the NVIDIA driver? From the .run file, from an ebuild, ...? Which version do you have installed?
190.53 using ebuild. This ebuild doesn't create the symlink for libvdvpau_nvidia.so in /usr/lib64 pointing to /usr/lib64/vdpau/<blah>. So, I manually created that symlink, played a movie with vdpau. The display corruption happened much later but I haven't seen that happen outside of this sequence of events.
Quote:
Originally Posted by Stephen Warren View Post
2) How did you install libvdpau? From source, from an ebuild, ...? Which version do you have installed?
gentoo ebuild. Latest ~amd64. I think 0.3.
Quote:
Originally Posted by Stephen Warren View Post
3) Please execute the following command:

ls -l /usr/lib*/*vdpau*

Thanks.
Code:
$ ls -l /usr/lib*/*vdpau*       
-rw-r--r-- 1 root root  940 2009-12-05 01:49 /usr/lib64/libvdpau.la
lrwxrwxrwx 1 root root   17 2009-12-26 11:52 /usr/lib64/libvdpau.so -> libvdpau.so.1.0.0
lrwxrwxrwx 1 root root   17 2009-12-26 11:52 /usr/lib64/libvdpau.so.1 -> libvdpau.so.1.0.0
-rwxr-xr-x 1 root root 5696 2009-12-05 01:49 /usr/lib64/libvdpau.so.1.0.0
-rw-r--r-- 1 root root  940 2009-12-05 01:49 /usr/lib/libvdpau.la
lrwxrwxrwx 1 root root   17 2009-12-26 11:52 /usr/lib/libvdpau.so -> libvdpau.so.1.0.0
lrwxrwxrwx 1 root root   17 2009-12-26 11:52 /usr/lib/libvdpau.so.1 -> libvdpau.so.1.0.0
-rwxr-xr-x 1 root root 5696 2009-12-05 01:49 /usr/lib/libvdpau.so.1.0.0

/usr/lib32/vdpau:
total 1444
lrwxrwxrwx 1 root root      25 2009-12-26 13:13 libvdpau_nvidia.so -> libvdpau_nvidia.so.190.53
-rwxr-xr-x 1 root root 1474604 2009-12-26 13:13 libvdpau_nvidia.so.190.53

/usr/lib64/vdpau:
total 1477
lrwxrwxrwx 1 root root      25 2009-12-26 13:13 libvdpau_nvidia.so -> libvdpau_nvidia.so.190.53
-rwxr-xr-x 1 root root 1458000 2009-12-26 13:13 libvdpau_nvidia.so.190.53
-rwxr-xr-x 1 root root     983 2009-12-05 01:49 libvdpau_trace.la
lrwxrwxrwx 1 root root      23 2009-12-26 11:52 libvdpau_trace.so -> libvdpau_trace.so.1.0.0
lrwxrwxrwx 1 root root      23 2009-12-26 11:52 libvdpau_trace.so.1 -> libvdpau_trace.so.1.0.0
-rwxr-xr-x 1 root root   51552 2009-12-05 01:49 libvdpau_trace.so.1.0.0

/usr/lib/vdpau:
total 1477
lrwxrwxrwx 1 root root      25 2009-12-26 13:13 libvdpau_nvidia.so -> libvdpau_nvidia.so.190.53
-rwxr-xr-x 1 root root 1458000 2009-12-26 13:13 libvdpau_nvidia.so.190.53
-rwxr-xr-x 1 root root     983 2009-12-05 01:49 libvdpau_trace.la
lrwxrwxrwx 1 root root      23 2009-12-26 11:52 libvdpau_trace.so -> libvdpau_trace.so.1.0.0
lrwxrwxrwx 1 root root      23 2009-12-26 11:52 libvdpau_trace.so.1 -> libvdpau_trace.so.1.0.0
-rwxr-xr-x 1 root root   51552 2009-12-05 01:49 libvdpau_trace.so.1.0.0
devsk is offline   Reply With Quote
Old 01-04-10, 02:07 PM   #7
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: Mplayer+vdpau+composite = screen corruption

I assume you're having problems with a 32-bit application.

I see that libvdpau.so is installed here:

-rw-r--r-- 1 root root 940 2009-12-05 01:49 /usr/lib/libvdpau.la
lrwxrwxrwx 1 root root 17 2009-12-26 11:52 /usr/lib/libvdpau.so -> libvdpau.so.1.0.0
lrwxrwxrwx 1 root root 17 2009-12-26 11:52 /usr/lib/libvdpau.so.1 -> libvdpau.so.1.0.0
-rwxr-xr-x 1 root root 5696 2009-12-05 01:49 /usr/lib/libvdpau.so.1.0.0

However, libvdpau_nvidia.so is installed here:

/usr/lib32/vdpau:
total 1444
lrwxrwxrwx 1 root root 25 2009-12-26 13:13 libvdpau_nvidia.so -> libvdpau_nvidia.so.190.53
-rwxr-xr-x 1 root root 1474604 2009-12-26 13:13 libvdpau_nvidia.so.190.53

I imagine that libvdpau.so is searching for /usr/lib/vdpau/libvdpau_nvidia.so (which does not exist), then falling back to /usr/lib/libvdpau_nvidia.so (which is why your symlink made things work).

This seems like a packaging bug; Either the files in /usr/lib32/vdpau need to be moved to /usr/lib/vdpau, or libvdpau.so needs to be built for and packaged into /usr/lib32.

I don't think any of your display-corruption issues could be related to any of this.
Stephen Warren is offline   Reply With Quote
Old 01-04-10, 02:09 PM   #8
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: Mplayer+vdpau+composite = screen corruption

Sorry, I guess based on your comments that you may be using a 64-bit app. Perhaps the ebuild of 64-bit libvdpau didn't specify /usr/lib64 as the directory that contains vdpau/libvdpau_nvidia.so (it's a configure parameter which possibly defaults to /usr/lib or /usr/lib32).
Stephen Warren is offline   Reply With Quote

Old 01-04-10, 02:50 PM   #9
devsk
Registered User
 
Join Date: Jun 2006
Posts: 46
Default Re: Mplayer+vdpau+composite = screen corruption

I don't follow. On 64-bit systems, /usr/lib is a symlink to /usr/lib64. So, the libraries are in the right place, even if configure passed /usr/lib for vdpau/libvdpau_nvidia.so. The symlink shouldn't even be needed if configure of libvdpau has such as argument.
devsk is offline   Reply With Quote
Old 01-04-10, 03:04 PM   #10
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: Mplayer+vdpau+composite = screen corruption

OK. Sorry, I'm not familiar with how Gentoo sets up 64-bit systems.

This behaviour is possible if libvdpau.so is really the NVIDIA-supplied libvdpau.so and not the open-source libvdpau.so. Can you run:

strings -a /usr/lib/libvdpau.so|grep 'nvidia id'

If there is a matching line, then you're using an NVIDIA-supplied libvdpau. Otherwise, you're using the open-source libvdpau.

The NVIDIA libvdpau.so does require libvdpau_nvidia.so to be present in the ld.so search path.

Gentoo should be packaging libvdpau.so from source, not from an extracted NVIDIA-supplied .run file, I think.
Stephen Warren is offline   Reply With Quote
Old 01-04-10, 09:22 PM   #11
devsk
Registered User
 
Join Date: Jun 2006
Posts: 46
Default Re: Mplayer+vdpau+composite = screen corruption

Quote:
Originally Posted by Stephen Warren View Post
OK. Sorry, I'm not familiar with how Gentoo sets up 64-bit systems.

This behaviour is possible if libvdpau.so is really the NVIDIA-supplied libvdpau.so and not the open-source libvdpau.so. Can you run:

strings -a /usr/lib/libvdpau.so|grep 'nvidia id'

If there is a matching line, then you're using an NVIDIA-supplied libvdpau. Otherwise, you're using the open-source libvdpau.

The NVIDIA libvdpau.so does require libvdpau_nvidia.so to be present in the ld.so search path.

Gentoo should be packaging libvdpau.so from source, not from an extracted NVIDIA-supplied .run file, I think.
There is no matching line found with that strings command. I think Gentoo is installing libvdpau0.3. I have no idea why the manual symlink is required. Or why the display goes eventually corrupt if I run mplayer with -vo vdpau.
devsk is offline   Reply With Quote
Old 01-05-10, 10:51 AM   #12
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: Mplayer+vdpau+composite = screen corruption

Odd. Can you follow Aaron's suggestion and run "strace -eopen mplayer -vo vdpau ...". That should display, amongst other things, a list of locations where libvdpau.so is searching for libvdpau_nvidia.so, which might give a clue as to what's wrong.
Stephen Warren is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:32 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.