Discussion:
[Powerdevil] [Bug 344456] New: Plasma 5 desktop does not suspend with only upower, no systemd
Eric Hameleers
2015-02-22 18:38:54 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Bug ID: 344456
Summary: Plasma 5 desktop does not suspend with only upower, no
systemd
Product: Powerdevil
Version: 5.2.0
Platform: Slackware Packages
OS: Linux
Status: UNCONFIRMED
Severity: major
Priority: NOR
Component: general
Assignee: plasma-***@kde.org
Reporter: ***@slackware.com

Symptom: The system does not offer suspend or hibernate options, whereas the
old KDE 4.x versions that were installed prior to Plasma 5 have always offered
shutdown and hibernate options.
Additionally, the laptop can not be left running on battery because it will
never suspend and will drain the battery completely.


Reproducible: Always

Steps to Reproduce:
1. Install Slackware-current (Slackware's development tree)
2. Install Plasma 5 packages from
http://taper.alienbase.nl/mirrors/alien-kde/current/testing/
3. Run the Plasma 5 desktop

Actual Results:
In the Leave menu: Shutdown and Hibernate are missing. If a laptop running this
software is left alone and on battery power, it will not suspend (thereby
preserving battery charge) but instead it will keep running until the battery
is drained.

Expected Results:
In the Leave menu: Shutdown and Hibernate are present.
If the Slackware laptop running Plasma 5 is left unattended while on battery
power, it will suspend before the battery is fully drained.

Affected system: Slackware-current (development tree of Feb 2015) combined with
Framework 5.7.0, Plasma 5.2.0 and Applications 14.12.2.

Points of interest: Slackware uses upower 0.9.17 and does not have systemd or a
shim. It uses ConsoleKit (1, not 2) for session and seat management, and
polkit-0.105 for handling the privileges. Additional packages for the KDE 4 and
Plasma 5 environments are, polkit-qt-1, polkit-qt5-1, polkit-kde-agent-1,
polkit-kde-framework, polkit-kde-kcmodules-1, polkit-kde-kcmodules-framework.

Note: this older version of UPower which Slackware uses, still offers the
shutdown and hibernate functionality which was ultimately removed after 0.9.23.
Diagnostics: Here is output of the relevant programs, feel free to ask more
detail:
$ upower -d
...
Daemon:
daemon-version: 0.9.17
can-suspend: yes
can-hibernate no
on-battery: no
on-low-battery: no
lid-is-closed: no
lid-is-present: yes
is-docked: no

$ qdbus org.kde.kded5 /org/freedesktop/PowerManagement CanSuspend
false

$ qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement
CanSuspend
false

$ qdbus --system org.freedesktop.login1 /org/freedesktop/login1
org.freedesktop.login1.Manager.CanSuspend
Service 'org.freedesktop.login1' does not exist.
--
You are receiving this mail because:
You are watching all bug changes.
Kai Uwe Broulik
2015-02-22 19:11:33 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Kai Uwe Broulik <***@privat.broulik.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@privat.broulik.de

--- Comment #1 from Kai Uwe Broulik <***@privat.broulik.de> ---
Can you check the SuspendAllowed and CanSuspend properties of
org.freedesktop.UPower? Both of them have to be true in order for it to
announce suspend support.
--
You are receiving this mail because:
You are watching all bug changes.
Eric Hameleers
2015-02-22 20:58:34 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #2 from Eric Hameleers <***@slackware.com> ---
Hi Kai

First: my apologies for stating "shutdown and hibernate" when I meant to say
"suspend and hibernate" of course.

Here are the results on my laptop:

$ qdbus --system org.freedesktop.UPower /org/freedesktop/UPower
org.freedesktop.UPower.CanSuspend
true
$ qdbus --system org.freedesktop.UPower /org/freedesktop/UPower
org.freedesktop.UPower.SuspendAllowed
true

And this actually suspended the laptop:
$ dbus-send --system --print-reply --dest='org.freedesktop.UPower'
/org/freedesktop/UPower org.freedesktop.UPower.Suspend
method return sender=:1.14 -> dest=:1.52 reply_serial=2

Still, no suspend option in the Leave menu or in the System Settings > Power
Management.
--
You are receiving this mail because:
You are watching all bug changes.
Lukáš Tinkl
2015-02-22 23:08:17 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Lukáš Tinkl <***@kde.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@kde.org
--
You are receiving this mail because:
You are watching all bug changes.
Lukáš Tinkl
2015-02-22 23:34:57 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #3 from Lukáš Tinkl <***@kde.org> ---
Are you really sure there's no login1 service on DBUS? It may not be visible
but it's activated on first usage.

The code responsible for querying the suspend/hibernate capabilities first
tries with login1 and only if that's not available, falls back to upower. It
not only checks whether the method is available (CanSuspend) but also whether
it's allowed by polkit (SuspendAllowed), see below for the snippet:

if (m_login1Interface) {
QDBusPendingReply<QString> canSuspend =
m_login1Interface.data()->asyncCall("CanSuspend");
canSuspend.waitForFinished();
if (canSuspend.isValid() && (canSuspend.value() == "yes" ||
canSuspend.value() == "challenge"))
supported |= ToRam;

QDBusPendingReply<QString> canHibernate =
m_login1Interface.data()->asyncCall("CanHibernate");
canHibernate.waitForFinished();
if (canHibernate.isValid() && (canHibernate.value() == "yes" ||
canHibernate.value() == "challenge"))
supported |= ToDisk;

QDBusPendingReply<QString> canHybridSleep =
m_login1Interface.data()->asyncCall("CanHybridSleep");
canHybridSleep.waitForFinished();
if (canHybridSleep.isValid() && (canHybridSleep.value() == "yes" ||
canHybridSleep.value() == "challenge"))
supported |= HybridSuspend;
} else {
if (m_upowerInterface->canSuspend() &&
m_upowerInterface->SuspendAllowed()) {
qCDebug(POWERDEVIL) << "Can suspend";
supported |= ToRam;
}

if (m_upowerInterface->canHibernate() &&
m_upowerInterface->HibernateAllowed()) {
qCDebug(POWERDEVIL) << "Can hibernate";
supported |= ToDisk;
}
}
--
You are receiving this mail because:
You are watching all bug changes.
Eric Hameleers
2015-02-23 09:40:17 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #4 from Eric Hameleers <***@slackware.com> ---
Hi Lukáš,

I am certain that there is no Login1 service available on DBUS. For the moment,
Slackware is not prepared to add anything looking like systemd or logind to the
distro. We still use ConsoleKit 0.4.5 for session management and may switch to
ConsoleKit2 in future.

Eric
--
You are receiving this mail because:
You are watching all bug changes.
Eric Hameleers
2015-02-24 21:44:32 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #5 from Eric Hameleers <***@slackware.com> ---
This is interesting. When opening the systemsettings > powermanagement, and
while monitoring DBus calls with dbus-monitor I expected so find calls to
org.freedesktop.UPower but instead I see calls to
org.freedesktop.PowerManagement and those return false:

method call sender=:1.59 -> dest=org.freedesktop.PowerManagement serial=37
path=/org/freedesktop/PowerManagement;
interface=org.freedesktop.PowerManagement; member=CanSuspend
method return sender=:1.4 -> dest=:1.59 reply_serial=37
boolean false
method call sender=:1.59 -> dest=org.freedesktop.PowerManagement serial=38
path=/org/freedesktop/PowerManagement;
interface=org.freedesktop.PowerManagement; member=CanHibernate
method return sender=:1.4 -> dest=:1.59 reply_serial=38
boolean false
--
You are receiving this mail because:
You are watching all bug changes.
Kai Uwe Broulik
2015-02-24 21:51:26 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #6 from Kai Uwe Broulik <***@privat.broulik.de> ---
Applications are not supposed to call UPower directly. The FDO interface is
standardized and, in our case, provided by PowerDevil.
--
You are receiving this mail because:
You are watching all bug changes.
Eric Hameleers
2015-02-24 22:03:28 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #7 from Eric Hameleers <***@slackware.com> ---
Hi Kai, I understand. But I was trying to indicate the difference (true versus
false) of what UPower thinks about ability to suspend and what PowerDevil makes
of it.

Is it perhaps caused by solid's configuration? When compiling solid-5.7.0 I
noticed:

-- The following features have been disabled:
* Solid::PowerManagement , WIP: Freedesktop backend for the asyncrhonous api
* Solid::PowerManagement , WIP: Freedesktop backend for the asyncrhonous api

And I thought, if that gets disabled by default and it is a WIP, it surely is
not required for proper working of powerdevil, correct?
Because I also get:
$ qdbus org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement
CanSuspend
false

Note that I claim no knowledge of the topic whatsoever, I just try to be as
verbose as possible.
--
You are receiving this mail because:
You are watching all bug changes.
Eric Hameleers
2015-02-26 10:10:26 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #8 from Eric Hameleers <***@slackware.com> ---
This must be related to policies somewhere, because when root starts a Plasma 5
session, the Suspend and Hibernate options are present.
What I fail to understand is why this was never an issue in KDE 4 sessions, nor
in XFCE. It started happening with Plasma 5. So is PowerDevil evaluating
policies differently than before?
--
You are receiving this mail because:
You are watching all bug changes.
Lukáš Tinkl
2015-02-26 12:43:15 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Lukáš Tinkl <***@kde.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WAITINGFORINFO
Status|UNCONFIRMED |NEEDSINFO

--- Comment #9 from Lukáš Tinkl <***@kde.org> ---
Do you have polkit-kde-authentication-agent-1 running? That would grant you the
privs
--
You are receiving this mail because:
You are watching all bug changes.
m***@yahoo.com
2015-02-27 21:03:53 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

***@yahoo.com changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@yahoo.com

--- Comment #10 from ***@yahoo.com ---
Created attachment 91331
--> https://bugs.kde.org/attachment.cgi?id=91331&action=edit
.xsessions-errors: powedevil starts before polkit-kde-authentication-agent-1
--
You are receiving this mail because:
You are watching all bug changes.
m***@yahoo.com
2015-02-27 21:05:35 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #11 from ***@yahoo.com ---
Hi Lukas,

I'm trying to help Eric sort out this issue on our Slackware systems.
polkit-kde-authentication-agent-1 is indeed running, but according to my
.xsession-errors (attached) it is started by klauncher *after* powerdevil is
started by kded. Is this expectect behavior? Otherwise is there a way to change
start-up order or inhibit kded to start the services until after klauncher is
done?
--
You are receiving this mail because:
You are watching all bug changes.
Lukáš Tinkl
2015-02-27 21:21:27 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #12 from Lukáš Tinkl <***@kde.org> ---
Hmm, that could indeed be the problem. polkit-kde-authentication-agent-1 is
started by the session which is always after kded modules (powerdevil being
one)...

I wonder what happens when you restart kded (and hence powerdevil's kded
module) after the session has been up and running (just killall -9 kded5 &&
kded5) and then restart plasmashell (kquitapp5 plasmashell && plasmashell)
--
You are receiving this mail because:
You are watching all bug changes.
m***@yahoo.com
2015-02-27 22:34:26 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #13 from ***@yahoo.com ---
(In reply to Lukáš Tinkl from comment #12)
Post by Lukáš Tinkl
Hmm, that could indeed be the problem. polkit-kde-authentication-agent-1 is
started by the session which is always after kded modules (powerdevil being
one)...
I wonder what happens when you restart kded (and hence powerdevil's kded
module) after the session has been up and running (just killall -9 kded5 &&
kded5) and then restart plasmashell (kquitapp5 plasmashell && plasmashell)
Thank you for your quick reply.
I issued the commands you suggested and that did the trick (partially). Suspend
& Hibernate show up in the Leave Menu, Shutdown & Reboot are still missing.
Now, when powerdevil starts it CAN contact ConsoleKit, whereas in the 'normal'
start-up sequence there's an error message about not contacting CK.
Can the start-up sequence be changed from startkde?

kf5.kiconthemes: "Theme tree: (Breeze)"
powerdevil: Loading UPower backend...
powerdevil: Success!
powerdevil: Backend loaded, loading core
powerdevil: Core loaded, initializing backend
powerdevil: Using XRandR
powerdevil: Screen brightness value: 3
powerdevil: current screen brightness value: 3
powerdevil: Can suspend
powerdevil: Can hibernate
powerdevil: Backend is ready, KDE Power Management system initialized
powerdevil: A new battery was detected
XSync seems available and ready
XSync Inited
Supported, init completed
powerdevil: Current session is now active
powerdevil: ConsoleKit support initialized
powerdevil: Got a valid offer for "DPMSControl"
powerdevil: Core is ready, registering various services on the bus...
powerdevil: Can't contact systemd
powerdevil: We are now into activity "default"
powerdevil: () ()
powerdevil: () ()
powerdevil: Loading profile for plugged AC
powerdevil: Activity is not forcing a profile
powerdevil: Profiles: "AC" ""
powerdevil: set screen brightness percentage: 30
powerdevil: Screen brightness value max: 10
powerdevil: set screen brightness value: 3
powerdevil:
powerdevil: Loading timeouts with 300000
--
You are receiving this mail because:
You are watching all bug changes.
Lukáš Tinkl
2015-03-01 20:50:10 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Lukáš Tinkl <***@kde.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|WAITINGFORINFO |---
CC| |***@kde.org
Ever confirmed|0 |1
Status|NEEDSINFO |CONFIRMED

--- Comment #14 from Lukáš Tinkl <***@kde.org> ---
Adding Martin G. to CC
--
You are receiving this mail because:
You are watching all bug changes.
David Edmundson
2015-03-01 21:01:58 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

David Edmundson <***@davidedmundson.co.uk> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@davidedmundson.co.uk

--- Comment #15 from David Edmundson <***@davidedmundson.co.uk> ---
Can you get the

/proc/$PID/environ from kded5 both in startup and when restarted.
--
You are receiving this mail because:
You are watching all bug changes.
m***@yahoo.com
2015-03-01 22:55:22 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #16 from ***@yahoo.com ---
(In reply to David Edmundson from comment #15)
Post by David Edmundson
Can you get the
/proc/$PID/environ from kded5 both in startup and when restarted.
Hi David,

At the KDE login prompt (works only as root):
#cat /proc/6931/environ
SHELL=/bin/falseDBUS_STARTER_ADDRESS=unix:abstract=/tmp/dbus-BIa7iG2AwB,guid=475bad861fee482f041c727f54f39599DISPLAY=:0XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0PATH=/bin:/usr/bin:/usr/local/binXDG_VTNR=7XDG_SESSION_TYPE=x11XCURSOR_THEME=DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-BIa7iG2AwB,guid=475bad861fee482f041c727f54f39599XDG_SEAT=seat0QT_IM_MODULE=composeXAUTHORITY=/var/run/sddm/:0XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0USER=sddmXDG_SESSION_CLASS=greeterDBUS_STARTER_BUS_TYPE=sessionPWD=/var/lib/sddmLANG=HOME=/var/lib/sddmLOGNAME=sddmroot

After login as normal user:
$cat /proc/7175/environ
r - (just this one letter)

Atfter restarting using Lukas' command
$cat /proc/7705/environ
CPLUS_INCLUDE_PATH=/usr/lib64/qt/includeXDG_VTNR=7MANPATH=/usr/local/man:/usr/man:/usr/lib64/java/manKDE_MULTIHEAD=falseHOSTNAME=woody.msm.dynu.netSHELL=/bin/bashTERM=xtermXDG_SESSION_COOKIE=305abc5eecc5c06a5956d035532fc488-1425249837.402580-775400545KONSOLE_DBUS_SERVICE=:1.99GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/sebas/.gtkrc-2.0:/home/sebas/.config/gtkrc-2.0KONSOLE_PROFILE_NAME=ShellGS_LIB=/home/sebas/.fontsGTK_RC_FILES=/etc/gtk/gtkrc:/home/sebas/.gtkrc:/home/sebas/.config/gtkrcWINDOWID=140509190QT5DIR=/usr/lib64/qt5SHELL_SESSION_ID=b291dfc267df4000aa624220bcc8b220XDG_SESSION_CLASS=userKDE_FULL_SESSION=trueANT_HOME=/usr/share/antUSER=sebasLS_COLORS=GDK_USE_XFT=1XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0SESSION_MANAGER=local/woody:@/tmp/.ICE-unix/7189,unix/woody:/tmp/.ICE-unix/7189XDG_CONFIG_DIRS=/etc/xdg:/etc/kde/xdgT1LIB_CONFIG=/usr/share/t1lib/t1lib.configMINICOM=-c
onPATH=/home/sebas/work/OE/stuff/bitbake/bin:/home/sebas/work/CodeSourcery/Sourcery_G++_Lite/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/share/ant/bin:/usr/lib64/kde4/libexec:/usr/lib64/java/bin:/usr/lib64/java/jre/bin:/usr/lib64/qt/bin:/usr/lib64/qt5/bin:.DESKTOP_SESSION=plasmaQT_IM_MODULE=composeLC_COLLATE=CXDG_SESSION_TYPE=x11INPUTRC=/etc/inputrcPWD=/home/sebasJAVA_HOME=/usr/lib64/javaVDPAU_LOG=0KONSOLE_DBUS_WINDOW=/Windows/1KDE_SESSION_UID=1000LANG=en_USKDEDIRS=/usrQT4DIR=/usr/lib64/qtBBPATH=/home/sebas/work/OE/stuff/build:/home/sebas/work/OE/stuff/openembeddedKONSOLE_DBUS_SESSION=/Sessions/1COLORFGBG=15;0XDG_SEAT=seat0SHLVL=2HOME=/home/sebasKDE_SESSION_VERSION=5LANGUAGE=LS_OPTIONS=-F
-b -T 0
--color=autoXCURSOR_THEME=breeze_cursorsLESS=-MRXDG_SESSION_DESKTOP=KDELOGNAME=sebasKSDK_PATH=/opt/Freescale/KSDK_1.1.0XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/shareDBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-ptZvB0UDfc,guid=e172c04dd00babbdc789f86954f3962dLESSOPEN=|lesspipe.sh
%sPKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfigDISPLAY=:0PROFILEHOME=QT_PLUGIN_PATH=/usr/lib64/qt5/plugins:/lib/kde5/plugins/XDG_CURRENT_DESKTOP=KDEG_BROKEN_FILENAMES=1XAUTHORITY=/tmp/xauth-1000-_0_=/usr/bin/kded5

Regards
--
You are receiving this mail because:
You are watching all bug changes.
m***@yahoo.com
2015-03-01 23:01:56 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #17 from ***@yahoo.com ---
I have noticed that there's also a kded4 running after logging in. Is kded4
still necessary?
The environ for kded4 is:

bash-4.3$ cat /proc/8207/environ
XDG_VTNR=7CPLUS_INCLUDE_PATH=/usr/lib64/qt/includeMANPATH=/usr/local/man:/usr/man:/usr/lib64/java/manHOSTNAME=woody.msm.dynu.netSHELL=/bin/bashTERM=dumbXDG_SESSION_COOKIE=305abc5eecc5c06a5956d035532fc488-1425250685.73213-1277521160GS_LIB=/home/sebas/.fontsQT5DIR=/usr/lib64/qt5KDE_FULL_SESSION=trueXDG_SESSION_CLASS=userANT_HOME=/usr/share/antUSER=sebasLS_COLORS=GDK_USE_XFT=1XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0XDG_CONFIG_DIRS=/etc/xdg:/etc/kde/xdgT1LIB_CONFIG=/usr/share/t1lib/t1lib.configMINICOM=-c
onDESKTOP_SESSION=plasmaPATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/share/ant/bin:/usr/lib64/kde4/libexec:/usr/lib64/java/bin:/usr/lib64/java/jre/bin:/usr/lib64/qt/bin:/usr/lib64/qt5/bin:.LC_COLLATE=CXDG_SESSION_TYPE=x11PWD=/home/sebasINPUTRC=/etc/inputrcJAVA_HOME=/usr/lib64/javaVDPAU_LOG=0KDE_SESSION_UID=1000LANG=en_USKDEDIRS=/usrQT4DIR=/usr/lib64/qtHOME=/home/sebasXDG_SEAT=seat0SHLVL=1KDE_SESSION_VERSION=5XCURSOR_THEME=breeze_cursorsLS_OPTIONS=-F
-b -T 0
--color=autoLOGNAME=sebasXDG_SESSION_DESKTOP=KDELESS=-MRDBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-9gnDo32AKV,guid=12a9aa4028b4ff3a737d34f654f3997dXDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/shareKSDK_PATH=/opt/Freescale/KSDK_1.1.0LESSOPEN=|lesspipe.sh
%sPKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfigDISPLAY=:0QT_PLUGIN_PATH=/usr/lib64/qt5/plugins:/lib/kde5/plugins/XDG_CURRENT_DESKTOP=KDEG_BROKEN_FILENAMES=1XAUTHORITY=/home/sebas/.Xauthority_=/usr/bin/kwrapper5SESSION_MANAGER=local/woody:@/tmp/.ICE-unix/8152,unix/woody:/tmp/.ICE-unix/8152QT_IM_MODULE=composeQT_NO_GLIB=1QT_QPA_PLATFORM=xcbLANGUAGE=

and at the same time as mentioned in the previous comment for kded5 I get:
bash-4.3$ cat /proc/8136/environ
r

Regards
--
You are receiving this mail because:
You are watching all bug changes.
m***@yahoo.com
2015-03-05 21:14:43 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #18 from ***@yahoo.com ---
Hi,

Are there any updates on this bug? Is more information necessary?
Thank you.
--
You are receiving this mail because:
You are watching all bug changes.
Alexander Potashev
2015-03-29 03:52:41 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Alexander Potashev <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are watching all bug changes.
Eric Hameleers
2015-03-29 11:36:13 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #19 from Eric Hameleers <***@slackware.com> ---
(In reply to Lukáš Tinkl from comment #12)
Post by Lukáš Tinkl
Hmm, that could indeed be the problem. polkit-kde-authentication-agent-1 is
started by the session which is always after kded modules (powerdevil being
one)...
I wonder what happens when you restart kded (and hence powerdevil's kded
module) after the session has been up and running (just killall -9 kded5 &&
kded5) and then restart plasmashell (kquitapp5 plasmashell && plasmashell)
On my laptop, suspend and hibernate will indeed appear after killing kded5 and
restarting plasmashell.

You will get shutdown & reboot back by editing /usr/bin/startkde and changing
the line:
kwrapper5 ksmserver $KDEWM $KSMSERVEROPTIONS
to
ksmserver $KDEWM $KSMSERVEROPTIONS
i.e. by removing the "kwrapper5". Making this edit by itself will not change
anything with regard to suspend/hibernate, they are two separate issues.
--
You are receiving this mail because:
You are watching all bug changes.
Michael Palimaka
2015-04-09 14:28:50 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Michael Palimaka <***@gentoo.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Version|5.2.0 |5.2.2
CC| |***@gentoo.org

--- Comment #20 from Michael Palimaka <***@gentoo.org> ---
(In reply to Eric Hameleers from comment #19)
Post by Eric Hameleers
You will get shutdown & reboot back by editing /usr/bin/startkde and
kwrapper5 ksmserver $KDEWM $KSMSERVEROPTIONS
to
ksmserver $KDEWM $KSMSERVEROPTIONS
i.e. by removing the "kwrapper5".
I can confirm that removing kwrapper causes shutdown/reboot entries to
reappear. It turns out that launching ksmserver with kwrapper5 causes
org.freedesktop.ConsoleKit.Manager.CanStop to return false. Not really sure
what the cause of that could be.
--
You are receiving this mail because:
You are watching all bug changes.
David Edmundson
2015-04-09 14:31:34 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #21 from David Edmundson <***@davidedmundson.co.uk> ---
I have a theory.
Console Kit sets a an environment variable which possibly isn't being
transferred.

Can you cat /proc/PIDofKSMServer/environment

both with and without kwrapper5 and attach results
--
You are receiving this mail because:
You are watching all bug changes.
Michael Palimaka
2015-04-09 15:02:50 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #22 from Michael Palimaka <***@gentoo.org> ---
Created attachment 91963
--> https://bugs.kde.org/attachment.cgi?id=91963&action=edit
environment with krapper
--
You are receiving this mail because:
You are watching all bug changes.
Michael Palimaka
2015-04-09 15:03:07 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Michael Palimaka <***@gentoo.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #91963|environment with krapper |environment with kwrapper
description| |
--
You are receiving this mail because:
You are watching all bug changes.
Michael Palimaka
2015-04-09 15:03:27 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #23 from Michael Palimaka <***@gentoo.org> ---
Created attachment 91964
--> https://bugs.kde.org/attachment.cgi?id=91964&action=edit
environment without kwrapper
--
You are receiving this mail because:
You are watching all bug changes.
Michael Palimaka
2015-04-09 15:05:22 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #24 from Michael Palimaka <***@gentoo.org> ---
Note that the environment with kwrapper is from "kwrapper5 ksmserver" and
"ksmserver [kdeinit5]" has none.
--
You are receiving this mail because:
You are watching all bug changes.
Simon Andric
2015-04-09 17:01:54 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Simon Andric <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are watching all bug changes.
f***@gmail.com
2015-04-20 11:09:21 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

***@gmail.com changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are watching all bug changes.
a***@manjaro.org
2015-04-24 18:11:29 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

***@manjaro.org changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@manjaro.org

--- Comment #25 from ***@manjaro.org ---
Hi Eric,

the part with the missing restart/shutdown in the menu, can be also solved by
providing polkit rules for ck restart/shutdown.

Polkit rules for upower make also suspend/hibernate appear in menu.
But, I do get on gentoo the very same errors logged regarding powerdevil not
registering a ck session, thus no suspend.
--
You are receiving this mail because:
You are watching all bug changes.
a***@gmail.com
2015-04-28 14:23:09 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

***@gmail.com changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.
| |com
--
You are receiving this mail because:
You are watching all bug changes.
Celestino Bellone
2015-05-06 13:03:46 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Celestino Bellone <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are watching all bug changes.
Manuel Mommertz
2015-05-06 17:35:51 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Manuel Mommertz <***@gmx.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmx.de
--
You are receiving this mail because:
You are watching all bug changes.
Eric Hameleers
2015-05-10 15:07:02 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #26 from Eric Hameleers <***@slackware.com> ---
Created attachment 92523
--> https://bugs.kde.org/attachment.cgi?id=92523&action=edit
Polkit configuration file for suspend/hibernate

If this file is added to /etc/polkit-1/localauthority/50-local.d/ (for instance
as "30-org.freedesktop.upower.pkla") it will enable the missing Suspend and
Hibernate options in the Plasma 5 desktop.
--
You are receiving this mail because:
You are watching all bug changes.
Eric Hameleers
2015-05-10 15:12:58 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #27 from Eric Hameleers <***@slackware.com> ---
I have attached a polkit file which enables the missing suspend/hibernate
features in my Plasma 5 desktop.
Thanks to luis' comment in this blog article:
http://alien.slackbook.org/blog/kde-5_15-02-release-for-slackware-current/
I want to suggest that this bug report can be closed now that there is a
working solution.

In that same article, two other polkit files are proposed to enable the missing
shutdown/rebootfeatures without the need for removing the kwrapper5 command
from the KDE startup script "/usr/bin/startkde".
For your reference, this is the content of those two files.
Note that i have altered them slightly compared to the proposals in my blog,
because I want to limit this functionality to users in the "power" group:

cat
/etc/polkit-1/localauthority/50-local.d/40-org.freedesktop.consolekit.system.stop-multiple-users.pkla
[Allow power users to shutdown]
Identity=unix-group:power
Action=org.freedesktop.consolekit.system.stop-multiple-users;org.freedesktop.consolekit.system.stop
ResultAny=yes
ResultInactive=no
ResultActive=yes

cat
/etc/polkit-1/localauthority/50-local.d/41-org.freedesktop.consolekit.system.restart-multiple-users.pkla
[Allow power users to restart]
Identity=unix-group:power
Action=org.freedesktop.consolekit.system.restart-multiple-users;org.freedesktop.consolekit.system.restart
ResultAny=yes
ResultInactive=no
ResultActive=yes
--
You are receiving this mail because:
You are watching all bug changes.
Kai Uwe Broulik
2015-05-10 15:18:58 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Kai Uwe Broulik <***@privat.broulik.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|CONFIRMED |RESOLVED
Resolution|--- |UPSTREAM

--- Comment #28 from Kai Uwe Broulik <***@privat.broulik.de> ---
Thanks for your feedback and support!
--
You are receiving this mail because:
You are watching all bug changes.
Manuel Bärenz
2015-08-18 16:25:33 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Manuel Bärenz <***@enigmage.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@enigmage.de

--- Comment #29 from Manuel Bärenz <***@enigmage.de> ---
*** Bug 351447 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are watching all bug changes.
Manuel Bärenz
2015-08-18 19:34:22 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #30 from Manuel Bärenz <***@enigmage.de> ---
For Gentoo, just adding the Polkit files will not suffice. Only after
respawning first kded5 and then plasmashell am I able to see Sleep and
Hibernate buttons at all. And even then the Sleep button does not work, but
only locks the screen after showing a black screen for a few seconds.
--
You are receiving this mail because:
You are watching all bug changes.
via KDE Bugzilla
2015-11-22 11:38:56 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

***@mailinator.com changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@mailinator.com

--- Comment #31 from ***@mailinator.com ---
I had the same problem as Manuel on my gentoo box. Even after adding the Polkit
files nothing changed, both shutdown/reboot and sleep/hibernate options were
not shown.
In my case the reason was that my user was not a member of the group "users".
When I added my user account to this group, everything was OK.
--
You are receiving this mail because:
You are watching all bug changes.
via KDE Bugzilla
2015-11-22 11:58:54 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #32 from ***@gmail.com ---
It is part of the upgrade guide:
https://wiki.gentoo.org/wiki/KDE/Plasma_5_upgrade#Missing_shutdown.2C_reboot.2C_suspend_and_hibernate_buttons_when_using_OpenRC
--
You are receiving this mail because:
You are watching all bug changes.
via KDE Bugzilla
2015-12-18 17:33:20 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

***@centrum.cz changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@centrum.cz

--- Comment #33 from ***@centrum.cz ---
I still have this problem. I'm running gentoo with openrc (no systemd), all
software in current versions to this time, however there is some progress since
recent time when parts of kde5 was upgraded that I see restart and shutdown
options. I've tried everything from this thread except restarting kded5 and
powerdevil from running session, removing kwrapper from startkde doesn't help,
I was always member of group "users", polkit rules are in place, all dbus
commands have same output as in this thread and I have a right to suspend as a
user. However my system don't support hibernate, I hope this is not a problem.
Maybe the problem is that powerdevil can't contact consolekit daemon.

.xsession-errors
powerdevil: Can't contact systemd
powerdevil: Can't contact ck
--
You are receiving this mail because:
You are watching all bug changes.
Kai Uwe Broulik via KDE Bugzilla
2015-12-18 17:52:36 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #34 from Kai Uwe Broulik <***@privat.broulik.de> ---
Check whether the dbus service org.freedesktop.ConsoleKit is running and it has
permission to access it. That message is from the inhibition manager and
unrelated to suspend, though.
--
You are receiving this mail because:
You are watching all bug changes.
via KDE Bugzilla
2015-12-18 18:19:33 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #35 from ***@centrum.cz ---
I believe so, it returns this:

qdbus --system org.freedesktop.ConsoleKit
/
/org
/org/freedesktop
/org/freedesktop/ConsoleKit
/org/freedesktop/ConsoleKit/Manager
/org/freedesktop/ConsoleKit/Seat1
/org/freedesktop/ConsoleKit/Session2

I've tried with fresh new user and it is still the same. Only difference is
that new user when click restart (restart computer) only X session is actually
restarted, this user is only member of "users" group, while my actual user is
member of more groups. I see that slackware and gentoo are using different
groups power and users, and that user above who has reported same symptoms
resolved it by adding user to group "users". Maybe I have some group rights
wrong somewhere in filesystem, process, socket, anything, or is is solely a way
for authorization by those polkit rules? Is there any way to debug why
powerdevil can't contact consolekit?
--
You are receiving this mail because:
You are watching all bug changes.
via KDE Bugzilla
2016-01-30 16:31:38 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #36 from ***@gmail.com ---
Please check your consolekit setup w/ '$ ck-list-sessions' from inside your
plasma session.

Make sure your system-login file is valid:
https://wiki.gentoo.org/wiki/KDE/Plasma_5_upgrade#Missing_shutdown.2C_reboot.2C_suspend_and_hibernate_buttons_when_using_OpenRC
--
You are receiving this mail because:
You are watching all bug changes.
via KDE Bugzilla
2016-01-31 10:06:42 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #37 from ***@centrum.cz ---
$ ck-list-sessions
Session2:
unix-user = '1000'
realname = '(null)'
seat = 'Seat1'
session-type = ''
active = TRUE
x11-display = ':0'
x11-display-device = '/dev/tty7'
display-device = ''
remote-host-name = ''
is-local = TRUE
on-since = '2016-01-31T09:53:12.970020Z'
login-session-id = ''

I believe I have everything right regarding
https://wiki.gentoo.org/wiki/KDE/Plasma_5_upgrade#Missing_shutdown.2C_reboot.2C_suspend_and_hibernate_buttons_when_using_OpenRC
--
You are receiving this mail because:
You are watching all bug changes.
Sok Ann Yap via KDE Bugzilla
2016-03-06 10:19:33 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Sok Ann Yap <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are watching all bug changes.
Bob Wya via KDE Bugzilla
2016-04-10 21:41:25 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Bob Wya <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are watching all bug changes.
Anton Filimonov via KDE Bugzilla
2016-04-13 07:31:42 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

Anton Filimonov <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com

--- Comment #38 from Anton Filimonov <***@gmail.com> ---
Had same problem with suspend in Gentoo with plasma 5.5.5. Localauthority files
mentioned above didn't help. Managed to solve missing suspend issue by adding
polkit rule instead:

polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.upower.suspend")
{
return polkit.Result.YES;
}
});
--
You are receiving this mail because:
You are watching all bug changes.
via KDE Bugzilla
2016-10-16 14:29:26 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=344456

--- Comment #39 from ***@centrum.cz ---
Hi, I'm happy to report that the problem seems to be finally fixed with plasma
5.8 (just confirmed by my experience, not changelog).
--
You are receiving this mail because:
You are watching all bug changes.
Loading...