Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 672132 - x11-libs/libvdpau - add support for nouveau
Summary: x11-libs/libvdpau - add support for nouveau
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-28 06:31 UTC by gengreen
Modified: 2022-03-11 00:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild libvdpau + patch for nouveau (file_672132.txt,1.79 KB, text/plain)
2018-12-03 11:07 UTC, gengreen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gengreen 2018-11-28 06:31:34 UTC
libvdpau does not link to the nouveau vdpau drivers 
(/usr/lib/vdpau/libvdpau_nouveau.so) but only on libvdpau_nvidia.so

On a system with the nouveau drivers, application using the VDPAU wrapper ebuild  will be link to an incorrect path (ffmpeg, vlc, libav for example)

The ebuild libvdpau-1.1.1.ebuild should check if nouveau or nvidia is in use to assign the right path to vdpau.

https://nouveau.freedesktop.org/wiki/VDPAU/ nouveau is supporting vdpau, it make sense to correct this ebuild.


a/src/vdpau_wrapper.c
----------------------
@@ -129,7 +129,7 @@
             _vdp_get_driver_name_from_dri2(display, screen);
     }
     if (!vdpau_driver) {
         vdpau_driver = "nvidia";
     }   

Only one file to patch.
Comment 1 gengreen 2018-12-03 11:07:37 UTC
Created attachment 556990 [details]
Ebuild libvdpau + patch for nouveau


This issue isn't a priority, specially that it doesn't receive any update for few years now... I made small fix that I use in my own overlay, I share it here if someone else is interested by it.

Feel free to close this issue.
Comment 2 gengreen 2019-05-15 01:26:52 UTC
I update this issue since x11-libs/libvdpau-1.2 was available as stage in emerge. I emerged libdpau-1.2 and vdpauinfo.

Here the output :

display: :0.0   screen: 0
Failed to open VDPAU backend Error loading shared library libvdpau_nvidia.so: No such file or directory
Error creating VDPAU device: 1

While my system is using nouveau only, which provide his own library /usr/lib/vdpau/libvdpau_nouveau.so
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2019-05-15 08:05:01 UTC
Comment on attachment 556990 [details]
Ebuild libvdpau + patch for nouveau

>-----------------------------------------
>nouveau.patch
>-----------------------------------------
>
>--- a/src/vdpau_wrapper.c
>+++ b/src/vdpau_wrapper.c
>@@ -129,7 +129,7 @@
>             _vdp_get_driver_name_from_dri2(display, screen);
>     }
>     if (!vdpau_driver) {

The real question is, why does this check fail for you?

>-        vdpau_driver = "nvidia";
>+        vdpau_driver = "nouveau";

This code is intended to default to the case where vdpau_driver is not discovered (as above: why?) and presumably a very old version of nvidia-drivers is assumed. It should not fail for you and supplanting one default for another is not a good solution.

I suggest you bring your problem to the attention of the libvdpau developers instead of downstream at the OS distribution level.
Comment 4 Ionen Wolkens gentoo-dev 2022-03-11 00:07:25 UTC
As jer mentioned, I believe this would be better taken upstream.

Furthermore, cases where nouveau can use vdpau acceleration are somewhat limited (old cards + dumped firmware).