You are not logged in.

#1 2023-06-14 11:06:46

Anakievs
Member
Registered: 2023-06-12
Posts: 19

How to fix vdpau in mpv w/ the nvidia-340 driver

The official build of mpv has removed the "gl-x11" support which broke vdpau for the nvidia-340 driver. To bring it back I did the following:

1. Download PKGBUILD and 145077D82501AA20152CACCE8D769208D5E31419.asc.
2. Edit PKGBUILD and add this line in "_meson_options=()":

-Dgl-x11=enabled

3. Import the public key:

gpg --import 145077D82501AA20152CACCE8D769208D5E31419.asc

4. Build the source code and install the new mpv package.
5. To use vdpau the simplest way is to create "$HOME/.config/mpv/mpv.conf" with:

gpu-context=x11
hwdec=vdpau

More nvidia-340 fixes here:
How to fix KiCad with the nvidia-340 driver

Offline

#2 2023-06-14 16:33:53

aki72
Member
Registered: 2019-02-26
Posts: 3

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

Thank you. This worked for me too on nvidia-390xx

Offline

#3 2023-06-14 18:33:06

seth
Member
Registered: 2012-09-03
Posts: 58,905

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

Did you file/see a bug or anything else to know whether this is a deliberate omission? I see nothing in the version history itr.

Offline

#4 2023-06-14 18:52:52

Anakievs
Member
Registered: 2023-06-12
Posts: 19

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

@aki72 It should work. If some else confirms I might add nvidia-390 in the title.
@seth I don't understand what you've said. I don't even know if it was for me. English is not my native language.

Offline

#5 2023-06-14 18:59:57

seth
Member
Registered: 2012-09-03
Posts: 58,905

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

Yes, was for you.
=> https://www.deepl.com/translator

The official build of mpv has removed the "gl-x11" support

Do you think that was intentional?
Otherwise the package should be fixed.

Offline

#6 2023-06-14 19:06:29

Anakievs
Member
Registered: 2023-06-12
Posts: 19

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

By the "official" I mean "Arch repositories". It was also removed from Void Linux. Few years ago (when I was Void user) it stopped working I and I've tried different stuff until it worked. I haven't done anything else. Now I am sharing it to help other people.

Edit: It wasn't officially removed but the nvidia-340 is obsolete and doesn't support egl or some parts of it.

Last edited by Anakievs (2023-06-14 19:12:01)

Offline

#7 2023-06-14 19:12:43

aki72
Member
Registered: 2019-02-26
Posts: 3

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

mpv-1_0.34.1-5 this one was the last working version for me.

Offline

#8 2023-06-14 19:23:27

seth
Member
Registered: 2012-09-03
Posts: 58,905

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

Changelog of 1.35.0-1
https://gitlab.archlinux.org/archlinux/ … bb478a9bcc

I'd say the upstream build defaults changed, you might want to file a bug to re-add the feature in the repo build:
https://bugs.archlinux.org/newtask?proj … ER+SUMMARY

Offline

#9 2023-06-14 19:36:06

Anakievs
Member
Registered: 2023-06-12
Posts: 19

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

For me it stopped working way earlier about version 1.30 or 1.31. Tomorrow I can dig the exact version (I've reported it to the void reddit). I don't think if I file a bug something will change. It works on modern GPUs. It also worked on my GPU through the nouveau driver but I prefer to use the nvidia driver. I had to extract some data from the proprietary driver. If I remember correctly vaapi also worked.

Last edited by Anakievs (2023-06-14 19:43:04)

Offline

#10 2023-06-14 19:45:24

seth
Member
Registered: 2012-09-03
Posts: 58,905

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

For me it stopped working way earlier about version 1.30 or 1.31.

On void or arch?

I don't think if I file a bug something will change.

It wasn't a default option upstream since at least 2021, https://github.com/mpv-player/mpv/issues/8515
If  aki72 is correct and it was available w/ 1.34.1-5, (and 1.35.0-1 is the first failure) it's also not because of the meson build (which came later)
The packager needs to be aware of the condition to reject any change.

Offline

#11 2023-06-14 19:49:45

Anakievs
Member
Registered: 2023-06-12
Posts: 19

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

Void.

Offline

#12 2023-06-14 19:51:12

seth
Member
Registered: 2012-09-03
Posts: 58,905

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

@aki72, how certain are you about the breaking release?

Offline

#13 2023-06-14 19:57:33

aki72
Member
Registered: 2019-02-26
Posts: 3

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

100% I tested all 1.35.xx mpv and I went back every time to 1.34 because this one was working.

Offline

#14 2023-06-14 20:04:58

Anakievs
Member
Registered: 2023-06-12
Posts: 19

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

It's probably mpv-0.32.0_4 (from Void) because I keep the package.

Offline

#15 2023-06-14 20:22:09

seth
Member
Registered: 2012-09-03
Posts: 58,905

Offline

#16 2023-06-15 08:32:29

Anakievs
Member
Registered: 2023-06-12
Posts: 19

Re: How to fix vdpau in mpv w/ the nvidia-340 driver

Edit:
I can confirm that vdpau doesn't work for me with version "0.34.1-5". It reports this "Cannot load cuDevicePrimaryCtxRetain" but might not be related. This was not live image I've downgraded my computer.

Original:
The first version without "gl-x11" is 0.33.0-2.I've downloaded an old Arch live image and tested few versions. Some output:

for mpv 0.33.0-1

mpv --gpu-context=help
GPU contexts (APIs):
    auto (autodetect)
    wayland (opengl)
    x11egl (opengl)
    x11 (opengl)
    drm (opengl)
    waylandvk (vulkan)
    x11vk (vulkan)

mpv -v | head -n20
[cplayer] Command line options: '-v'
[cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
[cplayer]  built on UNKNOWN
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       56.51.100
[cplayer]    libavcodec      58.91.100
[cplayer]    libavformat     58.45.100
[cplayer]    libswscale      5.7.100
[cplayer]    libavfilter     7.85.100
[cplayer]    libswresample   3.7.100
[cplayer] ffmpeg version: n4.3.1
[cplayer]
[cplayer] Configuration: /usr/bin/waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --enable-libsmbclient --disable-build-date
[cplayer] List of enabled features: 52arch aligned_alloc alsa asm atomics caca cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build drm drmprime dvbin dvdnav egl egl-drm egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jack javascript jpeg lcms2 libarchive libass libass-osd libav-any libavcodec libavdevice libavutil libbluray libdl libm libmpv-shared libplacebo librt libsmbclient linux-fstatfs lua memfd_create optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 vt.h vulkan wayland wayland-protocols x11 xv zlib
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Applying profile 'default'...
[cplayer] Reading config file /home/archiso/.config/mpv/mpv.conf
[cplayer] Applying profile 'default'...
[cplayer] Setting option 'osd-duration' = '400' (flags = 4)
[cplayer] Setting option 'osd-bar-align-y' = '-0.98' (flags = 4)

for mpv 0.33.0-2

mpv --gpu-context=help

GPU contexts (APIs):
    auto (autodetect)
    wayland (opengl)
    x11egl (opengl)
    drm (opengl)
    waylandvk (vulkan)
    x11vk (vulkan)

mpv -v | head -n20

[cplayer] Command line options: '-v'
[cplayer] mpv 0.33.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
[cplayer]  built on UNKNOWN
[cplayer] FFmpeg library versions:
[cplayer]    libavutil       56.51.100
[cplayer]    libavcodec      58.91.100
[cplayer]    libavformat     58.45.100
[cplayer]    libswscale      5.7.100
[cplayer]    libavfilter     7.85.100
[cplayer]    libswresample   3.7.100
[cplayer] FFmpeg version: n4.3.1
[cplayer] 
[cplayer] Configuration: /usr/bin/waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --disable-build-date
[cplayer] List of enabled features: 52arch alsa asm caca cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build drm dvbin dvdnav egl egl-drm egl-helpers egl-x11 ffmpeg ffnvcodec gbm gbm.h gl gl-wayland glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg lcms2 libarchive libass libavdevice libbluray libdl libm libmpv-shared libplacebo librt linux-fstatfs linux-input-event-codes lua memfd_create optimize plain-gl posix posix-or-mingw pthreads pulse rubberband shaderc shaderc-shared stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vt.h vulkan wayland wayland-protocols x11 xv zlib
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Applying profile 'default'...
[cplayer] Reading config file /home/archiso/.config/mpv/mpv.conf
[cplayer] Applying profile 'default'...
[cplayer] Setting option 'osd-duration' = '400' (flags = 4)
[cplayer] Setting option 'osd-bar-align-y' = '-0.98' (flags = 4)

For aki72 this is not solution but workaround. Mpv version 0.34.1-5 also was build without "gl-x11" but works for him.

Last edited by Anakievs (2023-06-15 09:38:42)

Offline

Board footer

Powered by FluxBB