https://bugs.kde.org/show_bug.cgi?id=464119
Bug ID: 464119 Summary: Systemd/logind sleep inhibitions inhibit both sleep and screen locking. Classification: Plasma Product: Powerdevil Version: 5.24.7 Platform: Ubuntu OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: plasma-b...@kde.org Reporter: vjorlikow...@gmail.com CC: m...@ratijas.tk Target Milestone: --- SUMMARY *** When attempting to force the system to stay awake while performing a background activity - but *not* lock the screen - PowerDevil disables both sleep *and* screen locking. System was upgraded from KUbuntu 20.04 to KUbuntu 22.04. I expect that this is an unintended consequence of this commit: https://invent.kde.org/plasma/powerdevil/-/commit/b5dfb286a4d9b43ac74862218beb5dd7f58ea7a8 *** STEPS TO REPRODUCE 1. On a laptop (or other system that can suspend) - set up screen auto-lock, to occur after some number of minutes (1-5). 2. In a terminal, execute: systemd-inhibit --who="test sleep" --what="sleep" --why="testing sleep without screen lock" sleep infinity 3. The PowerDevil plasmoid will report that both sleep and screen locking are being blocked - and automatic screen locking will not take place (even though the requested inhibition should *only* prevent sleep, not automatic screen locking). OBSERVED RESULT Screen auto-lock does not lock, when systemd/logind inhibition requested is for "sleep" only, not "sleep:idle". EXPECTED RESULT Screen should auto-lock, after configured duration, when systemd/logind inhibition is requested for "sleep" only. Screen should not auto-lock for an inhibition containing "idle". SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: KUbuntu 22.04 (available in About System) KDE Plasma Version: 5.24.7 KDE Frameworks Version: 5.92.0 Qt Version: 5.15.3 ADDITIONAL INFORMATION This behavior *also* occurs outside of systemd/logind, by using the dbus interface. The following python program causes the same misbehavior on the part of Powerdevil: import time from PyQt5.QtCore import QMetaType from PyQt5.QtDBus import QDBusConnection, QDBusInterface, QDBusArgument sessionbus = QDBusConnection.sessionBus() iface = QDBusInterface("org.kde.Solid.PowerManagement.PolicyAgent", "/org/kde/Solid/PowerManagement/PolicyAgent", "org.kde.Solid.PowerManagement.PolicyAgent", sessionbus) a1 = QDBusArgument(1, QMetaType.UInt) a2 = QDBusArgument('test', QMetaType.QString) a3 = QDBusArgument('test sleep', QMetaType.QString) c = iface.call('AddInhibition', a1, a2, a3) print(c.arguments()) print('Sleeping 15 minutes, unless interrupted...') time.sleep(900) -- You are receiving this mail because: You are watching all bug changes.