Bug 417502 - Closing laptop lid too quickly after pressing power button executes lid close action, not power button action
Summary: Closing laptop lid too quickly after pressing power button executes lid close...
Status: RESOLVED DUPLICATE of bug 189456
Alias: None
Product: plasmashell
Classification: Plasma
Component: Power management & brightness (other bugs)
Version First Reported In: 6.2.4
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2020-02-12 16:12 UTC by John van Spaandonk
Modified: 2025-09-16 21:14 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John van Spaandonk 2020-02-12 16:12:56 UTC
SUMMARY
My laptop is set up to power off if I press the power button, and to go to sleep if I close the laptop lid. No screensaver active when the problem occurs. Also no full-screen video.

STEPS TO REPRODUCE
1. Press power button to put laptop to sleep
2. Close laptop lid directly after pressing power button
3. that's it!

OBSERVED RESULT
Laptop goes to sleep (suspend?), apparently erroneously triggered by closing  the laptop lid.

EXPECTED RESULT
The laptop should power off. I asked it to and it should not ignore it and do something else instead.

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

ADDITIONAL INFORMATION
This bug has been there for years. It looks like the developers did not test this scenario.
No idea if the problem is in Powerdevil or not, feel free to reassign to appropriate component. Also let me know what other info you want!
Comment 1 Kai Uwe Broulik 2020-02-12 16:15:55 UTC
There's definitely code in Powerdevil that checks if ksmserver is exiting and then ignores the suspend request.
Possible that PowerDevil at this point was already killed and then logind takes over and just goes ahead anyway.
Comment 2 John van Spaandonk 2020-02-13 05:49:10 UTC
On 2020-02-12 17:15, Kai Uwe Broulik wrote:
> https://bugs.kde.org/show_bug.cgi?id=417502
>
> Kai Uwe Broulik <kde@privat.broulik.de> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |kde@privat.broulik.de
>
> --- Comment #1 from Kai Uwe Broulik <kde@privat.broulik.de> ---
> There's definitely code in Powerdevil that checks if ksmserver is exiting and
> then ignores the suspend request.
> Possible that PowerDevil at this point was already killed and then logind takes
> over and just goes ahead anyway.
>
I think that powermanagement in particular benefits from a system-wide 
development view.
Too bad I do not have any experience with this.
As a first step, is this problem reproducable?
Comment 3 Nate Graham 2025-06-10 16:19:19 UTC
Can confirm in current git master (which will eventually become Plasma 6.5) too.
Comment 4 Nate Graham 2025-06-12 18:08:34 UTC
*** Bug 406287 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2025-08-13 22:12:46 UTC
*** Bug 498593 has been marked as a duplicate of this bug. ***
Comment 6 postix 2025-08-29 10:02:24 UTC
I digged a bit and found there's a report #189456 from 2009(!)  which already described the very same issue. 
It got closed without a general fix for everyone though.
Comment 7 Nate Graham 2025-09-16 21:13:55 UTC

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