mpv crashes when run on wayland session on nvidia/intel (optimus) system when prime-select is on-demand

Bug #1968488 reported by Amardhruva
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
MPV
Fix Released
Unknown
NVIDIA / egl-wayland
Fix Released
Unknown
egl-wayland (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

(+) Video --vid=1 (*) (h264 640x480 29.970fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 640x480 yuv420p
[destroyed object]: error 7: failed to import supplied dmabufs: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a
[vo/gpu/wayland] Error occurred on the display fd, closing

Mpv crashes on system after running it when prime-select is on-demand
If we set prime-select intel then it works.

Seems to be same as https://github.com/mpv-player/mpv/issues/9393 as using the workaround in the issue fixes the issue (__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json) and seems to be fixed(?) in fedora in https://bodhi.fedoraproject.org/updates/FEDORA-2021-0526645c86

one more thing to note is that eglinfo by default shows nvidia but using the workaround makes it show Intel.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: mpv 0.34.1-1ubuntu3
ProcVersionSignature: Ubuntu 5.15.0-25.25-generic 5.15.30
Uname: Linux 5.15.0-25-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu80
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Sun Apr 10 21:32:14 2022
InstallationDate: Installed on 2022-03-13 (28 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 (20220312)
SourcePackage: mpv
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Amardhruva (amaramardhruva) wrote :
Revision history for this message
Amardhruva (amaramardhruva) wrote (last edit ):

I have attached eglinfo with and without using __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
egl seems to default to nvidia which may indicate the issue.

eglinfo.log> $ eglinfo
eglinfo-workaround.log> $ __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json eglinfo

description: updated
Revision history for this message
Amardhruva (amaramardhruva) wrote :

It looks like https://github.com/NVIDIA/egl-wayland/issues/41#issuecomment-959550980 NVIDIA is gonna be fixing the issue.

Changed in mpv:
status: Unknown → Fix Released
Changed in egl-wayland:
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mpv (Ubuntu):
status: New → Confirmed
tags: added: protocol-error
tags: added: nvidia-wayland
Changed in mpv (Ubuntu):
status: Confirmed → Fix Released
affects: mpv (Ubuntu) → egl-wayland (Ubuntu)
tags: added: fixed-in-1.1.10 fixed-upstream
tags: added: rls-jj-incoming
Changed in egl-wayland:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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