From: "Ludovic Courtès" <ludo@gnu.org>
To: 57490@debbugs.gnu.org
Subject: bug#57490: UPower ignores ‘critical-power-action’
Date: Tue, 30 Aug 2022 23:56:58 +0200 [thread overview]
Message-ID: <871qsxe6ol.fsf@gnu.org> (raw)
In-Reply-To: <87sflden8d.fsf@inria.fr> ("Ludovic Courtès"'s message of "Tue, 30 Aug 2022 17:59:30 +0200")
Ludovic Courtès <ludo@gnu.org> skribis:
> Looking at the code, it could be because the ‘CanHybridSleep’ method
> returns false, but why that would happen is unknown to me.
Indeed, if we run ‘dbus-monitor --system’ and
‘herd restart upower-daemon’ (in QEMU), we see this:
--8<---------------cut here---------------start------------->8---
method call time=1661890192.586471 sender=:1.40 -> destination=:1.39 serial=16 path=/org/freedesktop/UPower; interface=org.freedesktop.UPower; member=GetCriticalAction
method call time=1661890192.586862 sender=:1.39 -> destination=:1.1 serial=17 path=/org/freedesktop/login1; interface=org.freedesktop.login1.Manager; member=CanHybridSleep
method return time=1661890192.588676 sender=:1.1 -> destination=:1.39 serial=104 reply_serial=17
string "na"
method call time=1661890192.589034 sender=:1.39 -> destination=:1.1 serial=18 path=/org/freedesktop/login1; interface=org.freedesktop.login1.Manager; member=CanHibernate
method return time=1661890192.591082 sender=:1.1 -> destination=:1.39 serial=105 reply_serial=18
string "na"
method return time=1661890192.591405 sender=:1.39 -> destination=:1.40 serial=19 reply_serial=16
string "PowerOff"
--8<---------------cut here---------------end--------------->8---
That is, elogind returns “na” to the Can* methods.
Same story on my actual laptop:
--8<---------------cut here---------------start------------->8---
$ dbus-send --print-reply --system --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.CanHybridSleep
method return time=1661890748.184775 sender=:1.1 -> destination=:1.130 serial=253 reply_serial=2
string "na"
$ dbus-send --print-reply --system --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.CanHibernate
method return time=1661890756.999248 sender=:1.1 -> destination=:1.131 serial=254 reply_serial=2
string "na"
$ dbus-send --print-reply --system --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.CanPowerOff
method return time=1661890761.375007 sender=:1.1 -> destination=:1.132 serial=258 reply_serial=2
string "yes"
--8<---------------cut here---------------end--------------->8---
This is not surprising since our ‘logind.conf’ reads:
--8<---------------cut here---------------start------------->8---
HybridSleepState=disk
--8<---------------cut here---------------end--------------->8---
… meaning that “hybrid sleep” attempts to suspend-to-disk¹, something
that’s not implemented yet in Guix System².
Setting ‘hybrid-sleep-state’ to '("mem") doesn’t help though:
“CanHybridSleep” still returns “na”. I’m looking at ‘can_sleep_state’
in elogind without seeing why it doesn’t return true.
To be continued…
Ludo’.
¹ Per <https://man.voidlinux.org/logind.conf.5>.
² But it’s almost there! https://issues.guix.gnu.org/49475
next prev parent reply other threads:[~2022-08-30 21:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 15:59 bug#57490: UPower ignores ‘critical-power-action’ Ludovic Courtès
2022-08-30 16:22 ` Ludovic Courtès
2022-08-30 21:56 ` Ludovic Courtès [this message]
2022-08-31 14:46 ` Ludovic Courtès
2022-09-05 12:56 ` Ludovic Courtès
2022-09-05 20:01 ` Maxime Devos
2022-10-02 15:27 ` Ludovic Courtès
2022-09-20 10:05 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qsxe6ol.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=57490@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.