[systemd-devel] pm-utils quirks

Colin Guthrie gmane at colin.guthr.ie
Mon Oct 22 15:47:19 PDT 2012


Hi,

'Twas brillig, and Lennart Poettering at 22/10/12 15:28 did gyre and gimble:
>> Might have been covered elsewhere in some docs but is there any info on
>> how to plan for a post-pm-utils world?
> 
> Not really, the interesting bits of pm-utils are done by systemd in C
> code directly. pm-utils doesn't really have any purpose anymore and
> upower can defer to systemd's logind instead.

A colleague did some poking and pointed out the following issue:

upower 0.9.18 still requires pm-utils for some features:

- up_backend_supports_sleep_state (src/linux/up-backend.c line 360)
calls /usr/bin/pm-is-supported to determine if suspend or hibernate are
available on the system. upower uses this to reply to dbus call on
org.freedesktop.UPower.CanSuspend or .CanHibernate.
Without pm-utils, org.freedesktop.UPower.CanSuspend or .CanHibernate
always return false.
At startup, KDE asks org.freedesktop.UPower.CanSuspend and .CanHibernate
to know if, respectively, suspend and hibernate are possible on the
system. So, without pm-utils installed, suspend and hibernate entries
are not available in KDE's menus and applets (it's needed to reboot
after the removal of pm-utils).

So, should the org.freedesktop.UPower.CanSuspend/Hibernate properties be
cooked up instead to logind rather than shelling out to pm-is-supported?

>> pm-utils had several quirks (many of which are likely obsolete - for me
>> the vt switching stuff which is apparently quirked on my h/w makes
>> suspend/resume uglier and gives no benefit), but with a switch to
>> systemd for suspend all these quirks obviously no longer apply.
> 
> According to the X driver folks the quirks are entirey unnecessary these
> days, and if there indeed is something left over then it should be fixed
> in the drivers, not in userspace quirks. We only did the in-systemd
> suspending after ensuring that the quirks are entirely unnecessary now.

Nice to know, thanks.


>> So the question is, what should be done about it?
> 
> Nothing, really. Just don't pull it in anymore.

As well as the above problem, my colleague also pointed out:

- up_backend_get_powersave_command (src/linux/up-backend.c line 615)
calls /usr/sbin/pm-powersave to apply powersave's adjustments.

So what is the systemd blessed way of doing this?

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/



More information about the systemd-devel mailing list