mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Wayland+Vulkan: `--force-window=immediate` does not reliably work

Open MoSal opened this issue 1 year ago • 4 comments

Important Information

version
mpv 8ef744d1b7f64b3b7d814ee4d9376d6538befb73
libplacebo e448e5b3257c2356b283b569ae3f277724f9dd4b
mesa 22.1.3-1
amdvlk 2022.Q2.3-1
wayland 1.21.0
weston 10.0.1
wlroots add44b3e2
sway 8d8a21c9

Reproduction steps

mpv  --no-config --gpu-api=vulkan --force-window=immediate -
  • May require multiple tries to trigger.
  • Reproducible in both weston (release) and sway/wlroots (git)

Expected behavior

Window created.

Actual behavior

mpv gets stuck with this message appearing:

xdg_surface@3: error 3: xdg_surface has never been configured

I added some debug messages to compare successful runs with failed ones, and the difference is that in a successful run, mpv receives dmabuf and output info from Wayland early enough to avoid the issue.

Note that further more serious issues can be triggered with certain configurations (e.g. autofit with percentage values) as mpv may proceed with a screen size of 0x0.

MoSal avatar Jul 19 '22 12:07 MoSal

I can't reproduce on sway (release in this case though) or weston.

Note that further more serious issues can be triggered with certain configurations (e.g. autofit with percentage values) as mpv may proceed with a screen size of 0x0.

Is that related to this issue or a totally separate thing?

Sounds like a wayland initialization race either way I guess.

Edit: Oh wait nevermind. This happens with amdvlk but not radv.

Dudemanguy avatar Jul 19 '22 14:07 Dudemanguy

Edit: Oh wait nevermind. This happens with amdvlk but not radv.

Good. Hate it when others don't see what I see.

Is that related to this issue or a totally separate thing?

Yes. As you can see in logs:

[vo/gpu] max content size: 0x0
[vo/gpu] monitor size: 0x0

Sizes are obviously correct when the issue is not triggered.

MoSal avatar Jul 19 '22 14:07 MoSal

Could you upload the logs though?

Dudemanguy avatar Jul 19 '22 14:07 Dudemanguy

Could you upload the logs though?

working | broken

MoSal avatar Jul 19 '22 14:07 MoSal

This actually was fixed by 99699cd7baa6be8aa949eab39a3964c102202180.

Dudemanguy avatar Nov 29 '22 16:11 Dudemanguy