Skip to content

drm: check syncobj timeline support before advertising protocol#11117

Merged
vaxerski merged 5 commits into
hyprwm:mainfrom
mavonarx:fix-asahi-explicit-sync
Jul 23, 2025
Merged

drm: check syncobj timeline support before advertising protocol#11117
vaxerski merged 5 commits into
hyprwm:mainfrom
mavonarx:fix-asahi-explicit-sync

Conversation

@mavonarx
Copy link
Copy Markdown
Contributor

Describe your PR, what does it fix/add?

Fixes crashes in Vulkan applications (Zed, WezTerm, etc.) on systems where the DRM driver doesn't support syncobj timelines, particularly Apple Silicon devices running Asahi Linux with the Honeykrisp driver.

The issue was that Hyprland advertised the linux-drm-syncobj-v1 protocol regardless of hardware support. When applications attempted to use explicit sync, they would crash with "Timeline failed importing" errors.

This PR adds DRM_CAP_SYNCOBJ_TIMELINE capability checking at two levels:

  • Protocol creation: Only advertise the protocol when hardware supports it
  • Timeline creation: Additional safety check when creating sync timelines

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

No breaking compatibility - this only prevents advertising a protocol when the underlying hardware doesn't support it. Applications gracefully fall back to implicit sync when explicit sync isn't available.

Is it ready for merging, or does it need work?

Ready for merging. Tested on Fedora Asahi Remix with Apple M1 Pro. Applications that previously crashed now start successfully and run normally.

@vaxerski
Copy link
Copy Markdown
Member

this MR is based on some old rev, needs to be rebased on top of main, that's first.

Second - Asahi and Apple Silicon support explicit sync - just not on the display node, and Tom is working on that in #11087

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 hyprwm#8158 hyprwm#8803
@mavonarx mavonarx force-pushed the fix-asahi-explicit-sync branch from 210b366 to 09b0fbc Compare July 20, 2025 06:14
@mavonarx
Copy link
Copy Markdown
Contributor Author

Rebased and retested

Comment thread src/helpers/sync/SyncTimeline.cpp Outdated
@mavonarx mavonarx force-pushed the fix-asahi-explicit-sync branch from 2e5aa2c to 09b0fbc Compare July 21, 2025 18:26
@mavonarx
Copy link
Copy Markdown
Contributor Author

Fixed - moved the capability check to init and removed the duplicate functions. Retested again - works.

@mavonarx mavonarx requested a review from vaxerski July 21, 2025 18:42
Copy link
Copy Markdown
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest lgtm

Comment thread src/managers/ProtocolManager.cpp Outdated
@mavonarx mavonarx requested a review from vaxerski July 21, 2025 19:44
@vaxerski
Copy link
Copy Markdown
Member

c-f failed, run c-f pls

Comment thread src/Compositor.hpp Outdated
@mavonarx mavonarx requested a review from vaxerski July 23, 2025 21:08
@vaxerski vaxerski merged commit ecc04e8 into hyprwm:main Jul 23, 2025
19 of 21 checks passed
@mavonarx mavonarx deleted the fix-asahi-explicit-sync branch July 25, 2025 22:04
Boom-Hacker pushed a commit to Boom-Hacker/Hyprland that referenced this pull request Sep 27, 2025
…wm#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 hyprwm#8158 hyprwm#8803

---------

Co-authored-by: mvonarx <matthias.vonarx@sitrox.com>
Boom-Hacker pushed a commit to Boom-Hacker/Hyprland that referenced this pull request Sep 27, 2025
…wm#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 hyprwm#8158 hyprwm#8803

---------

Co-authored-by: mvonarx <matthias.vonarx@sitrox.com>
Boom-Hacker pushed a commit to Boom-Hacker/Hyprland that referenced this pull request Sep 27, 2025
…wm#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 hyprwm#8158 hyprwm#8803

---------

Co-authored-by: mvonarx <matthias.vonarx@sitrox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants