Bug 376683 - System suspends from time to time when works with laptop lid closed and external display connected
Summary: System suspends from time to time when works with laptop lid closed and exter...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.8.5
Platform: Ubuntu Linux
: NOR major
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-19 19:57 UTC by Dmitry
Modified: 2020-10-30 12:14 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry 2017-02-19 19:57:41 UTC
Application: plasmashell (5.8.5)

Qt Version: 5.6.1
Frameworks Version: 5.28.0
Operating System: Linux 4.8.0-38-generic x86_64
Distribution: Ubuntu 16.10

Hardware: MacBookPro11,5

when I work on my laptop with closed lid and System suspends from time to time when works with laptop lid closed and external display connected, it goes to sleep every 5-20 minutes (have not determined the exact intervals).

My system configured to suspend on lid closed event even when external monitor is connected. But why it suspends on itself once it's awake and there is no lid closed events (lid is just permanently closed).
Comment 1 Kai Uwe Broulik 2017-02-20 13:11:02 UTC
Could it be (un)plugging the AC adapter or the battery running low? Whenever the profile changes, it re-evaluates state and finds the lid is closed and then suspends.

Why do you have that option enabled in the first place?
Comment 2 Dmitry 2017-02-20 13:37:35 UTC
>Could it be (un)plugging the AC adapter or the battery running low? Whenever the profile changes, it re-evaluates state and finds the lid is closed and then suspends.

No, the laptop permanently connected to the AC adapter during this.

>Why do you have that option enabled in the first place?

Because I want my laptop suspend on the "close the lid" event.

Is there any way how can I debug this behavior, some logs?
Comment 3 Oliver Henshaw 2017-02-20 13:53:44 UTC
Do you mean that this only happens after you wake the laptop with the lid still closed? How do you wake the the laptop?

(In reply to Dmitry from comment #2)
> Is there any way how can I debug this behavior, some logs?

You need config/QtProject/qtlogging.ini to contain the lines:

[Rules]
powerdevil.debug=true

and then restart your login, then it will be in your regular logs (e.g. .xsession-errors or the journal).
Comment 4 Dmitry 2017-02-20 14:05:47 UTC
>Do you mean that this only happens after you wake the laptop with the lid still 
>closed? How do you wake the the laptop?

Yes. When I close the lid, laptop suspends, and then I wake it up with pressing any key on the external USB keyboard.
Comment 5 Oliver Henshaw 2017-02-20 15:30:38 UTC
Kai, I guess if the user sets triggerLidActionWhenExternalMonitorPresent and wakes the laptop but the lid is still closed, then it seems reasonable to stay awake - i.e. not trigger lid actions - until the lid has been opened (and then return to the normal logic.) What do you think?
Comment 6 Oliver Henshaw 2017-02-20 15:41:53 UTC
Dmitry, have a look at the Lock/Logout plasma panel applet thing. You can configure that to show a suspend icon - would that suit you as well as telling it to suspend-on-lid-close even when the laptop is docked does? And suspend-on-idle might get you the rest of the behaviour you want.

I mean it sounds like sometimes you want to suspend the laptop when you've got it docked and acting like a desktop, and sometimes you want to stay awake whether the lid is open or closed. So perhaps you could have plasma ignore the lid as much as possible?
Comment 7 Thiago Sueto 2020-10-29 05:07:36 UTC
Hello Dmitry, if this issue is still reproducible, you can find the logs for powerdevil easily now with

journalctl -r /usr/lib64/libexec/org_kde_powerdevil

(Listed from most recent to oldest, powerdevil might reside elsewhere on your distro)

Or you can get the PID for the powerdevil process (ps -aux | grep powerdevil) and run

journalctl -r _PID=pidnumberhere
Comment 8 Dmitry 2020-10-30 12:14:34 UTC
It is not reproducible for me anymore (Plasma 5.18.5)