From unknown Sat Jul 12 02:31:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57490: UPower ignores =?UTF-8?Q?=E2=80=98critical-power-action=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 30 Aug 2022 16:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57490 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 57490@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166187517717789 (code B ref -1); Tue, 30 Aug 2022 16:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Aug 2022 15:59:37 +0000 Received: from localhost ([127.0.0.1]:37195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oT3eL-0004cr-9U for submit@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 ) id 1oT3eI-0004cg-3t for submit@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 ) id 1oT3eH-0002MM-Tr for bug-guix@gnu.org; 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 ) id 1oT3eH-0006uI-Lc for bug-guix@gnu.org; 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 ) id 1oT3eG-0007kk-N2 for bug-guix@gnu.org; Tue, 30 Aug 2022 11:59:33 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 13 Fructidor an 230 de la =?UTF-8?Q?R=C3=A9volution,?= 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@inria.fr> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 30 12:20:51 2022 Received: (at control) by debbugs.gnu.org; 30 Aug 2022 16:20:51 +0000 Received: from localhost ([127.0.0.1]:37261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oT3yt-0005DV-Dr for submit@debbugs.gnu.org; Tue, 30 Aug 2022 12:20:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oT3yo-0005DF-W8 for control@debbugs.gnu.org; Tue, 30 Aug 2022 12:20:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT3yi-0002by-Fk for control@debbugs.gnu.org; Tue, 30 Aug 2022 12:20:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=bTjP84Z1pli1hUqlgLBbOcvOMQxHJYv57QGaX6xtrYw=; b=Pv9xldYre9QdMq YQe4pfOmoC3FlMNCDhye5LoAQui1PXfggEdp9wTzOg1gHtzygRv86Mpajcw8zGvagdMIxI+D0DvOq URI7opVaqu80aLJUNQVxYgJ9VJKOVoJrAF8xdG2VR+jpInUiPIoPA6BopZNKdWVIsj5F2NQGFyy5D kNRtEX7ZMtmyA3IpI+dlIw//MjT8EkSMgU1jlWnzr12nmSPFiUTWbO6ZLH49vSNZ2vioXTuGIKjwq gTcvIMCLrvJEOnqJnU1RjVRxagd3u142IvFlmBM123M739jujH/n8xPHAfmg43vkU1Bkce1563UaV nhX9GD3iV8jFwo+34TSg==; Received: from [193.50.111.124] (port=58350 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT3yd-0000Ln-Qc for control@debbugs.gnu.org; Tue, 30 Aug 2022 12:20:39 -0400 Date: Tue, 30 Aug 2022 18:20:33 +0200 Message-Id: <87r10xem9a.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #57490 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) severity 57490 important quit From unknown Sat Jul 12 02:31:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57490: UPower ignores =?UTF-8?Q?=E2=80=98critical-power-action=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 30 Aug 2022 16:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57490 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 57490@debbugs.gnu.org Received: via spool by 57490-submit@debbugs.gnu.org id=B57490.166187656420307 (code B ref 57490); Tue, 30 Aug 2022 16:23:02 +0000 Received: (at 57490) by debbugs.gnu.org; 30 Aug 2022 16:22:44 +0000 Received: from localhost ([127.0.0.1]:37273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oT40h-0005HP-Sk for submit@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 ) id 1oT40O-0005GZ-E5 for 57490@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 ) id 1oT40J-0002oN-6P for 57490@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 ) id 1oT40I-0000RF-Oi for 57490@debbugs.gnu.org; Tue, 30 Aug 2022 12:22:18 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87sflden8d.fsf@inria.fr> Date: Tue, 30 Aug 2022 18:22:17 +0200 In-Reply-To: <87sflden8d.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 30 Aug 2022 17:59:30 +0200") Message-ID: <87mtblem6e.fsf@gnu.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s 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. From unknown Sat Jul 12 02:31:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57490: UPower ignores =?UTF-8?Q?=E2=80=98critical-power-action=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 30 Aug 2022 21:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57490 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 57490@debbugs.gnu.org Received: via spool by 57490-submit@debbugs.gnu.org id=B57490.16618966325072 (code B ref 57490); Tue, 30 Aug 2022 21:58:01 +0000 Received: (at 57490) by debbugs.gnu.org; 30 Aug 2022 21:57:12 +0000 Received: from localhost ([127.0.0.1]:37660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oT9EO-0001Ji-DS for submit@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 ) id 1oT9EI-0001JR-UD for 57490@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 ) id 1oT9ED-0002bB-Nn for 57490@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 ) id 1oT9ED-0004nF-4O for 57490@debbugs.gnu.org; Tue, 30 Aug 2022 17:57:01 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87sflden8d.fsf@inria.fr> Date: Tue, 30 Aug 2022 23:56:58 +0200 In-Reply-To: <87sflden8d.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 30 Aug 2022 17:59:30 +0200") Message-ID: <871qsxe6ol.fsf@gnu.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s 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 . =C2=B2 But it=E2=80=99s almost there! https://issues.guix.gnu.org/49475 From unknown Sat Jul 12 02:31:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57490: UPower ignores =?UTF-8?Q?=E2=80=98critical-power-action=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 31 Aug 2022 14:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57490 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 57490@debbugs.gnu.org Received: via spool by 57490-submit@debbugs.gnu.org id=B57490.166195717519109 (code B ref 57490); Wed, 31 Aug 2022 14:47:02 +0000 Received: (at 57490) by debbugs.gnu.org; 31 Aug 2022 14:46:15 +0000 Received: from localhost ([127.0.0.1]:40130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTOyt-0004y9-Ah for submit@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 ) id 1oTOyr-0004xw-90 for 57490@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 ) id 1oTOym-0006qm-1k for 57490@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 ) id 1oTOyk-00018w-KN for 57490@debbugs.gnu.org; Wed, 31 Aug 2022 10:46:07 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87sflden8d.fsf@inria.fr> <871qsxe6ol.fsf@gnu.org> Date: Wed, 31 Aug 2022 16:46:04 +0200 In-Reply-To: <871qsxe6ol.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 30 Aug 2022 23:56:58 +0200") Message-ID: <87wnaoa2tv.fsf@gnu.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s 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 From unknown Sat Jul 12 02:31:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57490: UPower ignores =?UTF-8?Q?=E2=80=98critical-power-action=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 05 Sep 2022 12:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57490 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 57490@debbugs.gnu.org Received: via spool by 57490-submit@debbugs.gnu.org id=B57490.166238259431530 (code B ref 57490); Mon, 05 Sep 2022 12:57:01 +0000 Received: (at 57490) by debbugs.gnu.org; 5 Sep 2022 12:56:34 +0000 Received: from localhost ([127.0.0.1]:46774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVBeP-0008CM-Un for submit@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 ) id 1oVBeD-0008Bt-58 for 57490@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 ) id 1oVBe7-0001Yw-ST for 57490@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 ) id 1oVBe2-00059O-P8 for 57490@debbugs.gnu.org; Mon, 05 Sep 2022 08:56:10 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87sflden8d.fsf@inria.fr> <871qsxe6ol.fsf@gnu.org> <87wnaoa2tv.fsf@gnu.org> Date: Mon, 05 Sep 2022 14:56:04 +0200 In-Reply-To: <87wnaoa2tv.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 31 Aug 2022 16:46:04 +0200") Message-ID: <87bkru3rq3.fsf@gnu.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Ludovic Court=C3=A8s 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. From unknown Sat Jul 12 02:31:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57490: UPower ignores =?UTF-8?Q?=E2=80=98critical-power-action=E2=80=99?= Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 05 Sep 2022 20:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57490 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 57490@debbugs.gnu.org Received: via spool by 57490-submit@debbugs.gnu.org id=B57490.16624080663818 (code B ref 57490); Mon, 05 Sep 2022 20:02:01 +0000 Received: (at 57490) by debbugs.gnu.org; 5 Sep 2022 20:01:06 +0000 Received: from localhost ([127.0.0.1]:49030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVIHK-0000zV-GJ for submit@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 ) id 1oVIHJ-0000zO-FY for 57490@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@telenet.be> 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 Content-Language: en-US References: <87sflden8d.fsf@inria.fr> <871qsxe6ol.fsf@gnu.org> <87wnaoa2tv.fsf@gnu.org> <87bkru3rq3.fsf@gnu.org> From: Maxime Devos In-Reply-To: <87bkru3rq3.fsf@gnu.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= , 57490@debbugs.gnu.org Message-ID: <16fe99ab-4fa2-bcb1-e70b-b52bbc70c7f5@telenet.be> Subject: =?UTF-8?Q?Re=3a_bug=2357490=3a_UPower_ignores_=e2=80=98critical-pow?= =?UTF-8?B?ZXItYWN0aW9u4oCZ?= References: <87sflden8d.fsf@inria.fr> <871qsxe6ol.fsf@gnu.org> <87wnaoa2tv.fsf@gnu.org> <87bkru3rq3.fsf@gnu.org> In-Reply-To: <87bkru3rq3.fsf@gnu.org> --------------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-- From unknown Sat Jul 12 02:31:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57490: UPower ignores =?UTF-8?Q?=E2=80=98critical-power-action=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 20 Sep 2022 10:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57490 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 57490@debbugs.gnu.org Received: via spool by 57490-submit@debbugs.gnu.org id=B57490.166366836215594 (code B ref 57490); Tue, 20 Sep 2022 10:07:01 +0000 Received: (at 57490) by debbugs.gnu.org; 20 Sep 2022 10:06:02 +0000 Received: from localhost ([127.0.0.1]:56110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oaa8g-00043S-6k for submit@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 ) id 1oaa8d-00042x-PA for 57490@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 ) id 1oaa8Y-0007jX-JK for 57490@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 ) id 1oaa7t-0003Tc-Dk for 57490@debbugs.gnu.org; Tue, 20 Sep 2022 06:05:31 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87sflden8d.fsf@inria.fr> <871qsxe6ol.fsf@gnu.org> <87wnaoa2tv.fsf@gnu.org> <87bkru3rq3.fsf@gnu.org> Date: Tue, 20 Sep 2022 12:05:06 +0200 In-Reply-To: <87bkru3rq3.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 05 Sep 2022 14:56:04 +0200") Message-ID: <875yhipdil.fsf@gnu.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s 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. From unknown Sat Jul 12 02:31:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#57490: UPower ignores =?UTF-8?Q?=E2=80=98critical-power-action=E2=80=99?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 02 Oct 2022 15:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57490 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos Cc: 57490@debbugs.gnu.org Received: via spool by 57490-submit@debbugs.gnu.org id=B57490.166472445613061 (code B ref 57490); Sun, 02 Oct 2022 15:28:02 +0000 Received: (at 57490) by debbugs.gnu.org; 2 Oct 2022 15:27:36 +0000 Received: from localhost ([127.0.0.1]:47840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of0sS-0003Oa-7l for submit@debbugs.gnu.org; Sun, 02 Oct 2022 11:27:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of0sQ-0003OO-P6 for 57490@debbugs.gnu.org; Sun, 02 Oct 2022 11:27:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58534) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of0sK-0005x7-VF; Sun, 02 Oct 2022 11:27:28 -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=rNw/ZjgYGl0KUDqP2MFO7lMN6fh4hxZ9XpnOhJ8Ws5U=; b=nBwxRjjI68qTHDWcqag7 oMyikfVPOtLy5OSJ+sUt9tIwf9s5WhC7XKwqFdjRQ+gYmHryEttsLJbzm9YmbnQW4HVLCgcVTEjC6 yjJ4UuTkgA2HLw2yFXqWGBzmQIlqVoGpoMqm2qerSOIJ+nVMIkLshFCoIqveIrxe5e4KVgx40gT6/ gSYDYrQLgQS5BzIRAwrb9YM38Oat7LbyaIkTGi4Q/G3oiBZXWO62RrAWZWDvyqWeNg3/HxOxFXsJI VJWA+ewyaO+NQqbdB3VxT4rohBvipKUBMZja85s0UKuGptx6SmMWZlD3zfqPdsx3A1qJ//XcSSrB5 Hcv7o64syNJ/Ag==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:52134 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of0sK-00037Z-CX; Sun, 02 Oct 2022 11:27:28 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87sflden8d.fsf@inria.fr> <871qsxe6ol.fsf@gnu.org> <87wnaoa2tv.fsf@gnu.org> <87bkru3rq3.fsf@gnu.org> <16fe99ab-4fa2-bcb1-e70b-b52bbc70c7f5@telenet.be> Date: Sun, 02 Oct 2022 17:27:25 +0200 In-Reply-To: <16fe99ab-4fa2-bcb1-e70b-b52bbc70c7f5@telenet.be> (Maxime Devos's message of "Mon, 5 Sep 2022 22:01:01 +0200") Message-ID: <87wn9i9rfm.fsf@gnu.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Maxime Devos skribis: > On 05-09-2022 14:56, Ludovic Court=C3=A8s wrote: >> I=E2=80=99d like to test whether UPower invokes the intended critical ac= tion, >> but I=E2=80=99m not sure how to simulate a low battery level. Thoughts? > > I've found a 'Virtual Battery Driver': https://lwn.net/Articles/440097/ > > The gmane links are dead, but the linux source tree as a > drivers/power/supply/test_power.c that seems to be about the same > thing. I was able to give that a try. Since the default =E2=80=98percentage-actio= n=E2=80=99 in is 2, I did this (I configured syslogd to log to /dev/console): --8<---------------cut here---------------start------------->8--- root@antelope ~# modprobe test-power ac_online=3Doff usb_online=3Doff batte= ry_capacity=3D2 battery_status=3Ddischarging modprobe test-power ac_online=3Doff usb_online=3Doff battery_capacity=3D2 b= attery_status=3Ddischarging Oct 2 17:00:20 localhost vmunix: [ 44.294530] __power_supply_register: E= xpected proper parent device for 'test_ac' Oct 2 17:00:20 localhost vmunix: [ 44.295049] __power_supply_register: E= xpected proper parent device for 'test_battery' Oct 2 17:00:20 localhost vmunix: [ 44.295147] __power_supply_register: E= xpected proper parent device for 'test_usb' root@antelope ~# Oct 2 17:00:20 localhost shepherd[1]: [upowerd]=20=20 Oct 2 17:00:20 localhost shepherd[1]: [upowerd] (upowerd:186): UPower-Linu= x-WARNING **: 17:00:20.457: no valid voltage value found for device /sys/de= vices/virtual/power_supply/test_battery, assuming 10V=20 Oct 2 17:00:20 localhost shepherd[1]: [upowerd]=20=20 Oct 2 17:00:20 localhost shepherd[1]: [upowerd] (upowerd:186): UPower-Linu= x-WARNING **: 17:00:20.473: USB power supply /sys/devices/virtual/power_sup= ply/test_usb without usb_type property, please report=20 root@antelope ~# Oct 2 17:00:41 localhost elogind[185]: System is powering= down.. Oct 2 17:00:41 localhost elogind[185]: System is powering down.. Oct 2 17:00:41 localhost shepherd[1]: Exiting shepherd...=20 Oct 2 17:00:41 localhost shepherd[1]: Service ntpd has been stopped.=20 Oct 2 17:00:41 localhost ntpd[184]: ntpd exiting on signal 15 (Terminated) Oct 2 17:00:41 localhost avahi-daemon[191]: Got SIGTERM, quitting. Oct 2 17:00:41 localhost avahi-daemon[191]: Leaving mDNS multicast group o= n interface ens3.IPv6 with address fec0::e35c:509d:d937:2087. Oct 2 17:00:41 localhost avahi-daemon[191]: Leaving mDNS multicast group o= n interface ens3.IPv4 with address 10.0.2.15. Oct 2 17:00:41 localhost shepherd[1]: Service avahi-daemon has been stoppe= d.=20 Oct 2 17:00:41 localhost NetworkManager[183]: [1664722841.2220] ca= ught SIGTERM, shutting down normally. Oct 2 17:00:41 localhost shepherd[1]: Service networking has been stopped.= =20 Oct 2 17:00:41 localhost shepherd[1]: Service console-font-tty6 has been s= topped.=20 Oct 2 17:00:41 localhost shepherd[1]: Service term-tty6 has been stopped.= =20 Oct 2 17:00:41 localhost NetworkManager[183]: [1664722841.2318] dh= cp4 (ens3): canceled DHCP transaction Oct 2 17:00:41 localhost NetworkManager[183]: [1664722841.2318] dh= cp4 (ens3): activation: beginning transaction (timeout in 45 seconds) Oct 2 17:00:41 localhost NetworkManager[183]: [1664722841.2318] dh= cp4 (ens3): state changed no lease Oct 2 17:00:41 localhost NetworkManager[183]: [1664722841.2326] ma= nager: NetworkManager state is now CONNECTED_SITE Oct 2 17:00:41 localhost NetworkManager[183]: [1664722841.2335] ex= iting (success) Oct 2 17:00:41 localhost avahi-daemon[191]: Leaving mDNS multicast group o= n interface lo.IPv6 with address ::1. Oct 2 17:00:41 localhost syslogd: exiting on signal 15 [ 70.670560] reboot: Power down --8<---------------cut here---------------end--------------->8--- So 20s after a battery at 2% got plugged in, UPower told elogind to turn off the VM, which told shepherd to do that=E2=80=94exactly as expected. It=E2=80=99s kinda disappointing to debug something just to find out it=E2= =80=99s working as advertised. I think the conclusion is that 2% is too low a threshold, at least for my laptop, or maybe the charge estimate is slightly off on my laptop. I=E2=80=99ll raise that threshold and see if it works correctly next time I run out of battery=E2=80=A6 If someone has better ideas, I=E2=80=99d love to hear them! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 07 16:05:40 2022 Received: (at control) by debbugs.gnu.org; 7 Oct 2022 20:05:40 +0000 Received: from localhost ([127.0.0.1]:37469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogtbI-0006kt-H0 for submit@debbugs.gnu.org; Fri, 07 Oct 2022 16:05:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogtbG-0006kg-NO for control@debbugs.gnu.org; Fri, 07 Oct 2022 16:05:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogtbB-0005Sc-Ha for control@debbugs.gnu.org; Fri, 07 Oct 2022 16:05: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:Subject:From:To:Date:in-reply-to: references; bh=DonOV0Nj0eQ740z+3y4ZIbCTlusPfdvuQMuF76X1e7g=; b=SA4yMxvaE5L7H6 TwRyH9HytrSCmy/bSyd6boY6ceDsyo9i7pPACssyR+FXsLmlk76B6uEvRfz2Weu6MP0XL5tLWkIne mUF6wGgIQuucjWQB0Cn3sjk7bAYWDOHl76ZxIivlYb6IkaRyWBPFmGd84ct7/HvjRhZeUOTtNtH4I tRsw8TxUIu65etOF56ChEzcevpxpXBGc0Cf72xgjL4mgprzCaPqtbIg+IuOP2cvLxXGZtE1Twv1+K 3FO+OFXARhQEv/uqwKs8F8rQMs1JOPO9EFNDBxMIMEftAOAJuc+RsqnqFCaB+hTfz9ORGbw+QUx6w JM2eFY2Oz3x3aKzJw/aA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56144 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogtbB-0000Tn-2u for control@debbugs.gnu.org; Fri, 07 Oct 2022 16:05:33 -0400 Date: Fri, 07 Oct 2022 22:05:30 +0200 Message-Id: <874jwf9z79.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #57490 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 57490 notabug close 57490 quit