renderer/native: Send modifiers even without AddFb2

When running headless, only the invalid modifiers are advertised.

That breaks with the NVIDIA proprietary driver which then rejects the
buffers created with the invalid modifier, and that kills Xwayland,
meaning that running Xwayland on top of a mutter based compositor
headless is not possible.

The reason the modifiers are not sent is because AddFb2 is not supported
when running headless.

Other compositors (weston, wlroots) would still send the modifiers even
without AddFb2, and Xwayland works fine on those compositors when
running headless.

Remove the requirement for AddFb2 to send the modifiers, so that
Xwayland can work fine on top of mutter headless with the NVIDIA
proprietary driver.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3060
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3320>
This commit is contained in:
Olivier Fourdan 2023-10-10 11:11:36 +02:00 committed by Marge Bot
parent f1eaf26845
commit 909cc6c240

View File

@ -2202,8 +2202,7 @@ meta_renderer_native_initable_init (GInitable *initable,
else
{
renderer_native->send_modifiers =
!(flags & META_KMS_DEVICE_FLAG_DISABLE_CLIENT_MODIFIERS) &&
flags & META_KMS_DEVICE_FLAG_HAS_ADDFB2;
!(flags & META_KMS_DEVICE_FLAG_DISABLE_CLIENT_MODIFIERS);
}
meta_topic (META_DEBUG_KMS, "Sending KMS modifiers to clients is %s",