FreeBSD 15 + KDE: Laptop immediately suspends again after resume

Hey! I am using FreeBSD 15 on a ThinkPad T480 with KDE/X11.

When the lid closes, suspend works perfectly. However, when the laptop resumes from sleep, it goes back to suspend a few seconds later. Only after pressing the power button again does it finally resume.

I have tried setting sysctl dev.acpi_lid.0.wake=0 to prevent resume on lid open (so I resume with the lid open and press the power button). Same result.

I have also tried changing sysctl hw.acpi.lid_switch_state from NONE to S3.

I believe this is a KDE bug, because with the settings above everything works correctly in Openbox (no second suspend/resume cycle). It also works properly when I set “Do Nothing” in KDE Power Management, but in that case the screen is not locked on resume, which is not ideal -- I would prefer a proper solution.

Does anyone know what causes this second suspend?
 
It also works properly when I set “Do Nothing” in KDE Power Management, but in that case the screen is not locked on resume
/usr/local/etc/devd/kde_lock.conf:
Code:
notify 10 {
    match "system"    "ACPI";
    match "subsystem" "Lid";
    match "notify"    "0x00";
    action "su -l USER_NAME -c 'DISPLAY=:0 qdbus-qt6 org.kde.kscreenlocker /MainApplication lock' && sleep 2 && acpiconf -s 3";
};

/etc/sysctl.conf:
Code:
# hw.acpi.lid_switch_state=S3

# service devd restart
 
Back
Top