Skip to content

wayland: optimize frame scheduling for 120Hz+ displays#822

Open
Gong-Mi wants to merge 1 commit into
linuxmint:masterfrom
Gong-Mi:wayland-120hz-sync-optimization
Open

wayland: optimize frame scheduling for 120Hz+ displays#822
Gong-Mi wants to merge 1 commit into
linuxmint:masterfrom
Gong-Mi:wayland-120hz-sync-optimization

Conversation

@Gong-Mi
Copy link
Copy Markdown

@Gong-Mi Gong-Mi commented May 18, 2026

Problem

On Cinnamon Wayland with high refresh rate displays (120Hz+), window flickering occurs due to tight frame scheduling:

  • +EBUSY+` waits a full refresh cycle before retrying, adding exactly one frame of latency on any scheduling hiccup.

Environment

  • GPU: AMD Radeon 880M (RDNA 3.5, amdgpu driver)
  • Display: 2560×1600 @ 120Hz (BOE eDP-1)
  • Session: Cinnamon 6.6.7 Wayland
  • Kernel: Linux with DRM atomic

Changes

1. Wayland: remove fixed 2ms sync delay

File: +src/compositor/compositor.c+`

On Wayland the KMS page-flip event already provides synchronization. The 2ms delay is a legacy X11 artifact (for +GL_EXT_x11_sync_object+`) that hurts high-refresh-rate performance. X11 path is kept unchanged for compatibility.

2. Faster page-flip retry on EBUSY

File: +EBUSY+` without stalling a full frame.

Testing

  1. Disable experimental feature to eliminate offscreen overhead:
    ++`

  2. Apply patch and rebuild muffin.

  3. Observe flickering significantly reduced or eliminated on 120Hz panel.

Related gaps (not addressed in this PR)

  • +wp_tearing_control_manager_v1+` Wayland protocols are not yet implemented in Muffin. Adding these would allow clients to better synchronize with the compositor and optionally allow tearing for latency-critical content.

- Use 0ms sync delay on Wayland (KMS page-flip already syncs)
- Halve page-flip retry interval on EBUSY for faster recovery

Fixes flickering on high-refresh-rate panels under Cinnamon Wayland.
Tested on AMD Radeon 880M @ 2560x1600@120Hz.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant