Bug 445566

Summary: "Turn off screen" keyboard shortcut doesn't work
Product: [Plasma] Powerdevil Reporter: Jin Liu <ad.liu.jin>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: nate, tomashnyk
Priority: NOR    
Version: 5.23.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jin Liu 2021-11-16 07:26:38 UTC
SUMMARY
In systemsettings, the "Turn off screen" shortcut under "Power management" doesn't work. When pressed, the screen turns off then immediately on again.  

STEPS TO REPRODUCE
1. Open systemsettings
2. In keyboard shortcut - power management, set a custom shortcut for "turn off screen" 
3. Press that shortcut

OBSERVED RESULT
Screen turns off then immediately on.

EXPECTED RESULT
Screen turns off.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 21.08.3
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Setting a custom shortcut with the following command (from the kdeconnect document) works:
sleep 0.1 && qdbus org.kde.kglobalaccel /component/org_kde_powerdevil invokeShortcut "Turn Off Screen"
So my guess it is the key depressing event turned the screen back on, so a sleep is necessary.
Comment 1 Nate Graham 2021-11-23 20:14:54 UTC
Works for me FWIW.
Comment 2 tomashnyk 2021-12-27 14:10:59 UTC
This is probably a duplicate of https://bugs.kde.org/show_bug.cgi?id=423035
Comment 3 Nate Graham 2022-01-01 02:24:27 UTC

*** This bug has been marked as a duplicate of bug 423035 ***
Comment 4 Nate Graham 2024-06-27 13:22:54 UTC

*** This bug has been marked as a duplicate of bug 480026 ***