Bug 366402 - Closing the lid triggers Sleep
Summary: Closing the lid triggers Sleep
Status: RESOLVED UPSTREAM
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.7.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Development Mailing List
URL:
Keywords:
: 364478 376755 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-08-04 09:51 UTC by Olivier Churlaud
Modified: 2017-02-22 10:07 UTC (History)
6 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 Olivier Churlaud 2016-08-04 09:51:52 UTC
Since last update, if I close the lid my laptop go to sleep.

In Energy saving is set: When the lid is closed: "Don't do anything"

I spoke with Kai and here are the info I gave him:

- Starting KDED from konsole:

kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/ksysguard.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/networkwatcher.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/statusnotifierwatcher.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/solidautoeject.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/ktimezoned.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/networkmanagement.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/khotkeys.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/networkstatus.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/soliduiserver.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/powerdevil.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/keyboard.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/device_automounter.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/proxyscout.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/recentdocumentsnotifier.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/kscreen.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/bluedevil.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/remotedirnotify.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/desktopnotifier.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/baloosearchmodule.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/freespacenotifier.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/appmenu.so"
kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib/qt/plugins/kf5/kded/kwrited.so"
Reusing existing ksycoca
Recreating ksycoca file ("/home/olivier/.cache/ksycoca5_en_tzuXy0i69O7VECxsx72nVId6iK0=", version 303)
Still in the time dict (i.e. deleted files) ("apps")
kf5.kservice.sycoca: Parse error in  "/home/olivier/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu" , line  1 , col  1 :  "unexpected end of file"
kf5.kservice.sycoca: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.
kf5.kservice.sycoca: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.
kf5.kservice.sycoca: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.
kf5.kservice.sycoca: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.
kf5.kservice.sycoca: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.
Saving
kf5.kded: found kded module "accounts" by prepending 'kded_' to the library path, please fix your metadata.
kf5.kded: found kded module "printmanager" by prepending 'kded_' to the library path, please fix your metadata.
powerdevil: Backend loaded, loading core
powerdevil: Core loaded, initializing backend
powerdevil: Using XRandR
powerdevil: Screen brightness value:  703
powerdevil: Screen brightness value max:  937
powerdevil: current screen brightness value:  703
powerdevil: Backend is ready, KDE Power Management system initialized
powerdevil: Battery with UDI "/org/freedesktop/UPower/devices/battery_BAT0" was detected
XSync seems available and ready
XSync Inited
Supported, init completed
powerdevil: Session path: "/org/freedesktop/login1/session/c5"
powerdevil: ACTIVE SESSION PATH: "/org/freedesktop/login1/session/c5"
powerdevil: Current session is now active
powerdevil: fd passing available: true
powerdevil: systemd powersave events handling inhibited, descriptor: 25
powerdevil: systemd support initialized
powerdevil: Got a valid offer for  "DPMSControl"
powerdevil: Core is ready, registering various services on the bus...
powerdevil: Can't contact ck
powerdevil: We are now into activity  "00000000-0000-0000-0000-000000000000"
powerdevil: ("6de9273d-e2e2-4eb0-8ec0-fc828b89bfbd", "5be83873-5d59-47fa-bf34-55a4e3c05e3c") ()
powerdevil: () ()
powerdevil: Loading profile for plugged AC
powerdevil: Activity is not forcing a profile
powerdevil: Profiles:  "AC" ""
powerdevil: "AC" ""
powerdevil: Can't contact ck
powerdevil: Profiles:  "AC" ""
powerdevil: Screen brightness value max:  937
powerdevil: set screen brightness value:  703
powerdevil: Screen brightness value:  703
powerdevil: Handle button events action could not check for screen configuration
powerdevil: Can't contact ck
powerdevil: We are now into activity  "5be83873-5d59-47fa-bf34-55a4e3c05e3c"
powerdevil: ("6de9273d-e2e2-4eb0-8ec0-fc828b89bfbd", "5be83873-5d59-47fa-bf34-55a4e3c05e3c") ()
powerdevil: () ("mode")
powerdevil: Loading profile for plugged AC
powerdevil: Activity is not forcing a profile
powerdevil: Skipping action reload routine as profile has not changed
kscreen: starting external backend launcher for ""
networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "AllDevices"
networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "Devices"
networkmanager-qt: void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap&) Unhandled property "GlobalDnsConfiguration"
Registering ":1.482/org/ayatana/NotificationItem/firetray" to system tray
Registering "org.kde.StatusNotifierHost-24847" as system tray
modemmanager-qt: Failed enumerating MM objects: "org.freedesktop.systemd1.NoSuchUnit" 
 "Unit dbus-org.freedesktop.ModemManager1.service not found."
powerdevil: Can't contact ck
Registering "org.kde.StatusNotifierItem-19199-1/StatusNotifierItem" to system tray
Registering "org.kde.StatusNotifierItem-24871-1/StatusNotifierItem" to system tray
Registering "org.kde.StatusNotifierItem-24870-1/StatusNotifierItem" to system tray
kscreen.kded: Config KScreen::Config(0x27fb0f0) is ready
kscreen.kded: Applying config
kscreen.kded: Calculating config ID for KScreen::Config(0x27fb0f0)
kscreen.kded:   Part of the Id:  "3ab790f4e819e9e0bf82d7c60609163d"
kscreen.kded:   Config ID: "6baafbe07b43fdac7618c1e295dbab97"
kscreen.kded: Calculating config ID for KScreen::Config(0x27fb0f0)
kscreen.kded:   Part of the Id:  "3ab790f4e819e9e0bf82d7c60609163d"
kscreen.kded:   Config ID: "6baafbe07b43fdac7618c1e295dbab97"
kscreen.kded: Applying known config "6baafbe07b43fdac7618c1e295dbab97"
kscreen.kded: Finding a mode for QSize(1366, 768) @ 60.0031
kscreen.kded:   Found:  "71"   QSize(1366, 768) @ 60.0031
kscreen.kded: doApplyConfig()
kscreen: Requesting missing EDID for outputs (67)
kscreen.kded: Config applied
kscreen.kded: Monitor for changes:  true
kscreen.kded: Change detected, but ignoring since it's our own noise
powerdevil: Screen brightness value:  703
powerdevil: Brightness changed!!
powerdevil: Suspend session triggered with QMap(("Explicit", QVariant(bool, true))("Type", QVariant(uint, 0)))
plasma-nm: Not emitting connection deactivated notification as we're about to suspend
kscreen.kded: Resumed from suspend, checking for screen changes
plasma-nm: virtual NMVariantMapMap SecretAgent::GetSecrets(const NMVariantMapMap&, const QDBusObjectPath&, const QString&, const QStringList&, uint)
plasma-nm: Path: "/org/freedesktop/NetworkManager/Settings/9"
plasma-nm: Setting name: "802-11-wireless-security"
plasma-nm: Hints: ()
plasma-nm: Flags: 1
Pass a valid window to KWallet::Wallet::openWallet().
plasma-nm: bool SecretAgent::processGetSecrets(SecretsRequest&) const Waiting for the wallet to open
plasma-nm: Not emitting conection activated notification as the connection was active prior to suspend

- config file

[AC]
icon=battery-charging

[AC][BrightnessControl]
value=75

[AC][HandleButtonEvents]
lidAction=0
powerButtonAction=16
triggerLidActionWhenExternalMonitorPresent=false

[AC][WirelessPowerSaving]
btOption=0
wifiOption=0
wwanOption=0

[Activities][5be83873-5d59-47fa-bf34-55a4e3c05e3c]
mode=None

[Activities][6de9273d-e2e2-4eb0-8ec0-fc828b89bfbd]
actLike=AC
mode=ActLike

[Battery]
icon=battery-060

[Battery][BrightnessControl]
value=60

[Battery][HandleButtonEvents]
lidAction=1
powerButtonAction=16
triggerLidActionWhenExternalMonitorPresent=false

[LowBattery]
icon=battery-low

[LowBattery][BrightnessControl]
value=30

[LowBattery][DPMSControl]
idleTime=120

[LowBattery][DimDisplay]
idleTime=60000

[LowBattery][HandleButtonEvents]
lidAction=1
powerButtonAction=16
triggerLidActionWhenExternalMonitorPresent=false

[LowBattery][SuspendSession]
idleTime=300000
suspendType=1

- qdbus --system --literal org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.ListInhibitors

 Argument: a(ssssuu) {[Argument: (ssssuu) "handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch", "PowerDevil", "KDE handles power events", "block", 1000, 27058], [Argument: (ssssuu) "sleep", "NetworkManager", "NetworkManager needs to turn off networks", "delay", 0, 410], [Argument: (ssssuu) "sleep", "Écran de verrouillage", "S'assure que l'écran est verrouillé avant la mise en veille", "delay", 1000, 24816]}]


Reproducible: Always
Comment 1 Antonio Rojas 2016-08-04 10:30:08 UTC
logind.conf has LidSwitchIgnoreInhibited=yes by default. In systemd<231 this setting was ignored because of a bug that has been fixed in 231 [1]. So this is intended behavior, if you want the lid switch inhibitor to work you need to set LidSwitchIgnoreInhibited=no in logind.conf

[1] https://github.com/systemd/systemd/commit/8121f4d209eca85dcb11830800483cdfafbef9b7
Comment 2 Olivier Churlaud 2016-08-04 10:33:34 UTC
In this case, Powerdevil should be able to change this..
Comment 3 Kai Uwe Broulik 2016-08-04 10:47:20 UTC
Wow. This is a joke, right? 

> LidSwitchIgnoreInhibited= defaults to "yes"

Brilliant. Anyone remember those days where behavioral changes (and this doesn't matter if it was a bug) were announced in advance and weren't possible until the next major release few years down the road?

Closing as upstream fuckup.
Comment 4 Bhushan Shah 2016-08-06 12:51:41 UTC
*** Bug 364478 has been marked as a duplicate of this bug. ***
Comment 5 Weng Xuetian 2016-08-09 01:23:11 UTC
Just FYI:

https://github.com/systemd/systemd/issues/3897

Looks like the commit mentioned above will be reverted.
Comment 6 Najjar 2016-08-25 21:29:16 UTC
Does this mean that we have to wait for the next systemd release for a fix? If so, we're talking months here. I left the lid open, but in the last days had KTorrent downloading and running. I came back today and found that it went to sleep once all the downloads had finished! It's not a serious bug, but in terms of "quality of usage" it ranks high.
Comment 7 Weng Xuetian 2016-08-26 04:04:00 UTC
well not all distro package latest systemd, so probably it will be skipped.

And you can also modify the logind.conf and set LidSwitchIgnoreInhibited=no
Comment 8 Kai Uwe Broulik 2017-02-22 10:07:06 UTC
*** Bug 376755 has been marked as a duplicate of this bug. ***