Battery gauge issue (mainline kernel)
#1
Hello,

I'm trying to use Debian on a Pinebook Pro using the official bullseye installer.  (I'm aware of the unofficial installer!)

Mostly, it works quite well! For the record:
 * the installer created an additional partition (dummy partition to protect the bootloader, maybe?) that confused u-boot; deleting the partition fixed the problem (I plan to reproduce the unofficial installer's nice partition scheme later);
 * the screen remains blank (I installed using a serial cable) because the kernel gets confused by the video + usb-c port; this can be worked around by removing
Code:
&cdn_dp {
    status = "okay";
};
from the .dts (in the kernel sources), rebuilding the .dtb, and inserting the .dtb in /etc/flash-kernel/dtbs. (Information from https://www.reddit.com/r/PINE64official/...ne_kernel/ );
 * the battery gauge is not working (this is the reason for this post);
 * there is something wrong with the audio output, which I have not investigated (the uart/audio switch is set to uart, for serial output, it would make sense to try setting it to audio first).

From dmesg, I see a few messages related to the battery gauge:
Code:
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.10.0-3-arm64 (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.1) #1 SMP Debian 5.10.13-1 (2021-02-06)
[    0.000000] Machine model: Pine64 Pinebook Pro
(snip)
[    7.150366] power_supply cw2015-battery: Not all required supplies found, defer probe
[    7.150384] cw2015 4-0062: Failed to register power supply
(snip)
(The two lines about cw2015 are repeated a few times, later.)

My understanding is that cw2015 support has been mainlined and should work with a mainline kernel.  I don't really understand what the "Not all required supplies found" message is about, but dmesg does not seem to have errors relating to the DC input not the USB-C input.  This is the only occurrence of "power supply" in these messages.

The same errors appear with the original .dtb file, so this is not a side effect of the above change.

Do you know what is causing the cw2015 driver to fail?  Any suggestion for a fix or workaround would be highly appreciated!

Best regards,
Lionel
  Reply
#2
Answering my own post: this was caused by missing drivers in the Debian kernel: enabling CONFIG_TYPEC_FUSB302 (requires CONFIG_TYPEC and CONFIG_TYPEC_TCPM) and CONFIG_SND_SOC_ES8316 makes the type-c port, battery gauge and audio work.

This is currently fixed in Debian sid (from version 5.10.38-1 of linux-image-amd64).

One remaining oddness is that the usb-c port does not always work in all orientations: reversing the usb connector can make a usb device work.  Does anyone understand why this is happening?
  Reply
#3
(05-22-2021, 03:58 AM)lfourquaux Wrote: Answering my own post: this was caused by missing drivers in the Debian kernel: enabling CONFIG_TYPEC_FUSB302 (requires CONFIG_TYPEC and CONFIG_TYPEC_TCPM) and CONFIG_SND_SOC_ES8316 makes the type-c port, battery gauge and audio work.

This is currently fixed in Debian sid (from version 5.10.38-1 of linux-image-amd64).
I believe you meant `linux-image-arm64`. What's your experience with it so far? I've seen some instability around WiFi - device likes to disappear out of the blue, haven't noticed any pattern yet. With xmixahx's 5.8.x I had it disappear only occasionally after deep sleep, but with 5.10.0-7 of Debian it can sometimes disappear in the middle of my typing up a message in IM.

(05-22-2021, 03:58 AM)lfourquaux Wrote: One remaining oddness is that the usb-c port does not always work in all orientations: reversing the usb connector can make a usb device work.  Does anyone understand why this is happening?
AFAIK Type-C is not perfectly reversible, and that was brought up before. Somebody on these forums even referred to the USB-C spec not guaranteeing 100% reversible connection. Which seems to me to defeat the purpose, but oh well. I haven't spent enough time reading the spec to tell whether it is an issue with the hardware spec or if it is a software (driver) issue.
This message was created with 100% recycled electrons
  Reply
#4
(05-22-2021, 09:53 AM)moonwalkers Wrote: I believe you meant `linux-image-arm64`.

Indeed!

(05-22-2021, 09:53 AM)moonwalkers Wrote: What's your experience with it so far? I've seen some instability around WiFi - device likes to disappear out of the blue, haven't noticed any pattern yet. With xmixahx's 5.8.x I had it disappear only occasionally after deep sleep, but with 5.10.0-7 of Debian it can sometimes disappear in the middle of my typing up a message in IM.

Very good experience overall.  Regarding WiFi, it has been very stable for me, though a bit slow (the Pinebook Pro has 1 stream only; even my phone has 2).

I have read on the Pine64 wiki that 2.4GHz WiFi may be unstable.  I have mostly, but not exclusively, used 5GHz networks.  (FWIW, I used iwd to configure the WiFi adapter.)

The remaining pain point is audio input.  The builtin microphone seems very poor, but I also had poor sound quality with a usb mic that worked fine on another computer.  I'm still experimenting and it may be only a software misconfiguration.

(05-22-2021, 09:53 AM)moonwalkers Wrote: AFAIK Type-C is not perfectly reversible, and that was brought up before. Somebody on these forums even referred to the USB-C spec not guaranteeing 100% reversible connection. Which seems to me to defeat the purpose, but oh well. I haven't spent enough time reading the spec to tell whether it is an issue with the hardware spec or if it is a software (driver) issue.

Thanks for these informations!
  Reply
#5
What software are you using to record audio?
I use a RØDE NT-USB Mini with SimpleScreenRecorder and I it works like a charm.
I haven't tried to use it with video conferencing, as you need to keep the RØDE very close to your mouth.

This is an example of how it sounds.
https://youtu.be/XN7ZEmgVBzA
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  kernel module that supports usb-c hdmi alexandre 13 6,763 06-26-2022, 02:22 AM
Last Post: alexandre
  bootloader menu to pick a kernel - what is the current situation in in early 2022? maxtothemax 4 1,152 02-05-2022, 03:04 PM
Last Post: maxtothemax
  Kernel panics solostian 17 6,636 01-26-2022, 08:08 AM
Last Post: TRS-80
  Kernel 5.17 will improve VP9 support? jiyong 1 957 01-16-2022, 08:26 PM
Last Post: xmixahlx
  Solution for issue with 'panfrost' module not initializing due to missing dependency cobratbq 0 626 12-02-2021, 05:26 PM
Last Post: cobratbq
  How to mainline kernel on daniel thompson's debian installer? hellojack 6 2,285 11-16-2021, 02:41 PM
Last Post: TRS-80
  red/green power led not working with kernel 5.14 alchemist 4 1,801 11-04-2021, 04:09 AM
Last Post: alchemist
  Sound stuttering on Manjaro gnome after latest kernel upgrade? pjsf 0 1,036 07-13-2021, 10:37 PM
Last Post: pjsf
  Kernel panic on boot with danielt's Debian installer hjalfi 11 6,044 07-09-2021, 08:52 AM
Last Post: moonwalkers
  Kernel crash on Manjaro ARM mfashby 0 908 07-06-2021, 03:17 PM
Last Post: mfashby

Forum Jump:


Users browsing this thread: 1 Guest(s)