Bug 407093 - Laptop suspends even if external monitor is plugged in
Summary: Laptop suspends even if external monitor is plugged in
Status: RESOLVED DUPLICATE of bug 407094
Alias: None
Product: Powerdevil
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 5.15.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-30 13:54 UTC by neopt
Modified: 2019-04-30 14:00 UTC (History)
0 users

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


Attachments
powermanagementprofilesrc (845 bytes, text/plain)
2019-04-30 13:54 UTC, neopt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description neopt 2019-04-30 13:54:39 UTC
Created attachment 119746 [details]
powermanagementprofilesrc

SUMMARY
On the systems settings module, I set the laptop lid close action to "Suspend", and unchecked the box "Even when external monitor is connected".
Powerdevil seems to ignore this setting and suspend the laptop whether an external monitor is plugged or not when I shut the lid.

STEPS TO REPRODUCE
1. Plug in external monitor 
2. Close lid

OBSERVED RESULT
System enters suspended state

EXPECTED RESULT
External monitor inhibits suspension.


SOFTWARE/OS VERSIONS
Operating System: NixOS 19.09pre177249
KDE Plasma Version: 5.15.3
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.0
Kernel Version: 4.19.36
OS Type: 64-bit


ADDITIONAL INFORMATION
The issue appears to be a regression - before installing the last updates it worked just fine. Unfortunately I cannot rollback to the previous version easily to confirm this.

$ systemd-inhibit
     Who: UPower (UID 0/root, PID 2754/upowerd)
    What: sleep
     Why: Pause device polling
    Mode: delay

     Who: PowerDevil (UID 1000/salazar, PID 2995/org_kde_powerde)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
     Why: KDE handles power events
    Mode: block

     Who: Screen Locker (UID 1000/salazar, PID 2917/ksmserver)
    What: sleep
     Why: Ensuring that the screen gets locked before going to sleep
    Mode: delay

3 inhibitors listed.

$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager Docked
b true

$ xrandr  | grep " connected"
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
DP-1-2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm

$ journalctl -f
[...]
Apr 30 15:47:51 hostname systemd-logind[2229]: Lid closed.
Apr 30 15:47:51 hostname xsession[2806]: powerdevil: Suspend session triggered with QMap(("Explicit", QVariant(bool, true))("Type", QVariant(uint, 1)))
Apr 30 15:47:51 hostname xsession[2806]: powerdevil: Suspend session triggered with QMap(("Explicit", QVariant(bool, true))("SkipFade", QVariant(bool, true))("Type", QVariant(uint, 1)))
Apr 30 15:47:51 hostname xsession[2806]: powerdevil: Starting Login1 suspend job
Apr 30 15:47:51 hostname xsession[2806]: lock called
Apr 30 15:47:51 hostname xsession[2806]: powerdevil: Pausing all media players before suspending
Apr 30 15:47:51 hostname xsession[2806]: bluedevil: About to suspend
[...]
Comment 1 neopt 2019-04-30 14:00:28 UTC

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