Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #75088

Bug#1009262: linux-image-5.16.0-0.bpo.4-arm64: power supply incorrectly reported as offline

Path csiph.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!bofh.it!news.nic.it!robomod
From Diederik de Haas <didi.debian@cknow.org>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#1009262: linux-image-5.16.0-0.bpo.4-arm64: power supply incorrectly reported as offline
Date Tue, 19 Apr 2022 18:10:01 +0200
Message-ID <EdYAp-9OC8-3@gated-at.bofh.it> (permalink)
References <EaEeR-7NcQ-1@gated-at.bofh.it> <EdJ8l-9F1s-11@gated-at.bofh.it> <EaEeR-7NcQ-1@gated-at.bofh.it> <EdJ8l-9F1s-11@gated-at.bofh.it>
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Tue Apr 19 16:09:08 2022
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score -3.962
Reply-To Diederik de Haas <didi.debian@cknow.org>, 1009262@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc Debian Kernel Team <debian-kernel@lists.debian.org>
X-Debian-Pr-Message followup 1009262
X-Debian-Pr-Package src:linux
X-Debian-Pr-Source linux
Organization Connecting Knowledge
MIME-Version 1.0
Content-Type multipart/signed; boundary="nextPart8098596.T7Z3S40VBb"; micalg="pgp-sha256"; protocol="application/pgp-signature"
X-Greylist delayed 59775 seconds by postgrey-1.36 at buxtehude; Tue, 19 Apr 2022 16:05:37 UTC
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1714142
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 65
Sender robomod@news.nic.it
X-Original-Date Tue, 19 Apr 2022 18:05:11 +0200
X-Original-Message-ID <3215665.44csPzL39Z@prancing-pony>
X-Original-References <164959079465.54401.13504889710316080606.reportbug@freedombox.jvalleroy.me> <3351355.QJadu78ljV@bagend> <164959079465.54401.13504889710316080606.reportbug@freedombox.jvalleroy.me> <3351355.QJadu78ljV@bagend>
Xref csiph.com linux.debian.bugs.dist:1100718 linux.debian.kernel:75088

Cross-posted to 2 groups.

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On dinsdag 19 april 2022 01:29:04 CEST Diederik de Haas wrote:
> On Sunday, 10 April 2022 13:39:54 CEST James Valleroy wrote:
> > In the log it showed "WARNING System is on battery power, stopping".
> > It uses the on_ac_power command from powermgmt-base package.
> 
> Pretty sure the problem is in the on_ac_power script from powermgmt-base.
> It appears to be a really simplistic script which searches through 4
> categories and I checked (with `ls -l <path>` what it would do on my Rock64:
> 
> 1) /sys/class/power_supply/
> total 0
> (iow: that directory does exist, but is empty)

It turns out that directory isn't empty on a RockPro64 and it returns '0' with
``cat /sys/class/power_supply/tcpm-source-psy-4-0022/online``
(the type property returns 'USB' fwiw)

Which in turn makes the script conclude it's offline/on battery power.
Someone running a manjaro kernel on a RockPro64 also got '0', which makes it 
unlikely to be a Debian kernel issue.

FTR: on my other Rock64's one running LibreELEC and the other armbian, they 
all have an empty power_supply directory.
It was also empty on a RPi 2B running an raspbian.org kernel and a RPi 3B 
running a Debian kernel

> My guess is that it's unaware of device-tree ... which is a problem (for ARM
> devices).

While I didn't see any reference to DT in the powermgmt-base source code, that 
may not be important.

What I don't know is whether the (upstream) kernel is reporting an incorrect 
value for the 'online' property or whether the script makes an incorrect 
assumption wrt what that property's return value represents.

This is as far as I can provide input on this issue. Now someone with 
knowledge about ``/sys/class/power_supply`` should take over.

HTH,
  Diederik

Back to linux.debian.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Bug#1009262: linux-image-5.16.0-0.bpo.4-arm64: power supply incorrectly reported as offline James Valleroy <jvalleroy@mailbox.org> - 2022-04-10 13:50 +0200
  Bug#1009262: linux-image-5.16.0-0.bpo.4-arm64: power supply incorrectly reported as offline Diederik de Haas <didi.debian@cknow.org> - 2022-04-11 18:20 +0200
  Bug#1009262: linux-image-5.16.0-0.bpo.4-arm64: power supply incorrectly reported as offline Diederik de Haas <didi.debian@cknow.org> - 2022-04-19 01:40 +0200
    Bug#1009262: linux-image-5.16.0-0.bpo.4-arm64: power supply incorrectly reported as offline Diederik de Haas <didi.debian@cknow.org> - 2022-04-19 18:10 +0200

csiph-web