[Bug 1196752] Re: Suspend only works once when using upower with logind -- s-shim needs to call /lib/systemd/system-sleep/*
Joseph Yasi
joe.yasi at gmail.com
Fri Aug 30 18:50:35 UTC 2013
I guess it depends on how user programs are currently using the systemd
version API to check things. KDE PowerDevil strips everything before the
space and just compares against the number, so in principle, the shim
could use the prefix string to say something. I don't know how others
use the API.
KDE PowerDevil usage is here:
https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/master/entry/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp#L40
A cleaner approach to handling this would be an API for advertising
implemented features so programs aren't checking the version to see if
something is supported. Instead, they check if a feature they require is
supported. It's the best way if you're just going to implement part of
systemd, but you'd have to convince upstream to implement such an API.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1196752
Title:
Suspend only works once when using upower with logind -- s-shim needs
to call /lib/systemd/system-sleep/*
Status in “systemd” package in Ubuntu:
Invalid
Status in “systemd-shim” package in Ubuntu:
Confirmed
Status in “upower” package in Ubuntu:
Fix Released
Status in “upower” package in Debian:
Fix Released
Bug description:
On saucy with upower 0.9.20-1ubuntu2, suspending via UPower (or the KDE suspend menu) only works once:
dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend
and resuming works the first time. However, calling it again after resume returns:
"Sleep has already been requested and is pending"
Sleeping directly via logind works every time:
dbus-send --print-reply --system --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Suspend boolean:true
Returning FALSE for the LOGIND_AVAILABLE() case in gboolean
up_backend_emits_resuming (UpBackend *backend) in src/linux/up-
backend.c allows suspending multiple times via UPower (or the KDE
suspend menu). UPower is somehow not getting the resume signal from
logind.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1196752/+subscriptions
More information about the foundations-bugs
mailing list