Bq25890-charger 3-006a: Failed to register power supply

Hey,

Since a couple of days I am seeing some annoying issues:

  • charging: red LED on but upower says discharging
  • using my usb-c hub HDMI output is not working at all

I have checked my logs and this is new:

# journalctl -k -b -7
Oct 18 14:18:30 pureos kernel: bq25890-charger 3-006a: Failed to register power supply

Could that be caused by this update?

Start-Date: 2021-10-17  23:14:18
Commandline: packagekit role='update-packages'
Upgrade: librem5-devkit-base:arm64 (0.0.21pureos1, 0.0.22pureos1)
End-Date: 2021-10-17  23:14:22

I also have this error, I think it comes every time I boot, first time I see it in the log is October 11 but that was also the last time I reflashed it, it may have happened earlier also, I don’t know.

Since it is the kernel failing to do something, I would first suspect a kernel update.

If you are sure there was a time when that error did not occur, then it might be worthwhile to try previous kernel versions to see if the error appears for a specific kernel version.

amber or byzantium? I’m not seeing that kernel message.

I am running byzantium.

Another couple of things I have noticed:

  • before when I connected my usb-c hub, it will light up, so the librem5 was powering it. This does not happen anymore.
  • I left it charging overnight and when I turned it on in the morning, there was one process using one core 100% (irq/79+) and a bunch of: tps6598x 0-003f: tps6598x_interrupt: failed toread events in the kernel log.

I have to investigate on how to roll back packages. I thought a simple apt install package=version would work but old packages are not available.

If you are lucky, the .deb files might still be available in /var/cache/apt/archive.

Unfortunately there was no previous package in /var/cache/apt/archive and I don’t see any previous kernel in /boot.

Looking at the kernel changelog only the following seems related:


  [ Sebastian Krzyszkowiak ]
  * [0b8b758] power: supply: max17042_battery: Clear status bits in interrupt handler
  * [3e74739] power: supply: max17042_battery: Prevent int underflow in set_soc_threshold
  * [d5a7641] usb: typec: tipd: Export PRESENT property
  * [b331a7d] power: supply: bq25890_charger: Don't enable OTG on unplugged USB
  * [cebf129] power: supply: max17042_battery: log SOC threshold using debug log level
  * [37dfa30] usb: typec: tipd: Read active PDO on probe
  * [357f153] power: supply: bq25890_charger: Read external power props on probe

  [ Martin Kepplinger ]
  * [157a679] Merge tag 'v5.13.16' into stable/5.13.16

 -- Martin Kepplinger <martin.kepplinger@puri.sm>  Wed, 15 Sep 2021 12:47:44 +0200

Not sure if I will manage to compile and install the previous version, but it could be the challenge of the weekend.

Finally I didn’t have to compile the kernel image because Purism is saving the linux-image-*.deb for each tagged version. Confusingly (for me) the are packed in something called “artifacts”.

Anyway, I rolled back the kernel first to 5.13.14pureos1+gitlabci1 and also to 5.13.16pureos1+gitlabci1. None of them helped.

As now it is easy to roll back versions I also tried with my first suspect (librem5-devkit-base) but that didn’t help either.

For now, the only way to charge the phone at a reasonable speed is to boot with it already plugged to the charger. Otherwise, although the red LED is on, it will barely charge.

1 Like

@angus.ainslie ^^^^

It sounds like you may have an issue with the CC lines that control the USB power delivery negotiation.

If you share the entire dmesg ( or email it to me if you don’t want to paste it here angus.ainslie@puri.sm ) we might be able to figure it out.

Also does the TPS6592 have the correct firmware ?

purism@pureos:~$ sudo cat /sys/kernel/debug/tps6598x/0-003f/customer_use
0x4c35445000000200

Have you tried the USB C plug in both orientations ?

I have just sent you 2 different dmesg. Hopefully there is something helpful there.

The following output is what get when booting uplugged:

purism@pureos:~$ sudo cat /sys/kernel/debug/tps6598x/0-003f/customer_use
cat: /sys/kernel/debug/tps6598x/0-003f/customer_use: No such file or directory

In fact, there is no /sys/kernel/debug/tps6598x.

If the phone is plugged from the beginning then I get 0x4c35445000000200. I flashed that version when I was on amber to fix charging with my usb-c hub (it worked great until this issue appeared).