From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: battery.el broken? Date: Sat, 05 Jun 2021 18:58:00 -0700 Message-ID: References: <20210605135544.0203EC207FB@raman-glaptop.localdomain> <87lf7oj6lj.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=gb18030 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17041"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "Basil L. Contovounesios" , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 06 03:58:49 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpi3s-0004FH-VO for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 03:58:49 +0200 Original-Received: from localhost ([::1]:59128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpi3s-0008QZ-1b for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Jun 2021 21:58:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpi3C-0007hr-Oh for emacs-devel@gnu.org; Sat, 05 Jun 2021 21:58:06 -0400 Original-Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:39515) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpi3A-0007UT-Rh for emacs-devel@gnu.org; Sat, 05 Jun 2021 21:58:06 -0400 Original-Received: by mail-pf1-x429.google.com with SMTP id k15so10415901pfp.6 for ; Sat, 05 Jun 2021 18:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=wgODvOXpgEqlezghsRFU/seymUePrsDyI7H3mvvuuCY=; b=GY9XB+2TYVKYm/1Ag9LsQDYpK3CwjscrhPTHF8tO/dqFoLwp+yELVYBnFGWIeIaI/d zxSo6BqfRgUO6IKLSix+D01eztXS+xcUBEOBh55gBJFLys0jhePz0G5xWM44lp0JwsQC 2463QpagpLznNLUqY3OepTGA2lpsaXLtObRBgNxLBCVSQGbBS21iRjKIkkuyAYfyCGm4 /oNZcqABfLzcS2dVYhkyaKzNRXIfBouDQCwvB3Rgv5NQf867lMpL91/1P61APiuEXe0O eCQnr4xXXlfEWlf3rLvYJuAiUdOMASCq7xYs8EiHoRRs1VlR/mDQweSQ9R+YbR3IIz+C 6GgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=wgODvOXpgEqlezghsRFU/seymUePrsDyI7H3mvvuuCY=; b=cqbT0aoedu9LvH+Fs4fmTY2nzvywXTjW+MT1m7QqikxBJJ+zaUgrMlfYxursBFZ6af k1nNnyMQWCKKGrq4lqiOkSxd0VSZ0BWzrQ9PP+xhDM9BW9Ttg4fZ6brzbV03W0O2Ck76 iNH0socQKm3K7XdCjWkfeneVR5s+eJu2sKMaiIc2iJ+NG4M2BetiitASSLFYCDjaHqVn 5hgbj/c4HnUB481/4rHhS/Fri8p5WogaP3DeJ4weJsDH1UL+BocSglqSWNDfSOMN23fO PENRXfE8xwOpN5kvIN0A9mEZD6e0tYVsPcEQ/SHtXuVVzoEiJvRNNgidqndeb8b3HbcJ bPCA== X-Gm-Message-State: AOAM531v1gvYBjV3OuoqnQpniut1JD96xTO8+1oaPurXvjNkSp/kw3oZ gMZy+iIutA5rCPh72PSghTZaVkmYyf54XAVj X-Google-Smtp-Source: ABdhPJzSCDH0mb8MwT4VwtDzZeemYCYNhCDucq6rYicn0/bCvqe3alGqFEkj+es1MEjtZCKleZ7dzg== X-Received: by 2002:aa7:829a:0:b029:2e9:e53:198d with SMTP id s26-20020aa7829a0000b02902e90e53198dmr11489750pfm.72.1622944682791; Sat, 05 Jun 2021 18:58:02 -0700 (PDT) Original-Received: from raman-glaptop.localdomain (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id x125sm4752195pfx.201.2021.06.05.18.58.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Jun 2021 18:58:01 -0700 (PDT) Original-Received: by raman-glaptop.localdomain (Postfix, from userid 13930) id A9F6AC20717; Sat, 5 Jun 2021 18:58:00 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sat, 05 Jun 2021 18:23:45 -0400") Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=raman@google.com; helo=mail-pf1-x429.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270454 Archived-At: And on the same machine a few mins later: (setq battery-status-function #'battery-linux-sysfs) M-x battery displays the time left: Power BAT, battery Discharging (98.7% load, remaining time 10:48) (battery-linux-sysfs) ((99 . "4110066.461338953") (114 . "4.9") (109 . "624") (104 . "10") (116 .= "10:24") (100 . "N/A") (66 . "Discharging") (98 . "") (112 . "98.7") (76 .= "BAT")) Stefan Monnier writes: I am mostly convinced this is a dbus/upower bug since I too checked and nothing has changed on the Emacs side on the machine, still running Emacs from Github@HEAD. Will now try some of the other status functions, I think the output stopped telling me time left likely a couple of days ago. Typing this with the machine fully charged and not plugged into the AC jack, but the upower output shown below appears to think it's on AC Power. battery-status-function =3D=3D battery-upower (mapcar #'battery--upower-device-properties (battery--upower-devices) ) ((("NativePath" . "AC") ("Vendor" . "") ("Model" . "") ("Serial" . "") ("Up= dateTime" . 1622943939) ("Type" . 1) ("PowerSupply" . t) ("HasHistory") ("H= asStatistics") ("Online") ("Energy" . 0.0) ("EnergyEmpty" . 0.0) ...) (("Na= tivePath" . "BAT0") ("Vendor" . "SMP") ("Model" . "01AV431") ("Serial" . "5= 195") ("UpdateTime" . 1622944181) ("Type" . 2) ("PowerSupply" . t) ("HasHis= tory" . t) ("HasStatistics" . t) ("Online") ("Energy" . 51.36) ("EnergyEmpt= y" . 0.0) ...) (("NativePath" . "ucsi-source-psy-USBC000:001") ("Vendor" . = "") ("Model" . "") ("Serial" . "") ("UpdateTime" . 1622943939) ("Type" . 1)= ("PowerSupply" . t) ("HasHistory") ("HasStatistics") ("Online" . t) ("Ener= gy" . 0.0) ("EnergyEmpty" . 0.0) ...) (("NativePath" . "ucsi-source-psy-USB= C000:002") ("Vendor" . "") ("Model" . "") ("Serial" . "") ("UpdateTime" . 1= 622943940) ("Type" . 1) ("PowerSupply" . t) ("HasHistory") ("HasStatistics"= ) ("Online") ("Energy" . 0.0) ("EnergyEmpty" . 0.0) ...)) >> If so, please say which Emacs version you're running and what your value >> of battery-status-function is. > > You might also want to try using another of those > battery-status-functions to see if that helps. > > > Stefan > > --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =817=A94 Id: kg:/m/0285kf1 =950=DC8