GNU bug report logs - #57490
UPower ignores ‘critical-power-action’

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Severity: important; Reported by: Ludovic Courtès <ludo@HIDDEN>; dated Tue, 30 Aug 2022 16:00:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 57490 <at> debbugs.gnu.org:


Received: (at 57490) by debbugs.gnu.org; 20 Sep 2022 10:06:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 20 06:06:02 2022
Received: from localhost ([127.0.0.1]:56110 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oaa8g-00043S-6k
	for submit <at> debbugs.gnu.org; Tue, 20 Sep 2022 06:06:02 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35520)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1oaa8d-00042x-PA
 for 57490 <at> debbugs.gnu.org; Tue, 20 Sep 2022 06:06:00 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45174)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oaa8Y-0007jX-JK
 for 57490 <at> debbugs.gnu.org; Tue, 20 Sep 2022 06:05:54 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=sPgT1vtVPytJqGVyubhF5q8zt36ehlFPhr6rB+dpOd0=; b=GI2E+8wSwUxdEakxB36O
 Q3Nz3syOCC3w05XdIShrb+hcGuVYclotnp19Ik479fH0HiEbAE3al1rBR02K0TZKy9PGmP3pCMuhp
 oOo2FIUJ1eA5KtnUshsAZYpTwTvZXhFjCJOApYaA6vMSaG7AIXxJDV/hLaXjb91/UJvKiVEYYGSS4
 PVud+YffLpTGj+4SQ6ooQ6ya4fkk4Uf8zkibez+kx3t7Dzz+qJgFkLlzshH2R3rzj5s3HI2kGfugo
 sKt7EcMObciva6wCYCF0+Qj69zCbyWmxcQcKdmrLQpwAeqGBHUsTV52JE2Eo8tpkLex4wdIcQokpT
 WE83GRK0EOWlRg==;
Received: from [193.50.110.164] (port=48704 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oaa7t-0003Tc-Dk
 for 57490 <at> debbugs.gnu.org; Tue, 20 Sep 2022 06:05:31 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 57490 <at> debbugs.gnu.org
Subject: Re: bug#57490: UPower ignores =?utf-8?Q?=E2=80=98critical-power-a?=
 =?utf-8?Q?ction=E2=80=99?=
References: <87sflden8d.fsf@HIDDEN> <871qsxe6ol.fsf@HIDDEN>
 <87wnaoa2tv.fsf@HIDDEN> <87bkru3rq3.fsf@HIDDEN>
Date: Tue, 20 Sep 2022 12:05:06 +0200
In-Reply-To: <87bkru3rq3.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Mon, 05 Sep 2022 14:56:04 +0200")
Message-ID: <875yhipdil.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 57490
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> I pushed these patches:
>
>   eedf71f948 * services: upower: Default to a percentage-based policy.
>   4765242540 * services: upower: Update default percentage values.
>
> I=E2=80=99m not sure whether they help, but they might: using a
> time-estimate-based policy is documented as less reliable, and I suppose
> even less so when a battery gets old, as is the case on this laptop.

As those at the Ten Years of Guix event noticed, this didn=E2=80=99t help a=
t all.

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#57490; Package guix. Full text available.

Message received at 57490 <at> debbugs.gnu.org:


Received: (at 57490) by debbugs.gnu.org; 5 Sep 2022 20:01:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 05 16:01:06 2022
Received: from localhost ([127.0.0.1]:49030 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oVIHK-0000zV-GJ
	for submit <at> debbugs.gnu.org; Mon, 05 Sep 2022 16:01:06 -0400
Received: from laurent.telenet-ops.be ([195.130.137.89]:42854)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1oVIHJ-0000zO-FY
 for 57490 <at> debbugs.gnu.org; Mon, 05 Sep 2022 16:01:06 -0400
Received: from [IPV6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]
 ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16])
 by laurent.telenet-ops.be with bizsmtp
 id GL112800320ykKC01L11Kv; Mon, 05 Sep 2022 22:01:04 +0200
Message-ID: <16fe99ab-4fa2-bcb1-e70b-b52bbc70c7f5@HIDDEN>
Date: Mon, 5 Sep 2022 22:01:01 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.12.0
Subject: =?UTF-8?Q?Re=3a_bug=2357490=3a_UPower_ignores_=e2=80=98critical-pow?=
 =?UTF-8?B?ZXItYWN0aW9u4oCZ?=
Content-Language: en-US
To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= <ludo@HIDDEN>, 57490 <at> debbugs.gnu.org
References: <87sflden8d.fsf@HIDDEN> <871qsxe6ol.fsf@HIDDEN>
 <87wnaoa2tv.fsf@HIDDEN> <87bkru3rq3.fsf@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
In-Reply-To: <87bkru3rq3.fsf@HIDDEN>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="------------0zjIU9qZO6Ine37agXEkAonk"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1662408064; bh=c6CJksVEHJbuMnqVvtywnVCzCKoQk/C10KrIO/0bmgQ=;
 h=Date:Subject:To:References:From:In-Reply-To;
 b=JzgGsSw4iFD/DrxXif/9R2EfcoaYDCTsNn4I5tNXzZ2v+i6zeOkLkA8LJZ42dU6EY
 Qb9wRVSBLehRzVVXq/KLbCErjkAr+oU1ie4PNgvk08c96VUykbzf85tpOXjLlDdWJm
 7fk1hX9JuShd+E4MNGm5t5U+uXdg2f6sx+aLLDsHUqQSIN1EPSom6XCD56m1G2/rby
 MU0hq2BayGCtInDKlE+BSe/zm6savBuovBhC7fZ6XSkx11qcWq1j5AFVlMWWEGnPrH
 RaTGHAIMIOfQxdxoZIbTrw/L6sHRpFiD+iu94RThccgHbK7irqYPfc1KbDwHJaTCwG
 pzFNkj3uSTsvA==
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 57490
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--------------0zjIU9qZO6Ine37agXEkAonk
Content-Type: multipart/mixed; boundary="------------NZX4KkEfGcHnlJN2RrlDctd2";
 protected-headers="v1"
From: Maxime Devos <maximedevos@HIDDEN>
To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= <ludo@HIDDEN>, 57490 <at> debbugs.gnu.org
Message-ID: <16fe99ab-4fa2-bcb1-e70b-b52bbc70c7f5@HIDDEN>
Subject: =?UTF-8?Q?Re=3a_bug=2357490=3a_UPower_ignores_=e2=80=98critical-pow?=
 =?UTF-8?B?ZXItYWN0aW9u4oCZ?=
References: <87sflden8d.fsf@HIDDEN> <871qsxe6ol.fsf@HIDDEN>
 <87wnaoa2tv.fsf@HIDDEN> <87bkru3rq3.fsf@HIDDEN>
In-Reply-To: <87bkru3rq3.fsf@HIDDEN>

--------------NZX4KkEfGcHnlJN2RrlDctd2
Content-Type: multipart/mixed; boundary="------------k6NfaYbalrDu0iHQNjSiILCc"

--------------k6NfaYbalrDu0iHQNjSiILCc
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64

DQpPbiAwNS0wOS0yMDIyIDE0OjU2LCBMdWRvdmljIENvdXJ0w6hzIHdyb3RlOg0KPiBJ4oCZ
ZCBsaWtlIHRvIHRlc3Qgd2hldGhlciBVUG93ZXIgaW52b2tlcyB0aGUgaW50ZW5kZWQgY3Jp
dGljYWwgYWN0aW9uLA0KPiBidXQgSeKAmW0gbm90IHN1cmUgaG93IHRvIHNpbXVsYXRlIGEg
bG93IGJhdHRlcnkgbGV2ZWwuICBUaG91Z2h0cz8NCg0KSSd2ZSBmb3VuZCBhICdWaXJ0dWFs
IEJhdHRlcnkgRHJpdmVyJzogaHR0cHM6Ly9sd24ubmV0L0FydGljbGVzLzQ0MDA5Ny8NCg0K
VGhlIGdtYW5lIGxpbmtzIGFyZSBkZWFkLCBidXQgdGhlIGxpbnV4IHNvdXJjZSB0cmVlIGFz
IGEgDQpkcml2ZXJzL3Bvd2VyL3N1cHBseS90ZXN0X3Bvd2VyLmMgdGhhdCBzZWVtcyB0byBi
ZSBhYm91dCB0aGUgc2FtZSB0aGluZy4NCg0KR3JlZXRpbmdzLA0KTWF4aW1lLg0KDQo=
--------------k6NfaYbalrDu0iHQNjSiILCc
Content-Type: application/pgp-keys; name="OpenPGP_0x49E3EE22191725EE.asc"
Content-Disposition: attachment; filename="OpenPGP_0x49E3EE22191725EE.asc"
Content-Description: OpenPGP public key
Content-Transfer-Encoding: quoted-printable

-----BEGIN PGP PUBLIC KEY BLOCK-----

xjMEX4ch6BYJKwYBBAHaRw8BAQdANPb/d6MrGnGi5HyvODCkBUJPRjiFQcRU5V+m
xvMaAa/NL01heGltZSBEZXZvcyA8bWF4aW1lLmRldm9zQHN0dWRlbnQua3VsZXV2
ZW4uYmU+wpAEExYIADgWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCX4ch6AIbAwUL
CQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRBJ4+4iGRcl7japAQC3opZ2KGWzWmRc
/gIWSu0AAcfMwyinFEEPa/QhUt2CogD/e2RdF4CYAgaRHJJmZ9WU7piKbLZ7llB4
LzgezVDHggzNJU1heGltZSBEZXZvcyA8bWF4aW1lZGV2b3NAdGVsZW5ldC5iZT7C
kAQTFggAOBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJf56ycAhsDBQsJCAcDBRUK
CQgLBRYCAwEAAh4BAheAAAoJEEnj7iIZFyXujpQBAKV1SwDDl4f24rXciDlB9L8W
ycZt30CgbewMSRQk4mvbAP9dFMbVVixYBd6C8cfhR+NsOBGiOJnQABlUmgNuqGFJ
Dc44BF+HIegSCisGAQQBl1UBBQEBB0BOlzIWiJzgobMF6/cqwLaLk7jIcFSZ++c0
k9cCNT6YXwMBCAfCeAQYFggAIBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJfhyHo
AhsMAAoJEEnj7iIZFyXuMr0BAJc8cl5PGvVmVuSQVKjleNl4DK1/XAaPAYPe34AE
fZJPAP9IqLCQhH/FeJanHqBP8gNdGNI2qn8RnnLVfRJgUjZ1BA=3D=3D
=3DOVqp
-----END PGP PUBLIC KEY BLOCK-----

--------------k6NfaYbalrDu0iHQNjSiILCc--

--------------NZX4KkEfGcHnlJN2RrlDctd2--

--------------0zjIU9qZO6Ine37agXEkAonk
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wnsEABYIACMWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYxZVfQUDAAAAAAAKCRBJ4+4iGRcl7jq0
AP9F3R2EOeyj9OjZwnUeD9J/ehJlOg+ta3qGcIY4YD8fmgEArtdabRdS3Lq5TbP80rsbGYdUkViD
OcQNb4ZaqjUzngk=
=tbxA
-----END PGP SIGNATURE-----

--------------0zjIU9qZO6Ine37agXEkAonk--




Information forwarded to bug-guix@HIDDEN:
bug#57490; Package guix. Full text available.

Message received at 57490 <at> debbugs.gnu.org:


Received: (at 57490) by debbugs.gnu.org; 5 Sep 2022 12:56:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 05 08:56:34 2022
Received: from localhost ([127.0.0.1]:46774 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oVBeP-0008CM-Un
	for submit <at> debbugs.gnu.org; Mon, 05 Sep 2022 08:56:34 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51754)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1oVBeD-0008Bt-58
 for 57490 <at> debbugs.gnu.org; Mon, 05 Sep 2022 08:56:28 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51558)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oVBe7-0001Yw-ST
 for 57490 <at> debbugs.gnu.org; Mon, 05 Sep 2022 08:56:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=y9jXOBdJboUXHUtBIzj4b1oQu1BJ/wMzjUUmrHRb0V4=; b=R992chnuetohu1Oe4off
 YVG9vr9o/XXfPiIb4UIlo6YxJbwcaEelGX36XWHaG0Cu/qEzi3lRldToyZ86w532J++toZGgUAxGn
 TOVnRXf+ieb1CYvceZ0SJMwmsaD4aRE7+rtIQ5C3p68pOTXgLSxm2Kk53HuBGo0ncrBrPG3BFnrsJ
 yIz+LRYmhiuHwzrl035B9zZ/aBDjAUV8w188O6I9evStzjvbPGIyS6qagfB07DOjGospVyNd3y7NN
 Y4rBER5PXX57XGOiVZSdQ3uAdlggG3YGGu3YJXoe8P5+JzWS9JDMQTAcywy+XQ23/FHDhqwsEzlku
 ltT1fD6ZGwU5Rw==;
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=41720 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oVBe2-00059O-P8
 for 57490 <at> debbugs.gnu.org; Mon, 05 Sep 2022 08:56:10 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 57490 <at> debbugs.gnu.org
Subject: Re: bug#57490: UPower ignores =?utf-8?Q?=E2=80=98critical-power-a?=
 =?utf-8?Q?ction=E2=80=99?=
References: <87sflden8d.fsf@HIDDEN> <871qsxe6ol.fsf@HIDDEN>
 <87wnaoa2tv.fsf@HIDDEN>
Date: Mon, 05 Sep 2022 14:56:04 +0200
In-Reply-To: <87wnaoa2tv.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Wed, 31 Aug 2022 16:46:04 +0200")
Message-ID: <87bkru3rq3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 57490
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> One issue remains: UPower should have called elogind=E2=80=99s =E2=80=9CP=
owerOff=E2=80=9D method
> for ordered shutdown before total power outage, but either that didn=E2=
=80=99t
> happen or elogind didn=E2=80=99t do it right (which is weird, because =E2=
=80=98loginctl
> poweroff=E2=80=99 DTRT.)

I pushed these patches:

  eedf71f948 * services: upower: Default to a percentage-based policy.
  4765242540 * services: upower: Update default percentage values.

I=E2=80=99m not sure whether they help, but they might: using a
time-estimate-based policy is documented as less reliable, and I suppose
even less so when a battery gets old, as is the case on this laptop.

I=E2=80=99d like to test whether UPower invokes the intended critical actio=
n,
but I=E2=80=99m not sure how to simulate a low battery level.  Thoughts?

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#57490; Package guix. Full text available.

Message received at 57490 <at> debbugs.gnu.org:


Received: (at 57490) by debbugs.gnu.org; 31 Aug 2022 14:46:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 31 10:46:15 2022
Received: from localhost ([127.0.0.1]:40130 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oTOyt-0004y9-Ah
	for submit <at> debbugs.gnu.org; Wed, 31 Aug 2022 10:46:15 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36198)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1oTOyr-0004xw-90
 for 57490 <at> debbugs.gnu.org; Wed, 31 Aug 2022 10:46:13 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47710)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oTOym-0006qm-1k
 for 57490 <at> debbugs.gnu.org; Wed, 31 Aug 2022 10:46:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=XEoEhPEBBVevIoopXQ2CCMOLydCzH431WIHn4jZIHlg=; b=eO4JVmvG8ZUFTaqehWTx
 2MlAbNglTpa4WgBgMSB3pSdT5SQ2ZzJrcY/367S5mYvYSG8614rAZn0NCt9X6jkle9c5r7sAoFi9A
 STDehTA+52LI5R7fjXuQrE2iuYJUAEoWijLyv2vBm1GGgrmSnMdX7HAyBzyL5iLaQnP/GAEB6Xwun
 wfRTEgtJC6du2555gyj6OCHyCROdc2nEvJqmsB/HNKGFqtqY2ajHuI0De1ykRWv9P8MEv6w8N0G5J
 FfC/l/J+uflo72yuNdq9A9y/LGfd0J/Q8kWH+ELSUsQlxfJpSG9fJt+If1clZlZ6GpORHSvUiD/dG
 V4J9M0tTA1twiA==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51088
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oTOyk-00018w-KN
 for 57490 <at> debbugs.gnu.org; Wed, 31 Aug 2022 10:46:07 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 57490 <at> debbugs.gnu.org
Subject: Re: bug#57490: UPower ignores =?utf-8?Q?=E2=80=98critical-power-a?=
 =?utf-8?Q?ction=E2=80=99?=
References: <87sflden8d.fsf@HIDDEN> <871qsxe6ol.fsf@HIDDEN>
Date: Wed, 31 Aug 2022 16:46:04 +0200
In-Reply-To: <871qsxe6ol.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Tue, 30 Aug 2022 23:56:58 +0200")
Message-ID: <87wnaoa2tv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 57490
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> Setting =E2=80=98hybrid-sleep-state=E2=80=99 to '("mem") doesn=E2=80=99t =
help though:
> =E2=80=9CCanHybridSleep=E2=80=9D still returns =E2=80=9Cna=E2=80=9D.  I=
=E2=80=99m looking at =E2=80=98can_sleep_state=E2=80=99
> in elogind without seeing why it doesn=E2=80=99t return true.

Having changed elogind=E2=80=99s =E2=80=9CLogLevel=E2=80=9D to =E2=80=9Cdeb=
ug=E2=80=9D with a 1km-long
=E2=80=98dbus-send=E2=80=99 command I=E2=80=99ll spare you, I got this in /=
var/log/debug for my
=E2=80=9CCanHybridSleep=E2=80=9D method call (in QEMU):

--8<---------------cut here---------------start------------->8---
Aug 31 16:01:07 localhost elogind[183]: Got message type=3Dmethod_call send=
er=3D:1.78 destination=3Dorg.freedesktop.login1 path=3D/org/freedesktop/log=
in1 interface=3Dorg.freedesktop.login1.Manager member=3DCanHybridSleep cook=
ie=3D2 reply_cookie=3D0 signature=3Dn/a error-name=3Dn/a error-message=3Dn/a
Aug 31 16:01:07 localhost elogind[183]: Sleep mode "mem" is supported by th=
e kernel.
Aug 31 16:01:07 localhost elogind[183]: No possible swap partitions or file=
s suitable for hibernation were found in /proc/swaps.
Aug 31 16:01:07 localhost elogind[183]: Sent message type=3Dmethod_return s=
ender=3Dn/a destination=3D:1.78 path=3Dn/a interface=3Dn/a member=3Dn/a coo=
kie=3D190 reply_cookie=3D2 signature=3Ds error-name=3Dn/a error-message=3Dn=
/a
--8<---------------cut here---------------end--------------->8---

Closer inspection of the code confirms what we can guess from the above:
if swap space is missing, =E2=80=98can_sleep=E2=80=99 returns false, even i=
f the chosen
sleep state is =E2=80=9Cmem=E2=80=9D:

--8<---------------cut here---------------start------------->8---
static int can_sleep_internal(const char *verb, bool check_allowed, const S=
leepConfig *sleep_config) {
        bool allow;
        char **modes =3D NULL, **states =3D NULL;
        int r;

        assert(STR_IN_SET(verb, "suspend", "hibernate", "hybrid-sleep", "su=
spend-then-hibernate"));

[...]

#if 0 /// elogind supports setting a suspend mode
        if (!can_sleep_state(states) || !can_sleep_disk(modes))
                return false;
#else // 0
        if (!can_sleep_state(states) ||
            !((strcmp("suspend", verb) && can_sleep_disk(modes)) ||
              (streq("suspend", verb) && can_sleep_mem(modes))))
                return false;
#endif // 0

        if (streq(verb, "suspend"))
                return true;

        if (!enough_swap_for_hibernation())
                return -ENOSPC;

        return true;
}
--8<---------------cut here---------------end--------------->8---

(Specifically, =E2=80=98enough_swap_for_hibernation=E2=80=99 returns false =
when there=E2=80=99s
no space space.)

The caller:

--8<---------------cut here---------------start------------->8---
static int method_can_shutdown_or_sleep(
                Manager *m,
                sd_bus_message *message,
                InhibitWhat w,
                const char *action,
                const char *action_multiple_sessions,
                const char *action_ignore_inhibit,
                const char *sleep_verb,
                sd_bus_error *error) {

[...]

        if (sleep_verb) {
#if 0 /// elogind needs to have the manager being passed
                r =3D can_sleep(sleep_verb);
#else // 0
                r =3D can_sleep(m, sleep_verb);
#endif // 0
                if (IN_SET(r,  0, -ENOSPC))
                        return sd_bus_reply_method_return(message, "s", "na=
");
                if (r < 0)
                        return r;
        }
--8<---------------cut here---------------end--------------->8---

I find it a bit ridiculous: if we=E2=80=99re choosing =E2=80=9Cmem=E2=80=9D=
, then we shouldn=E2=80=99t
need to check for swap space.

However, given how =E2=80=98hybrid-sleep=E2=80=99 is documented=C2=B9, it=
=E2=80=99s not meant to be
implemented by suspend-to-RAM:

  A low-power state where execution of the OS is paused, which might be
  slow to enter, and on complete power loss does not result in lost data
  but might be slower to exit in that case. This mode is called
  suspend-to-both by the kernel.

So, as a conclusion, it would seem that everything here is working as
advertised: no swap, no hybrid-sleep.  (We should probably document that
in the manual.)


One issue remains: UPower should have called elogind=E2=80=99s =E2=80=9CPow=
erOff=E2=80=9D method
for ordered shutdown before total power outage, but either that didn=E2=80=
=99t
happen or elogind didn=E2=80=99t do it right (which is weird, because =E2=
=80=98loginctl
poweroff=E2=80=99 DTRT.)

Thoughts?

Ludo=E2=80=99.

=C2=B9 https://man.voidlinux.org/logind.conf.5




Information forwarded to bug-guix@HIDDEN:
bug#57490; Package guix. Full text available.

Message received at 57490 <at> debbugs.gnu.org:


Received: (at 57490) by debbugs.gnu.org; 30 Aug 2022 21:57:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 30 17:57:12 2022
Received: from localhost ([127.0.0.1]:37660 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oT9EO-0001Ji-DS
	for submit <at> debbugs.gnu.org; Tue, 30 Aug 2022 17:57:12 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45642)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1oT9EI-0001JR-UD
 for 57490 <at> debbugs.gnu.org; Tue, 30 Aug 2022 17:57:09 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41664)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oT9ED-0002bB-Nn
 for 57490 <at> debbugs.gnu.org; Tue, 30 Aug 2022 17:57:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=74sU9UlTsBA6k1JmnsB1Xzf9nC4f10FvQQti4ubDBmM=; b=gF+a3sheHt9Bv+1Q7mPT
 sIL2rYSST+APKyTIPm16SYCI7qCCjWFTFDJAdFs2/w/rRAliBZxAdxxsgrQkU8kuPEA2F736FkBUB
 G3uycPRMqkvmeA28nAIlb19bxmPxP0vRl14yGQ3oCyC3MKFZwsqoNtAx6hbnXzrt4Bfjq3Upu9jMG
 0PePpStVPwC75MJTxiiLtn968QKba7/Ft9ONqfpmFhKPO3I5BRHq3vXZpZZOZygi1Nytmew79h0vw
 I5jJcLdmi+/IBHtAZBo/lvOKIJsu/7d+uq+81JboMEheyKbfFIIIyU5BlzYxSNSx9uIeExmEDgOFX
 /Kv1J16TUZ8Oww==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:52625
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oT9ED-0004nF-4O
 for 57490 <at> debbugs.gnu.org; Tue, 30 Aug 2022 17:57:01 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 57490 <at> debbugs.gnu.org
Subject: Re: bug#57490: UPower ignores =?utf-8?Q?=E2=80=98critical-power-a?=
 =?utf-8?Q?ction=E2=80=99?=
References: <87sflden8d.fsf@HIDDEN>
Date: Tue, 30 Aug 2022 23:56:58 +0200
In-Reply-To: <87sflden8d.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22?=
 =?utf-8?Q?'s?= message of "Tue, 30 Aug 2022 17:59:30 +0200")
Message-ID: <871qsxe6ol.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 57490
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> Looking at the code, it could be because the =E2=80=98CanHybridSleep=E2=
=80=99 method
> returns false, but why that would happen is unknown to me.

Indeed, if we run =E2=80=98dbus-monitor --system=E2=80=99 and
=E2=80=98herd restart upower-daemon=E2=80=99 (in QEMU), we see this:

--8<---------------cut here---------------start------------->8---
method call time=3D1661890192.586471 sender=3D:1.40 -> destination=3D:1.39 =
serial=3D16 path=3D/org/freedesktop/UPower; interface=3Dorg.freedesktop.UPo=
wer; member=3DGetCriticalAction
method call time=3D1661890192.586862 sender=3D:1.39 -> destination=3D:1.1 s=
erial=3D17 path=3D/org/freedesktop/login1; interface=3Dorg.freedesktop.logi=
n1.Manager; member=3DCanHybridSleep
method return time=3D1661890192.588676 sender=3D:1.1 -> destination=3D:1.39=
 serial=3D104 reply_serial=3D17
   string "na"
method call time=3D1661890192.589034 sender=3D:1.39 -> destination=3D:1.1 s=
erial=3D18 path=3D/org/freedesktop/login1; interface=3Dorg.freedesktop.logi=
n1.Manager; member=3DCanHibernate
method return time=3D1661890192.591082 sender=3D:1.1 -> destination=3D:1.39=
 serial=3D105 reply_serial=3D18
   string "na"
method return time=3D1661890192.591405 sender=3D:1.39 -> destination=3D:1.4=
0 serial=3D19 reply_serial=3D16
   string "PowerOff"
--8<---------------cut here---------------end--------------->8---

That is, elogind returns =E2=80=9Cna=E2=80=9D to the Can* methods.

Same story on my actual laptop:

--8<---------------cut here---------------start------------->8---
$ dbus-send --print-reply --system --dest=3Dorg.freedesktop.login1 /org/fre=
edesktop/login1 org.freedesktop.login1.Manager.CanHybridSleep
method return time=3D1661890748.184775 sender=3D:1.1 -> destination=3D:1.13=
0 serial=3D253 reply_serial=3D2
   string "na"
$ dbus-send --print-reply --system --dest=3Dorg.freedesktop.login1 /org/fre=
edesktop/login1 org.freedesktop.login1.Manager.CanHibernate
method return time=3D1661890756.999248 sender=3D:1.1 -> destination=3D:1.13=
1 serial=3D254 reply_serial=3D2
   string "na"
$ dbus-send --print-reply --system --dest=3Dorg.freedesktop.login1 /org/fre=
edesktop/login1 org.freedesktop.login1.Manager.CanPowerOff
method return time=3D1661890761.375007 sender=3D:1.1 -> destination=3D:1.13=
2 serial=3D258 reply_serial=3D2
   string "yes"
--8<---------------cut here---------------end--------------->8---

This is not surprising since our =E2=80=98logind.conf=E2=80=99 reads:

--8<---------------cut here---------------start------------->8---
HybridSleepState=3Ddisk
--8<---------------cut here---------------end--------------->8---

=E2=80=A6 meaning that =E2=80=9Chybrid sleep=E2=80=9D attempts to suspend-t=
o-disk=C2=B9, something
that=E2=80=99s not implemented yet in Guix System=C2=B2.

Setting =E2=80=98hybrid-sleep-state=E2=80=99 to '("mem") doesn=E2=80=99t he=
lp though:
=E2=80=9CCanHybridSleep=E2=80=9D still returns =E2=80=9Cna=E2=80=9D.  I=E2=
=80=99m looking at =E2=80=98can_sleep_state=E2=80=99
in elogind without seeing why it doesn=E2=80=99t return true.

To be continued=E2=80=A6

Ludo=E2=80=99.

=C2=B9 Per <https://man.voidlinux.org/logind.conf.5>.
=C2=B2 But it=E2=80=99s almost there! https://issues.guix.gnu.org/49475




Information forwarded to bug-guix@HIDDEN:
bug#57490; Package guix. Full text available.

Message received at 57490 <at> debbugs.gnu.org:


Received: (at 57490) by debbugs.gnu.org; 30 Aug 2022 16:22:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 30 12:22:44 2022
Received: from localhost ([127.0.0.1]:37273 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oT40h-0005HP-Sk
	for submit <at> debbugs.gnu.org; Tue, 30 Aug 2022 12:22:44 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36262)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1oT40O-0005GZ-E5
 for 57490 <at> debbugs.gnu.org; Tue, 30 Aug 2022 12:22:24 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40094)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oT40J-0002oN-6P
 for 57490 <at> debbugs.gnu.org; Tue, 30 Aug 2022 12:22:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=rqHAtl2VroAffeYFE7cgJCxHHq+s8pI3pi6taMV0bM8=; b=KDpqYv/Bd+4tuYl+qZb3
 9vDJDKNrdM/L/DPPNs+dKKRKbmyfCn8Mcehsk+hHHK8EHCFQQpOAOUO1g7/msm3ivSzC4GWwIcKd4
 eaz8MtUiMzUVFmHrdS/PN2rzBqAsE/KryBJGxJeuw9GJaImcZKefub7stqywXvAnS0csHWCOFZs4V
 jR5MX5jqtYPaq83EnLDjfuxrJWVjOANNiICjs8YMHVKlZW5qCGVVqoDpvKOC6mqkIcYKyDXCIdwwV
 wvm9yIu6+8EtIp71Fk6p5cE3VOhu9kaxPDLZz4lbWLbHxqsekaTLVCu9lrGCuJUyC/Y8TZNDvPyUD
 uEvQ+IaXSAMVMw==;
Received: from [193.50.111.124] (port=55436 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oT40I-0000RF-Oi
 for 57490 <at> debbugs.gnu.org; Tue, 30 Aug 2022 12:22:18 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 57490 <at> debbugs.gnu.org
Subject: Re: bug#57490: UPower ignores =?utf-8?Q?=E2=80=98critical-power-a?=
 =?utf-8?Q?ction=E2=80=99?=
References: <87sflden8d.fsf@HIDDEN>
Date: Tue, 30 Aug 2022 18:22:17 +0200
In-Reply-To: <87sflden8d.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22?=
 =?utf-8?Q?'s?= message of "Tue, 30 Aug 2022 17:59:30 +0200")
Message-ID: <87mtblem6e.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 57490
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> As discussed on IRC with Tobias, UPower appears to ignore our
> =E2=80=98critical-power-action=E2=80=99 setting.  On my machine, I left t=
he default
> (=E2=80=98HybridSleep=E2=80=99) but upowerd dismisses it and chooses =E2=
=80=98PowerOff=E2=80=99:

Furthermore, powering off is actually ungraceful: =E2=80=98halt=E2=80=99 wa=
sn=E2=80=99t invoked;
the machine just stopped abruptly, fsck was needed on reboot, etc.

The =E2=80=9CPowerOff=E2=80=9D DBus method is implemented by elogind, so th=
ere could be
another bug there.

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#57490; Package guix. Full text available.
Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 Aug 2022 15:59:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 30 11:59:37 2022
Received: from localhost ([127.0.0.1]:37195 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oT3eL-0004cr-9U
	for submit <at> debbugs.gnu.org; Tue, 30 Aug 2022 11:59:37 -0400
Received: from lists.gnu.org ([209.51.188.17]:52208)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1oT3eI-0004cg-3t
 for submit <at> debbugs.gnu.org; Tue, 30 Aug 2022 11:59:36 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35180)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oT3eH-0002MM-Tr
 for bug-guix@HIDDEN; Tue, 30 Aug 2022 11:59:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52384)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oT3eH-0006uI-Lc
 for bug-guix@HIDDEN; Tue, 30 Aug 2022 11:59:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to:
 references; bh=T299uBI2Y2HVuWxW6lovnKIRbtwnwGTXCmWtqwFkqHk=; b=mlHe3Dd0ggZjnm
 nts61N1gqS/9omuQF1vXDucq5p+GSoRkbg7zC0aySoOEsIHNU7UJF4Hvp1KNjlBDnWS9B2GCsdXje
 qr2S/PhSP6NIauy7TnnKOFTdOMa+/ww4XF2pK1kn5ksMjD2vWYf7m6dDsljgIMMEVZnGdTyoT67ZZ
 1/DQpov6YC0RXFj7YiyTZcRa+kefAedqDCaFZRZ/orRgQYyMMHknWhlLJbfJCCqe304FN9Ss9f7RH
 bu9scyKqOEgG7XEPmDPwPTBNSAq+POGEIZpdJvf4Qp9UxJ8afKJms7aIjjUdl+q+smn3F7VZPPD6t
 qo/5yfB6qsQYClQFY3YA==;
Received: from [193.50.111.124] (port=51214 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1oT3eG-0007kk-N2
 for bug-guix@HIDDEN; Tue, 30 Aug 2022 11:59:33 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: bug-guix@HIDDEN
Subject: UPower ignores =?utf-8?Q?=E2=80=98critical-power-action=E2=80=99?=
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Tridi 13 Fructidor an 230 de la =?utf-8?Q?R=C3=A9vol?=
 =?utf-8?Q?ution=2C?= jour de
 =?utf-8?Q?l'=C3=89pine-vinette?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Tue, 30 Aug 2022 17:59:30 +0200
Message-ID: <87sflden8d.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

As discussed on IRC with Tobias, UPower appears to ignore our
=E2=80=98critical-power-action=E2=80=99 setting.  On my machine, I left the=
 default
(=E2=80=98HybridSleep=E2=80=99) but upowerd dismisses it and chooses =E2=80=
=98PowerOff=E2=80=99:

--8<---------------cut here---------------start------------->8---
$ guix system describe
Generation 198  Aug 29 2022 00:47:53    (current)
  file name: /var/guix/profiles/system-198-link
  canonical file name: /gnu/store/85441w3nzqv8lg04gm7601wi9np4qlw7-system
  label: GNU with Linux-Libre 5.18.19
  bootloader: grub-efi
  root device: label: "root"
  kernel: /gnu/store/a43ai5qi4vbgm2zywg4b60y71d7whccn-linux-libre-5.18.19/b=
zImage
  channels:
    guix:
      repository URL: https://git.savannah.gnu.org/git/guix.git
      branch: master
      commit: 3294fa2ba451c7d5ef42a5d9fac780877f364bc7
  configuration file: /gnu/store/lmqb5d0il8zydd0p0vz4kviaq1qg4n9m-configura=
tion.scm
$ upower -d | tail -6
Daemon:
  daemon-version:  0.99.15
  on-battery:      no
  lid-is-closed:   no
  lid-is-present:  yes
  critical-action: PowerOff
$ sudo herd status upower-daemon=20
Status of upower-daemon:
  It is started.
  Running value is 338.
  It is enabled.
  Provides (upower-daemon).
  Requires (dbus-system udev).
  Conflicts with ().
  Will be respawned.
$ sudo cat /proc/338/environ |xargs -0
PWD=3D/ UPOWER_CONF_FILE_NAME=3D/gnu/store/yq6zf8q2l2axy03d99pami3sxrk4784y=
-UPower.conf SHLVL=3D0 XDG_DATA_DIRS=3D/gnu/store/bnsf9il448hl5xjavbhq3rcx3=
55svz2v-glib-2.70.2/share
$ cat /gnu/store/yq6zf8q2l2axy03d99pami3sxrk4784y-UPower.conf |grep Critical
PercentageCritical=3D3
TimeCritical=3D300
CriticalPowerAction=3DHybridSleep
--8<---------------cut here---------------end--------------->8---

Looking at the code, it could be because the =E2=80=98CanHybridSleep=E2=80=
=99 method
returns false, but why that would happen is unknown to me.

Thoughts?

Ludo=E2=80=99.




Acknowledgement sent to Ludovic Courtès <ludo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#57490; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 20 Sep 2022 10:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.