Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
We already have UpConfig to handle that.
|
|
It's already done by GObject.
|
|
|
|
|
|
|
|
This reverts commit eddcf0ef3d0b8445618e368328d7e110a83b69b3.
We don't need the --test option any more now that we always run tests on a
(fake) system D-BUS.
|
|
Over the years we've moved all the quirks to the kernel (and fixed most of the
issues properly) so on Fedora we've not actually been shipping any rules in
pm-utils for a couple of releaes now.
Dropping this functionality allows us to finally drop the pm-utils dep for upower.
|
|
This is turned off by default. If this is not set, then any calls to Suspend(),
SuspendAllowed(), Hibernate() or HibernateAllowed() will fail with an error.
The error mesage tells the user what new method to port to in logind.
I'm expecting to set --enable-deprecated for Fedora 17 and 18, but turn it off
for Fedora 19, so other distributions probably want to follow suit to find out
what other stuff needs to be ported to the new APIs early. GNOME should already
be fine, but KDE will need some solid porting as I understand it.
See http://lists.freedesktop.org/archives/devkit-devel/2013-January/001339.html
for more information on future plans and for rationale.
|
|
When running under systemd, call into systemd for suspend and
hibernate instead of pm-utils. To capture resume events, install
a small script that gets executed by systemd after resume and
sends a dbus signal back to upower.
To make this work, the upower backends gain a new signal, ::resuming,
that they can optionally emit to signal that a resume happened.
Backends opt in to this by returning TRUE from up_backend_emits_resuming().
In this case, upower doesn't assume the sleep command to block until
resume, but instead waits for the ::resuming signal from the backend.
The only backend that uses this mechanism is the linux backend when
built with systemd support.
Signed-off-by: Richard Hughes <richard@hughsie.com>
|
|
Defaulting to true, it controls whether we want the powersave commands
to be run when running on battery/plugging ac.
Signed-off-by: Richard Hughes <richard@hughsie.com>
|
|
This allows session power managers to do different actions depending on whether the user
is suspending or hibernating. This allows the session policy agent to poke other things
(for instance, the screensaver) even if another process initiated the sleep.
This is based on a patch from Phillip Susi <psusi@cfl.rr.com>, many thanks.
|
|
Add a daemon option --test which will run upowerd on the session bus. This
allows us to run tests without interfering with the system instance. This also
avoids any root privileges entirely, which permits running integration tests as
part of a package build.
|
|
don't suspend at session start
|
|
|
|
We still need to add the DMI quirks, but I'm waiting for the
community to supply them now.
|
|
|
|
|
|
|
|
Do not send a D-BUS return message any more in up_polkit_is_allowed(), since
this makes it hard for callers to ensure that they return exactly one result to
the D-BUS caller. Instead, just pass a GError to the caller.
Update up_daemon_suspend_allowed() and up_daemon_hibernate_allowed()
accordingly, to always return either a result or an error.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
|
|
This reverts commit 1fc5aae71f474f82ba62c7a92be3aef05cc7ebef.
|
|
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
|
|
dbus_g_method_return_error() does not free or take ownership of the passed
GError, we need to free it ourselves.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
|
|
Checking for enough hibernation swap space at the daemon startup is not
sufficient, since both active memory as well as swap space change over time.
Now check whenever we receive a hibernate request or read the can-hibernate
property.
|
|
*brown paperbag*
|
|
Commmit fc7c6e003 had a thinko, UP_DAEMON_WATERLINE specifies (active
memory)/(available swap), not the other way around. So replace it with 99%
instead.
Also update the documentation of up_backend_get_used_swap() to explain what the
returned percentage actually means.
|
|
Native Linux suspend-to-disk does not use compression, and needs 2 KB of page
meta information for each MB of active memory. So bump the previous waterline
of 80% of active memory to 100.2%. Add an extra .05% to prevent rounding errors.
This should make the prediction whether hibernate is going to work very
accurate. However, it might prevent hibernate for folks who use an alternative
userspace solution like uswsusp which do support compression.
http://lists.freedesktop.org/archives/devkit-devel/2010-July/000867.html
|
|
specifics
|
|
|
|
This makes it possible to profile more accurately using systemtap
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hardcoding Linux specifics
|
|
|
|
specifics
|
|
Linux specifics
|
|
warnings
|
|
Add two D-Bus server methods to check whether the caller has the privilege to
suspend or hibernate.
This enables us to check for PK privileges in UpClient's
can_{suspend,hibernate} properties, so that clients like gnome-session or
gnome-power-manager hide the suspend/hibernate related actions if the admin or
OEM disabled suspend/hibernate through a PolicyKit .pkla file.
https://bugs.freedesktop.org/show_bug.cgi?id=26473
|
|
suspend and the resume event
Based on an idea from Matthew Garrett and Lennart Poettering
|
|
|
|
|
|
GObject generated names
|
|
org.freedesktop.upower
|
|
org.freedesktop.UPower
|
|
|
|
|