Bug 423035 - Turn off screen shortcut turns the screen back on automatically
Summary: Turn off screen shortcut turns the screen back on automatically
Status: REOPENED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL: https://github.com/ValveSoftware/stea...
Keywords:
: 445566 462619 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-06-16 02:06 UTC by squidinkrf
Modified: 2024-02-21 23:09 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description squidinkrf 2020-06-16 02:06:06 UTC
SUMMARY
When assigning and using a shortcut to the function "turn off screen" the screen only stays off for a few seconds before turning back on. also if you do not release the button almost immediately it counts the same shortcut key as a button press and turns the screen on again.

STEPS TO REPRODUCE
1. assign a key to the turn off screen shortcut
2. press key
3. wait a few seconds
4. watch screen turn on again

OBSERVED RESULT
the screen turns on without you doing anything

EXPECTED RESULT
The screen would stay off until a key would be pressed

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro Linux
(available in About System)
KDE Plasma Version: 5.19
KDE Frameworks Version: 5.71
Qt Version: 5.15
Comment 1 Nate Graham 2020-06-19 01:21:53 UTC
Can confirm.
Comment 2 Saul Fautley 2020-09-30 13:26:36 UTC
Can also confirm. It was working fine until I reassigned the shortcut. Now no matter what key I assign my screens turn back on immediately.

I don't suppose there's a fix planned anytime soon or a temporary workaround? I used this daily so it's become quite frustrating to not have this feature anymore.
Comment 3 Justin Zobel 2020-11-12 22:49:56 UTC
Can confirm still an issue on 5.20.2 on KDE Neon User Edition.
Comment 4 Saul Fautley 2021-01-20 21:33:26 UTC
I found the culprit of this on my system -- Steam. As soon as I quit Steam the shortcut works perfectly.

The issue is being tracked here: https://github.com/ValveSoftware/steam-for-linux/issues/5607
Comment 5 Nate Graham 2021-01-21 00:30:54 UTC
Ah yup, that. An old, annoying known issue with Steam :(
Comment 6 Peter Petrov 2021-04-04 22:14:26 UTC
> I found the culprit of this on my system -- Steam. As soon as I quit Steam the shortcut works perfectly.

I'm not running Steam, but the screen still turns back on after a few seconds (when using a Plasma/PowerDevil shortcut). On the other hand, if I use "xset dpms force off" to accomplish the same, the screen stays off until a key is pressed (or the mouse is moved).
Comment 7 Till Schäfer 2021-05-26 19:48:35 UTC
I am not using steam neither and also have this issue. I think the key release event is registered to wake up the screen again after the monitor was turned off with key press. When pressing key and holding it, the screen is turned off as expected, but as soon the key is released, it is turned on again.
Comment 8 Till Schäfer 2021-05-26 19:51:24 UTC
(for that reason i used to add a sleep 1 to my custom script for turning the monitor off. However, that solution is not really great because it is not working when pressing the key for more that a second and the screen is turned of only after a short delay)
Comment 9 Till Schäfer 2021-09-26 21:53:08 UTC
I can also reproduce this on wayland.

Operating System: Gentoo Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.13.19-gentoo (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-4810MQ CPU @ 2.80GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Comment 10 Till Schäfer 2021-09-26 22:05:15 UTC
when calling the command from command line with pre-sleep, it works correctly. So the thing here seems to be indeed, that the key to invoke the shortcut actually triggers the wakeup.


workaround: sleep 1 && dbus-send --session --print-reply --dest=org.kde.kglobalaccel /component/org_kde_powerdevil org.kde.kglobalaccel.Component.invokeShortcut string:'Turn Off Screen'
Comment 11 Yuking 2021-10-07 15:03:29 UTC
Tthe screen turns back on after a few seconds even I use "xset dpms force off".
Comment 12 Nate Graham 2022-01-01 02:24:27 UTC
*** Bug 445566 has been marked as a duplicate of this bug. ***
Comment 13 Martino Fontana 2023-03-24 21:25:26 UTC
The issue is kinda solved on Wayland: because there the screen fades off slowly (instead of instantly), the user has plenty of time to release the buttons used for the shortcut (but if they hold them long enough, then the screen will turn back on).

(On X11, about `xset dpms force off`, because the terminal takes a little time to process the instruction, you can have the screen stay off if you release Enter fast enough)
Comment 14 Tino Lorenz 2023-09-01 01:05:18 UTC
*** Bug 462619 has been marked as a duplicate of this bug. ***
Comment 15 Denilson F. de Sá 2023-09-22 11:33:52 UTC
Plasma 5.27 (released in February 2023) announced a new feature: “While on the lock screen, hit the Esc key to turn off the screen and save some power.”
Unfortunately, it seems this feature never worked for some people, as bug 466344 shows.
Comment 16 elydgolden 2023-10-07 09:59:10 UTC
Can confirm on kubuntu 23.04 with plasma 5.27.4
Comment 17 Jonathan Georgiou 2024-02-21 23:09:17 UTC
I am experiencing this on Wayland on Fedora 39

KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.115.0
QT Version: 5.15.12
Kernel version: 6.7.3-200.fc39x86_64
Graphics Platform: Wayland

I get the issue both when assigning a shortcut through plasma settings and when running kscreen-doctor --dpms off, even if I add the reported sleep workaround.