From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OfRJOTgA8mLx8AAAbAwnHQ (envelope-from ) for ; Tue, 09 Aug 2022 08:35:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id UB4EODgA8mKy9gAAauVa8A (envelope-from ) for ; Tue, 09 Aug 2022 08:35:36 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 325952E54C for ; Tue, 9 Aug 2022 08:35:36 +0200 (CEST) Received: from localhost ([::1]:59584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLIpy-0000LN-Vs for larch@yhetil.org; Tue, 09 Aug 2022 02:35:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLIpS-0000LE-MG for bug-guix@gnu.org; Tue, 09 Aug 2022 02:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52598) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLIpS-0007yk-CJ for bug-guix@gnu.org; Tue, 09 Aug 2022 02:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLIpS-0006iO-6y for bug-guix@gnu.org; Tue, 09 Aug 2022 02:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#57052: elogind-service specifies a variable that's ignored by defualt Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 09 Aug 2022 06:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57052 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: bokr@bokr.com Cc: Cairn , 57052@debbugs.gnu.org Received: via spool by 57052-submit@debbugs.gnu.org id=B57052.166002685925752 (code B ref 57052); Tue, 09 Aug 2022 06:35:02 +0000 Received: (at 57052) by debbugs.gnu.org; 9 Aug 2022 06:34:19 +0000 Received: from localhost ([127.0.0.1]:42347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLIok-0006hI-R7 for submit@debbugs.gnu.org; Tue, 09 Aug 2022 02:34:19 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:43871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLIoj-0006hB-F9 for 57052@debbugs.gnu.org; Tue, 09 Aug 2022 02:34:18 -0400 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4M23FK5TClz3wV7; Tue, 9 Aug 2022 08:34:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1660026854; bh=OzEAi0kHWLqtSTGagOEr7RY1lvct2qOT/BjIf+9Sz9M=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=W6Kd50R1gIpdL/S7JWrUNiHs86G4fJfKLzh1DmPhBqJhe2mG2O069UAF08eY0z+wO 5l3xtUIc7lKNxLOs7TuOdHhz5jiYSMnMqxSsdefsPwT/Ge3UoxoWssV45Tx14E3ePa DU3HQyqGDlTy2IGzvdOnhJfwLJc60g77wxLllcUQ= Message-ID: <2427493dd6757a755b5ee6d1818da45b030af337.camel@ist.tugraz.at> From: Liliana Marie Prikler Date: Tue, 09 Aug 2022 08:34:12 +0200 In-Reply-To: <20220809015243.GA19707@LionPure> References: <1MoJ5UI-6FMbpR2WSMjNbdVXZd4GisV-Dl1HPuLfgYLOQYl4Udg7HLNR8NDmZ47slyi4grIwH93xXL8xORLxUo4O80MR34q3wLXMmnktYH8=@pm.me> <8b93b5ce9f1c9caab7a65fcc672dddd24c7ad373.camel@ist.tugraz.at> <20220809015243.GA19707@LionPure> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660026936; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=OzEAi0kHWLqtSTGagOEr7RY1lvct2qOT/BjIf+9Sz9M=; b=NRJCJHRhemqY4mugtQ5dA/Fg6dHx37wmuLYkCJeYqXG9ZLKxEphxihi4PRD7ds3qN95NM8 Z9rtG+WBeLqZ6hUpX8HRKBLKQS9ckIJnwNWYuKnoYIJfT3tKwDGSH+TB7jVeJqXGcbT9RS Wwiyo67XbrSWzTZ0FvvYyz0JbtA5eRX0cYW3S51iCUe4sJJarinSWo5fVQ3j0S5LlxhpyR d38tru3vTc18OT3nQAw0AKG9Pxtlrnae4ssl3YBrzbu0MLgpguYRgPcCYp2FPAlZyvI14I EOLxROmMPAarD2zICOGE3h+Edb8sYCmB+Rkl3sx6E1aZ0Q3qi8AuddpVT42eCA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660026936; a=rsa-sha256; cv=none; b=sJD0CFAi6c9HXaarGd+GPUx531h3FmDpcl0nz9O1zMOmBMlGjmv/YLshd8guLFFvQX41/C HFXAs/geLzmoRm+whT1BVVCob5bjy0VmnP2u6GLMeVjJdLYvhFTF7xh/sW6TjyQ8Qx2/xQ yClkRTLay7KovGRjlh1i5LpK6gZWCqrj4DJckjALh1kUVAL9OkWcT2XPXFMcM3HvuvVLmI CXMyNWKfI3z2mSdESTCuMDw4GB7BPpEun7SR9VK/dmeuD1Npcy8sed3KN3GRDo1Y7xo0o7 4AjFaNj6+98dE2qynFdgSbxJz3r6AU9+Z4ppRAn38pA0qaM2pQ6j+qHoNwm2GQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=W6Kd50R1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.51 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=W6Kd50R1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 325952E54C X-Spam-Score: 4.51 X-Migadu-Scanner: scn0.migadu.com X-TUID: lxbtaWjHCKWD Am Dienstag, dem 09.08.2022 um 03:52 +0200 schrieb bokr@bokr.com: > Hi Liliana, > > On +2022-08-08 12:45:10 +0200, Liliana Marie Prikler wrote: > > Am Sonntag, dem 07.08.2022 um 23:29 +0000 schrieb Cairn: > > > "HandleLidSwitchExternalPower= is completely ignored by default > > > (for > > > backwards compatibility)"[1] > > > > > > I noticed (with help in IRC) that my laptop wasn't suspending on > > > lid > > > close when plugged in and charging, which I hadn't seen happen on > > > other systems. I now know that I can set this by configuring the > > > `elogind-service` parameter `handle-lid-switch-external-power`. > > > Regardless, it seems like it should default to being unset rather > > > than set/ignored, since that would heed the line I quoted above. > > I think you're misreading that line.  What it states is not that > > "HandleLidSwitchExternalPower" is ignored by default, but > > "HandleLidSwitchExternalPower=" is ignored by default, i.e. there > > will > > be no value unless one was provided (whichever semantics "no value" > > has > > later on) is only confusingly explained later on. > > > > IMHO the Guix behaviour of always setting a value is the right one > > (explicit is better than implicit after all).  As for the default > > values, one might disagree as to which fits, but I don't think > > ignoring lid switches while powered is harmful. > > > > What would you advise if there's no battery power, > or for some reason one is running on plug power only, > for worriers that the bulding power might fail? > > I'd guess a power brick would power for some milliseconds > and wonder if this is detectable, i.e., to do something > at least to leave a goodbye world message somewhere if the machine > was not suspended with sufficient state to resume after power > restore? > > Buy a UPS, and don't go away long enough for that to run out? :) I do think that we're starting to split hairs here, but for the sake of the argument, elogind should be able to detect whether or not the power supply it's attached to actually delivers power. If your laptop doesn't have a battery, then pulling the plug on it has the same effects as pulling the plug on a regular PC, there's nothing you can do in elogind to make that a safe action. Cheers