Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpv flatpak falling back to vo: [xv] #590

Open
LS650V opened this issue Dec 23, 2024 · 9 comments
Open

mpv flatpak falling back to vo: [xv] #590

LS650V opened this issue Dec 23, 2024 · 9 comments

Comments

@LS650V
Copy link

LS650V commented Dec 23, 2024

I am guessing the problem is "[vo/gpu/opengl] Suspected software renderer or indirect context."

Is this due to the version of Mesa you are using?

debian's version mpv 0.35.1 works fine on my system.

● Video --vid=1 (h264 1280x640 29.97 fps) [default]
● Audio --aid=1 --alang=eng (opus 2ch 48000 Hz) [default]
File tags:
Date: 20241222
Uploader: Linus Tech Tips
Channel_URL: https://www.youtube.com/channel/UCXuqSBlHAE6Xw-yeJA0Tunw
[vo/gpu/opengl] Suspected software renderer or indirect context.
[vo/gpu/drm] VT_GETMODE failed: Inappropriate ioctl for device
[vo/gpu/drm] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/gpu/drm] Failed to create DRM atomic context, no DRM Atomic support
[vo/gpu/libplacebo] Found no suitable device, giving up.
[vo/gpu/libplacebo] Failed initializing vulkan device
[vo/gpu-next/opengl] Suspected software renderer or indirect context.
[vo/gpu-next/drm] Can't handle VT release - signal already used
[vo/gpu-next/drm] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/gpu-next/drm] Failed to create DRM atomic context, no DRM Atomic support
[vo/gpu-next/libplacebo] Found no suitable device, giving up.
[vo/gpu-next/libplacebo] Failed initializing vulkan device
[vo/vdpau] Error when calling vdp_device_create_x11: 23
[vo/xv] Warning: this legacy VO has bad quality and performance, and will in particular result in blurry OSD and subtitles. You should fix your graphics drivers, or not force the xv VO.
[ffmpeg] AVHWDeviceContext: Cannot load libcuda.so.1
[ffmpeg] AVHWDeviceContext: Could not dynamically load CUDA
Using hardware decoding (vaapi-copy).
[autoconvert] Converting nv12 -> yuv420p
AO: [pulse] 48000Hz stereo 2ch float
VO: [xv] 1280x640 => 1280x720 yuv420p

@fastrizwaan
Copy link
Collaborator

You should fix your graphics drivers, or not force the xv VO. [ffmpeg] AVHWDeviceContext: Cannot load libcuda.so.1 [ffmpeg] AVHWDeviceContext: Could not dynamically load CUDA Using hardware decoding (vaapi-copy). [autoconvert] Converting nv12 -> yuv420p AO: [pulse] 48000Hz stereo 2ch float VO: [xv] 1280x640 => 1280x720 yuv420p

Have you tried flatpak update to update the gpu drivers?

On my Intel Laptop, the link works wfine.

$ flatpak run io.mpv.Mpv https://www.youtube.com/watch?v=IA9LlfQ9X-Q
● Video  --vid=1               (av1 3840x1920 29.97 fps) [default]
● Audio  --aid=1  --alang=eng  (opus 2ch 48000 Hz) [default]
File tags:
 Date: 20241022
 Uploader: Linus Tech Tips
 Channel_URL: https://www.youtube.com/channel/UCXuqSBlHAE6Xw-yeJA0Tunw
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 3840x1920 yuv420p
Audio device underrun detected.
(Paused) AV: 00:00:23 / 00:26:24 (1%) A-V:  0.000 Dropped: 64 Cache: 41s/23MB

@LS650V
Copy link
Author

LS650V commented Dec 23, 2024

Graphics drivers are up to date and I am NOT forcing vo=xv. I guess I will stick with debian's older version of mpv which works as expected on my system.

$ inxi -G
Graphics:
Device-1: AMD RV770 [Radeon HD 4850] driver: radeon v: kernel
Device-2: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
Display: x11 server: X.Org v: 1.21.1.7 driver: X:
loaded: modesetting,radeon unloaded: fbdev,vesa dri: r600 gpu: radeon
resolution: 1: 1760x99060Hz 2: 1920x108060Hz
API: OpenGL v: 3.3 Mesa 22.3.6 renderer: AMD RV770 (DRM 2.50.0 /
6.1.0-28-amd64 LLVM 15.0.6)

$ mpv --version
mpv 0.35.1 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
built on UNKNOWN
FFmpeg library versions:
libavutil 57.28.100
libavcodec 59.37.100
libavformat 59.27.100
libswscale 6.7.100
libavfilter 8.44.100
libswresample 4.7.100
FFmpeg version: 5.1.6-0+deb12u1

$ flatpak run io.mpv.Mpv --version
mpv v0.39.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.349.0 (v7.349.0)
FFmpeg version: n7.1
FFmpeg library versions:
libavcodec 61.19.100
libavdevice 61.3.100
libavfilter 10.4.100
libavformat 61.7.100
libavutil 59.39.100
libswresample 5.3.100
libswscale 8.3.100

@Erick555
Copy link
Contributor

Erick555 commented Dec 23, 2024

Flatpak uses mesa 24.3.1. This gpu seems to be 16 years old, I'm not sure if it's still supported by latest mesa.

You may install org.freedesktop.Platform.GlxInfo//24.08 app then run

flatpak run --env=LIBGL_DEBUG=verbose org.freedesktop.Platform.GlxInfo

@LS650V
Copy link
Author

LS650V commented Dec 24, 2024

$ flatpak run --env=LIBGL_DEBUG=verbose org.freedesktop.Platform.GlxInfo > flatpak_glxinfo.txt
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/aej/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/aej/.drirc: No such file or directory.

output file flatpak_glxinfo.txt attached
flatpak_glxinfo.txt

@LS650V
Copy link
Author

LS650V commented Dec 24, 2024

Some additional information:

$ flatpak run org.freedesktop.Platform.VaInfo
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/r600_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva error: /usr/lib/x86_64-linux-gnu/GL/lib/dri/r600_drv_video.so init failed
libva info: va_openDriver() returns 2
vaInitialize failed with error code 2 (resource allocation failed),exit

$ flatpak run org.freedesktop.Platform.VdpauInfo
display: :0.0 screen: 0
Error creating VDPAU device: 23

These errors do not occur when I run $ vainfo and $ vdpauinfo on my debian 12 system

$ vainfo > debian_vainfo.txt
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0

$ vdpauinfo > debian_vdpauinfo.txt

debian_vainfo.txt
debian_vdpauinfo.txt

@Erick555
Copy link
Contributor

so mesa fallbacks to software rendering. There may be no driver for this gpu

Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Mesa (0xffffffff)
    Device: llvmpipe (LLVM 19.1.5, 128 bits) (0xffffffff)
    Version: 24.3.1
    Accelerated: no

@CounterPillow
Copy link

There is a driver, but it's in Mesa Amber: https://docs.mesa3d.org/amber.html

Mesa was split into two so that the ancient stuff can be separate. I'm not sure if flatpak packages Amber, though it would be nice if it would.

@Erick555
Copy link
Contributor

freedesktop-sdk flatpak runtime doesn't package mesa amber and doesn't plan to do so in the future.

@CounterPillow
Copy link

Yes, they left it up to flathub. There really is no reason for flathub not to package it, other than nobody who still needs it wanting to do it I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants