mpv ignores whether a dma-buf format is advertised or not

Created on 9 Mar 2020  ·  10Comments  ·  Source: mpv-player/mpv

Important Information

  • mpv version: 0.32.0
  • Linux Distribution and Version: Fedora 32
  • Source of the mpv binary: Fedora repositories
  • Window Manager and version: GNOME 3.36
  • GPU driver and version: Intel (Linux 5.6.0, mesa 2.0.1)

If you're not using git master or the latest release, update.
Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

  1. Play video

Result:

[destroyed object]: error 7: failed to import supplied dmabufs: Unsupported buffer format 808669784

Some initial debug shows mpv is not compliant:

Compositor advertises the following dma-buf formats:

[2517914.764] [email protected](875713089)
[2517914.770] [email protected](875713089, 0, 0)
[2517914.783] [email protected](875713089, 16777216, 1)
[2517914.797] [email protected](875713089, 16777216, 2)
[2517914.810] [email protected](875713089, 16777216, 4)
[2517914.823] [email protected](875713112)
[2517914.830] [email protected](875713112, 0, 0)
[2517914.843] [email protected](875713112, 16777216, 1)
[2517914.857] [email protected](875713112, 16777216, 2)
[2517914.873] [email protected](875713112, 16777216, 4)
[2517914.896] [email protected](808669761)
[2517914.911] [email protected](808669761, 0, 0)
[2517914.932] [email protected](808669761, 16777216, 1)
[2517914.951] [email protected](808669761, 16777216, 2)
[2517914.973] [email protected](909199186)
[2517914.984] [email protected](909199186, 0, 0)
[2517915.001] [email protected](909199186, 16777216, 1)
[2517915.055] [email protected](909199186, 16777216, 2)

mpv then creates a buffer with another format

[2518099.372]  -> [email protected]_immed(new id wl_buffer@22, 1920, 1080, 808669784, 0)

which is a violation of the protocol in question.

linux mesa vowayland

Most helpful comment

Yup. Forcing the old driver by using MESA_LOADER_DRIVER_OVERRIDE=i965 fixes the issue.

All 10 comments

Hmm, gave this a whirl on GNOME 3.36 (also Intel) and it detected and picked 875713112 for me. This might be tricky to reproduce.

I'm getting the same error using Arch Linux with GNOME 3.36.1 and mesa 20.0.2. Downgrading mesa to 19.3.4 fixes it for me.

Still works for me with mesa 20.0.2, but maybe I'm just lucky. Probably safe to consider this one a Mesa bug for now though.

Edit: Ah, my test is on i965 and not the new Iris driver (my hardware is way too old to use Iris). I bet that's the cause.

Yup. Forcing the old driver by using MESA_LOADER_DRIVER_OVERRIDE=i965 fixes the issue.

I'm getting the same error using Arch Linux with GNOME 3.36.1 and mesa 20.0.2. Downgrading mesa to 19.3.4 fixes it for me.

Same

I'm getting the same error using Arch Linux with GNOME 3.36.1 and mesa 20.0.2. Downgrading mesa to 19.3.4 fixes it for me.

Same

same

I'm getting the same error using Arch Linux with GNOME 3.36.1 and mesa 20.0.2. Downgrading mesa to 19.3.4 fixes it for me.

This is what I did, and it works. But this can only be a temporary fix. So, is this an mpv, wayland or mesa issue, and where will it be fixed?

and where will it be fixed?

It should be fixed by the linked mesa merge request.

The mesa MR was merged so that should fix this one. Feel free to reopen if it doesn't.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

422658476 picture 422658476  ·  3Comments

lightonflux picture lightonflux  ·  4Comments

beew picture beew  ·  3Comments

yuvadm picture yuvadm  ·  3Comments

SPDurkee picture SPDurkee  ·  3Comments