From dddf51b44158ecd5d44e85504da4c3d659f78c2c Mon Sep 17 00:00:00 2001 From: Richard Chennault Date: Tue, 16 Jun 2026 13:41:01 -0700 Subject: [PATCH] kms: skip lease resume when drm device activation fails in resume_session() When smithay's DrmDevice::activate() returns an error (e.g. because drmSetMaster() failed during VT resume), resume_session() was only logging the error and then proceeding to resume DRM leases on a device that has no master. This leaves the compositor in a broken render state where every atomic page flip returns EPERM. Fix: continue to the next device on activate() failure. The device surface stays inactive and lease resume is deferred. On the next ActivateSession event (next VT switch to this TTY), resume_session() will be called again and activate() will succeed once the seat manager has granted DRM master. Reproducer: hybrid GPU system (Intel iGPU render + NVIDIA display), VT switch away from and back to COSMIC session. On return, drmSetMaster races the seat notification; activate() fails; without this fix the compositor floods journald with EPERM at 60fps. Fixes: pop-os#2331, pop-os#2302 --- src/backend/kms/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/kms/mod.rs b/src/backend/kms/mod.rs index 3a0d8c8c..694d6ce7 100644 --- a/src/backend/kms/mod.rs +++ b/src/backend/kms/mod.rs @@ -374,6 +374,7 @@ impl State { for device in backend.drm_devices.values_mut() { if let Err(err) = device.drm.lock().activate(true) { error!(?err, "Failed to resume drm device"); + continue; } if let Some(lease_state) = device.inner.leasing_global.as_mut() { lease_state.resume::();