From ecc04e8ba7469fb01c5a066bf1c48d5cd58d1a18 Mon Sep 17 00:00:00 2001 From: mavonarx <75391689+mavonarx@users.noreply.github.com> Date: Wed, 23 Jul 2025 23:11:07 +0200 Subject: drm: check syncobj timeline support before advertising protocol (#11117) Prevents crashes on systems where DRM driver lacks syncobj timeline support (e.g., Apple Silicon with Honeykrisp driver). Applications like Zed and WezTerm would crash with 'Timeline failed importing' when trying to use explicit sync. Fixes #8158 #8803 --------- Co-authored-by: mvonarx --- src/managers/ProtocolManager.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/managers/ProtocolManager.cpp') diff --git a/src/managers/ProtocolManager.cpp b/src/managers/ProtocolManager.cpp index eac6dee0..ebd90a45 100644 --- a/src/managers/ProtocolManager.cpp +++ b/src/managers/ProtocolManager.cpp @@ -70,6 +70,7 @@ #include "content-type-v1.hpp" #include +#include #include #include @@ -210,8 +211,13 @@ CProtocolManager::CProtocolManager() { else lease.reset(); - if (g_pHyprOpenGL->m_exts.EGL_ANDROID_native_fence_sync_ext && !PROTO::sync) - PROTO::sync = makeUnique(&wp_linux_drm_syncobj_manager_v1_interface, 1, "DRMSyncobj"); + if (g_pHyprOpenGL->m_exts.EGL_ANDROID_native_fence_sync_ext && !PROTO::sync) { + if (g_pCompositor->supportsDrmSyncobjTimeline()) { + PROTO::sync = makeUnique(&wp_linux_drm_syncobj_manager_v1_interface, 1, "DRMSyncobj"); + Debug::log(LOG, "DRM Syncobj Timeline support detected, enabling explicit sync protocol"); + } else + Debug::log(WARN, "DRM Syncobj Timeline not supported, skipping explicit sync protocol"); + } } if (!g_pHyprOpenGL->getDRMFormats().empty()) { -- cgit v1.2.3