https://bugs.kde.org/show_bug.cgi?id=526518

            Bug ID: 526518
           Summary: [Wayland] KWin compositor enters ~3s input latency
                    stall after "atomic commit failed: Permission denied"
                    upon fullscreen exit transition
    Classification: Plasma
           Product: kwin
      Version First 6.7.5
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Application: kwin_wayland (6.7.5-1)
OS: Arch Linux (Linux 7.2.7-arch1-1)
Hardware: AMD HawkPoint1 [1002:1900] (Radeon 780M, DCN 3.1.4)
Display: Internal eDP-1, 1920x1200 @ 144Hz, Adaptive Sync (VRR): Automatic,
Scale: 1.15

SUMMARY
Under concurrent display workloads (e.g. video decoding + 3D graphics
rendering), transitioning an application into or out of fullscreen mode
intermittently triggers a catastrophic DRM atomic modesetting failure in KWin
Wayland.

KWin logs:
  kwin_wayland: atomic commit failed: Permission denied
followed by:
  kwin_wayland: Applying output configuration failed!

Once this occurs, KWin's compositor main thread blocks on the driver's DRM
fence wait timeout (~2000–3000ms per frame), logged repeatedly as:
  kwin_wayland: The main thread was hanging temporarily!
This starves libinput event dispatch and produces an agonizing ~3-second delay
on all keyboard and mouse interactions.

NOTE ON REPRODUCIBILITY (RACE CONDITION)
This is an asynchronous race condition in atomic state negotiation, NOT a 100%
deterministic single-button trigger. Toggling fullscreen on a single idle
application in isolation rarely trips it. The stall is triggered when multiple
presentation streams (e.g. video playback + a 3D swapchain) are actively
competing for Direct Scanout / overlay planes and VRR timing on a 144Hz panel.

STEPS TO REPRODUCE (HIGHEST PROVOCATION RATE)
1. Display Configuration: AMD GPU, 144Hz internal panel (eDP-1), Adaptive Sync
(VRR) set to Automatic.
2. Open Firefox (native Wayland) and start playing a 1080p/60fps YouTube video.
3. Simultaneously open a 3D graphics application with an active swapchain (e.g.
native Vulkan application or MPV).
4. While the video is actively decoding and rendering, toggle the 3D
application into fullscreen (F11) and back to windowed mode 2–3 times.

OBSERVED RESULT
When the race condition hits:
1. KWin logs:
   kwin_wayland: atomic commit failed: Permission denied
   kwin_wayland: Applying output configuration failed!
2. KWin enters an unrecovered ~3-second input latency loop where the cursor and
keyboard only update in discrete leaps spaced 3 seconds apart.
3. Attempting to restart SDDM from a text TTY (sudo systemctl restart sddm)
fails to recover the session: SDDM launches Xorg on VT2, but because KWin on
VT1 never released the DRM master file descriptor, Xorg fails with "Could not
setup default cursor", leaving a frozen 'X' cursor.

EXPECTED RESULT
KWin should gracefully handle atomic commit rejections or lost DRM mastership
by dropping Direct Scanout and falling back to software composition without
starving its event loop.

VERBATIM LOG EXCERPTS
>From systemd journal (Incident at 18:39 BST):
Oct 01 18:39:41 kwin_wayland[917]: atomic commit failed: Permission denied
Oct 01 18:41:26 kwin_wayland[917]: Applying output configuration failed!
Oct 01 18:41:26 sddm[20250]: Running: /usr/bin/X ... vt2
Oct 01 18:41:26 sddm[20250]: Could not setup default cursor

Accompanying kernel warnings during the atomic commit failure:
  drm_crtc_vblank_get(new_state->base.crtc) != 0
  WARNING: at amdgpu_dm_handle_vrr_transition+0x1d5/0x1e0 [amdgpu]
  amdgpu_dm_atomic_commit_tail+0x92b/0x3640 [amdgpu]

RELATED UPSTREAM REPORTS
- Bug 505762: Primary counterpart on AMD ("Atomic test failed! Permission
denied" causing KWin soft-freeze). Was closed as RESOLVED UPSTREAM after
6.16-rc2, but KWin's unrecovered hang loop on Permission Denied remains
unhandled.
- Bug 521568 & Bug 524540: Similar "atomic commit failed: Permission denied"
hangs on NVIDIA during session/surface transitions.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to