From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: battery.el broken? Date: Fri, 11 Jun 2021 11:51:45 +0100 Message-ID: <87o8cchdxa.fsf@tcd.ie> References: <20210605135544.0203EC207FB@raman-glaptop.localdomain> <87lf7oj6lj.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12493"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: "T.V Raman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 11 12:52:37 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 1lremD-00035S-2t for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Jun 2021 12:52:37 +0200 Original-Received: from localhost ([::1]:59044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lremB-0006Ob-Fz for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Jun 2021 06:52:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrelW-0005iY-AC for emacs-devel@gnu.org; Fri, 11 Jun 2021 06:51:54 -0400 Original-Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:40692) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lrelT-0001PG-KA for emacs-devel@gnu.org; Fri, 11 Jun 2021 06:51:53 -0400 Original-Received: by mail-wr1-x42f.google.com with SMTP id y7so5561686wrh.7 for ; Fri, 11 Jun 2021 03:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=NCa+JBXyWj4BPIxy5juc574QuIlmXR8+Iwmjknhg+yY=; b=LjOXUB5Ab4RcNt2d/6jZWNPeBCnvBR3K21uUqLj9oLpLCNaqD8xlcQ8zdG5uYivh8I GWLlr+xzoaMeFLG/qSQuMct4Cuz/3+PQIWMaRm8hYfPlByPkDUOZyskLbIPsGzwMxav2 hM7S4nVER1nxGiscuuTbmJaqvxXvrov1el3l9C63gMOCN46TxsmMwt8kAZAovPusIeLZ YYKSRo3Luo5Y8XMkze64bg2Chj1nCdaioQbuJC43krf6V3E6ZS1+xM8u0U3ecu58NO9O tKM/Dm96JYFdwBjNasIGjcWizYrBgyKy6iJ2gEgVLr7xFH5yFG5wy1hvghMkoDMhKJ2q WFnQ== 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:references:date:in-reply-to :message-id:user-agent:mime-version; bh=NCa+JBXyWj4BPIxy5juc574QuIlmXR8+Iwmjknhg+yY=; b=UdQSuQtHP5tyrS9yFn1B9pmS5oMzjeXalwLlyd+SQbzVaSTwe/y9ufqGyuJhp5G3AR kZTiVmIVRQnsRnRbdpDeATvNfPgorvjDRnrUJnhx6E/fZ1fhoRQ9JeQH9XBiIhV7/vI2 gHeptdYkSFrwMJ+nqf6OKbVlAJU1QxxuAuE/J0UfJLCqXI7so9nfM/3Mv/+GYh51oXCb UrDhTSGRE3oG69Y9xXMRo5QmArRiIgjGxs8la+RN2wlCYQ5EeLj+IuX6xMT9QyDG00cp Pg9QULjQt/xSEZHhkiwTYAG7g/t76ZcAiTGo+KWj7raNJYRo3Sd4W9eOQKZP7+Hzz3ew KP2w== X-Gm-Message-State: AOAM532mCnHPeNnrRUGLa1YWtrcKR+x4GVJfOx8Hta9/VUfsmf3KbXTK YNXzC1YMmghykXYyU+tg4DNkvw== X-Google-Smtp-Source: ABdhPJwubzTFKq6mpwqEj9Ov8CO3JnOwCjNsBlN49L2njPBxwAqxS6aowGBwqj4rmaJIjFkWkp0rMA== X-Received: by 2002:adf:a412:: with SMTP id d18mr3335330wra.49.1623408707940; Fri, 11 Jun 2021 03:51:47 -0700 (PDT) Original-Received: from localhost ([51.37.22.80]) by smtp.gmail.com with ESMTPSA id o7sm7252845wro.76.2021.06.11.03.51.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 03:51:47 -0700 (PDT) In-Reply-To: (T.V Raman's message of "Sat, 05 Jun 2021 18:52:44 -0700") Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=contovob@tcd.ie; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:270694 Archived-At: "T.V Raman" 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 == battery-upower > > (mapcar #'battery--upower-device-properties > (battery--upower-devices) > ) > > ((("NativePath" . "AC") ("Vendor" . "") ("Model" . "") ("Serial" . "") > ("UpdateTime" . 1622943939) ("Type" . 1) ("PowerSupply" . t) ("HasHistory") > ("HasStatistics") ("Online") ("Energy" . 0.0) ("EnergyEmpty" . 0.0) ...) > (("NativePath" . "BAT0") ("Vendor" . "SMP") ("Model" . "01AV431") ("Serial" > . "5195") ("UpdateTime" . 1622944181) ("Type" . 2) ("PowerSupply" . t) > ("HasHistory" . t) ("HasStatistics" . t) ("Online") ("Energy" . 51.36) > ("EnergyEmpty" . 0.0) ...) (("NativePath" . "ucsi-source-psy-USBC000:001") > ("Vendor" . "") ("Model" . "") ("Serial" . "") ("UpdateTime" . 1622943939) > ("Type" . 1) ("PowerSupply" . t) ("HasHistory") ("HasStatistics") ("Online" . t) > ("Energy" . 0.0) ("EnergyEmpty" . 0.0) ...) (("NativePath" > . "ucsi-source-psy-USBC000:002") ("Vendor" . "") ("Model" . "") ("Serial" . "") > ("UpdateTime" . 1622943940) ("Type" . 1) ("PowerSupply" . t) ("HasHistory") > ("HasStatistics") ("Online") ("Energy" . 0.0) ("EnergyEmpty" . 0.0) ...)) Hm, did you always have those ucsi-source-psy entries? Searching for them online led me to the following relatively recent discussions on USB-C power sources, UPower, and Linux: https://forum.manjaro.org/t/upowerd-not-recognising-usb-c-path-charger-is-usb-c https://gitlab.freedesktop.org/upower/upower/-/issues/126 https://bugs.launchpad.net/ubuntu/+source/upower/+bug/1891799 In particular I notice that the first of the two ucsi-source-psy entries says ("Online" . t), which seems contradictory and is probably what throws battery-upower off. -- Basil