Bug 189456 - powerdevil should not suspend when computer is being shutdown
Summary: powerdevil should not suspend when computer is being shutdown
Status: RESOLVED FIXED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Development Mailing List
URL:
Keywords:
: 197974 198598 241062 263466 321173 (view as bug list)
Depends on: 318461
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-12 14:17 UTC by Anish Bhatt
Modified: 2019-05-16 15:33 UTC (History)
21 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.3.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anish Bhatt 2009-04-12 14:17:47 UTC
Version:            (using KDE 4.2.2)
Compiler:          gcc 4.3.3 
OS:                Linux
Installed from:    Unlisted Binary Package

My laptop is set to suspend when I shut the lid when on battery power. When I press shutdown, kde starts shutting down the computer. If I now shut the lid, the whole shutdown process is suspended for no reason, machine suspends correctly and continues shutting down when I open the lid again. This is not expected behaviour, machine should not suspend in the middle of a shutdown. Essentially, shutdown cannot be completed without keeping the lid open till end of shutdown.
Comment 1 Dario Andres 2009-04-12 17:20:55 UTC
Reassigning to PowerDevil
Comment 2 Ash Hunter 2009-04-20 00:19:15 UTC
A similar issue if you try to suspend to disk, then close the lid (suspend to RAM action) before it switches off. This just seems to confuse it and the "I'm about to suspend-to-disk" light blinks on the laptop but it doesn't actually get there. From this state I can unlock the desktop and keep using the computer again.

Basically, Powerdevil should be told to do nothing else (ie. ignore all other events) if another action was invoked first.
Comment 3 siegfried 2009-05-21 17:08:10 UTC
I can confirm this, and also reported at launchpad.
https://bugs.launchpad.net/ubuntu/+source/powerdevil/+bug/375079
Comment 4 Diederik van der Boor 2009-06-21 22:52:45 UTC
This still happens with KDE 4.3 beta 2 unfornately..
Comment 5 Klaas De Craemer 2009-06-22 11:13:31 UTC
I can confirm this. It's extremely annoying because the next time you power on, it proceeds with the shutdown. It also happens with reboots.
Comment 6 Jonathan Thomas 2009-08-02 16:22:07 UTC
*** Bug 198598 has been marked as a duplicate of this bug. ***
Comment 7 Jakob Lund 2009-10-31 12:11:28 UTC
Problem persists (and annoys) on Kubuntu Karmic release (KDE 4.3.2).
Comment 8 Dario Freddi 2009-12-01 17:31:14 UTC
Uhm... something about that has already been done in the session management, I'll look further into it
Comment 9 Dario Freddi 2009-12-01 19:03:33 UTC
*** Bug 197974 has been marked as a duplicate of this bug. ***
Comment 10 Jakob Lund 2010-01-28 23:50:46 UTC
Still there (Thinkpad X60s, Intel processor and graphics chip, Kubuntu Karmic  kdeSc Beta4.4)

Also: Sometimes _sleep_ events get stuck during sleeping (suspend-to-RAM), and cause the system to go back to sleep Immediately after wakeup!!. Here, that happens when `low battery'-action in the power profile is set to `suspend to memory'.

Sometimes, after waking up, `notification' thingies appear that have a `cancel suspend' button on them. These come sliding up from the bottom of the screen. While sliding, the text is near impossible to read (*), and once having reached steady state, the notifiers will disappear after a few seconds -- hardly enough to click the button if you're still a little dozy..

Seriously, this is the worst usability I experienced in ANY computer system EVER! 


Other than that I LOVE the 4.4 beta... kde will _evenatully_ be SO nice :-)


(*) except those notify things.. Imagine how muc easier it would be to actually read the text if the animation was done using a sliding mask, instead of sliding the entire pop-up.. plasma bug..
Comment 11 David Lee 2010-03-08 09:27:16 UTC
Also to note is that this produces a security hole in comment #10's case:

I expect that waking a computer after suspending would lock me out, as it normally does. When the machine goes to sleep automatically however, the screen lock is not set up when the machine is woken; I'm able to do some things on my computer for couple seconds before the stuck sleep events trigger another suspend, after which the screen is properly locked.

This bug should be marked as more severe than just wishlist.
Comment 12 Steffen Jost 2010-03-17 11:09:44 UTC
Worst one yet: 2 suspends to disk and 1 shutdown. :(

I hit the Shutdown-button while on battery, the useful countdown started (I often change my mind), I closed the lid and left. The lid event is set to be ignored, unless it is in the very low power profile activated at less than 10%.

Next morning I placed the laptop in the powered docking station and started it. To my surprise, it unsuspended from disk. 

After unsuspend, I just briefly saw the notification that the battery had become critical, and the machine suspended to disk again! That took less than a second, so there was no time to react.

So I unsuspended from disk once more, after which it performed the shutdown I had originally asked for! Again, no chance to abort the shutdown. 

Gaah!
Comment 13 Rafael 2010-03-17 16:23:12 UTC
This bug just make the use of KDE in laptops a lack, this bug should be a priority greater than wishlist. I really believe that this bug and also bug #221637 are urgent.
Comment 14 Dario Freddi 2010-11-10 00:29:08 UTC
It should be fixed in 4.6
Comment 15 Robin Appelman 2011-01-09 11:21:58 UTC
It still happens with 4.6 RC2 on my laptop.
Comment 16 Rafael 2011-02-08 11:09:58 UTC
This bug is not fixed, still reproducible in 4.6.00.
Comment 17 Rafael 2011-02-08 11:27:31 UTC
Steps to reproduce in KDE 4.6.00:
-I open the log-out dialog, I click on Shutdown button.
-I hear the log-out sound.
-I close the lip of the laptop.

What are the actual results?
-The laptop suspends to RAM.
-The next time I power on the laptop, the shutdown process continues and the laptop is powered off.

What are the expected results?
-The laptops shouldn't suspend to RAM in the middle of a shutdown process even if I close the laptop lid.
-The shutdown process should continue with the lid closed, and the next time I power on the laptop, it should boot-up the operating system.
Comment 18 Anne-Marie Mahfouf 2011-02-08 11:31:03 UTC
Dario can you look into this please? thanks
Comment 19 Aitor 2011-06-16 23:31:18 UTC
*** Bug 263466 has been marked as a duplicate of this bug. ***
Comment 20 Kai Uwe Broulik 2011-06-29 16:33:03 UTC
Just encountered this thing on latest trunk.
I initiated shutdown, then closed the lid. I heard that dumbeldumbeldumbel sound and thought “oh no, no suspend…“. I opened the lid again, I just saw “Screen is being locked” and notebook went to standby. Upon pressing the on button, it resumed and continued shutting down …
Comment 21 Bernhard Beschow 2012-02-22 13:05:31 UTC
The bug is still there on KDE 4.8.0. Is anybody working on this?
Comment 22 Martin Koller 2012-08-19 21:04:16 UTC
*** Bug 241062 has been marked as a duplicate of this bug. ***
Comment 23 Martin Koller 2012-08-19 21:32:42 UTC
I tried to reproduce this with KDE 4.9.0 on a Fujitsu Esprimo Mobile Laptop running openSuse 12.1/32bit.
I selected shutdown and immediately clicked the power button, which is configured to send the Laptop to sleep (suspend to RAM).
In all three tests, the laptop did shutdown completely, so I could never reproduce the problem.
Anyone here who can reproduce with current KDE 4.9.0 ?
Comment 24 Aitor 2012-08-20 19:20:20 UTC
I'm using 4.9.0 as well and I have just reproduce it.
Using Arch x86_64
Systemd 188-2
Comment 25 Christoph Feck 2013-06-16 02:32:00 UTC
*** Bug 321173 has been marked as a duplicate of this bug. ***
Comment 26 Jun Zhou 2013-07-20 12:14:50 UTC
I can reproduce this bug using KDE 4.10.5 Release 1 on OpenSUSE 12.3
Comment 27 Kai Uwe Broulik 2015-01-25 21:58:31 UTC
I guess this is still valid for 5.x
Comment 28 Kai Uwe Broulik 2015-02-10 19:17:18 UTC
Git commit e9192c7e19856380768388b6047c81012d76e021 by Kai Uwe Broulik.
Committed on 10/02/2015 at 19:16.
Pushed by broulik into branch 'master'.

Don't suspend when shutting down
FIXED-IN: 5.3.0

M  +16   -15   daemon/actions/bundled/suspendsession.cpp

http://commits.kde.org/powerdevil/e9192c7e19856380768388b6047c81012d76e021
Comment 29 Sascha Zenglein 2016-10-21 11:40:47 UTC
still happens to me...

systemd-inhibit --list tells that PowerDevil has a block on all the events, so I can't workaround this by setting LidSwitchIgnoreInhibited=no in /etc/systemd/logind.conf
Comment 30 Manuel López-Ibáñez 2019-05-16 15:33:40 UTC
(In reply to Sascha Zenglein from comment #29)
> still happens to me...
> 
> systemd-inhibit --list tells that PowerDevil has a block on all the events,
> so I can't workaround this by setting LidSwitchIgnoreInhibited=no in
> /etc/systemd/logind.conf

I opened a new report in https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1829404

Please join that bug report if you still suffer from this (like I do).