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

            Bug ID: 518732
           Summary: KWin does not retry output configuration after DRM
                    modeset permission failure on resume from suspend
    Classification: Plasma
           Product: kwin
      Version First 6.6.3
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
  KWin does not retry output configuration after DRM modeset permission failure
on resume from suspend

  STEPS TO REPRODUCE
  1. Have a multi-monitor setup (2x DisplayPort) with an NVIDIA GPU on Wayland
  2. Configure output priorities in System Settings (e.g., DP-2 as primary)
  3. Suspend the system and resume

  OBSERVED RESULT
  On every resume, KWin logs:

    kwin_wayland: atomic commit failed: Permission denied
    kwin_wayland: Failed to open drm node: "/dev/dri/card0"
    kwin_wayland: Atomic modeset test failed! Permission denied
    kwin_wayland: Applying output configuration failed!

  KWin does not retry. The stored output configuration from
kwinoutputconfig.json
  (including priorities) is never reapplied. Output priorities revert to DRM
  enumeration order, which may differ from the configured layout. The panel and
  system tray shift to the wrong monitor.

  EXPECTED RESULT
  KWin should retry applying the output configuration after a transient DRM
  permission failure on resume, using backoff or waiting for DRM readiness. The
  stored output priorities, positions, and scales in kwinoutputconfig.json
should
  be reliably applied after resume.

  SOFTWARE/OS VERSIONS
  Linux/KDE Plasma: Arch Linux
  KDE Plasma Version: 6.6.3
  KDE Frameworks Version: 6.24.0
  Qt Version: 6.11.0
  Kernel: 6.19.11-arch1-1 (64-bit)
  GPU: NVIDIA GeForce RTX 3090 (nvidia-open 595.58.03)
  Monitors: 2x LG UltraFine 4K via DisplayPort

  ADDITIONAL INFORMATION
  The NVIDIA driver package ships a systemd drop-in at
 
/usr/lib/systemd/system/systemd-suspend.service.d/10-nvidia-no-freeze-session.conf
  that sets SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false. This disables user
session
  freezing during sleep so the NVIDIA kernel module can handle its own
  suspend/resume sequence.

  With sessions unfrozen, KWin attempts to reacquire DRM master before the DRM
  subsystem is fully reinitialized, resulting in the permission error. KWin
treats
  this as terminal and does not retry. Tools like kscreen-doctor can
successfully
  apply the same configuration ~500ms later, confirming the DRM subsystem
  recovers quickly.

  Workaround: a systemd oneshot service on suspend.target that runs
  kscreen-doctor to reapply positions/scales/priorities, followed by
  qdbus6 org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript
  'panels()[0].screen = 0;' to force the panel back to the correct screen.

  Reproducibility: 100% on every resume from suspend.

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

Reply via email to