KB: Phone not/barely charging from power supplies when keyboard is not full
#1
I really love the keyboard case so far, now my Pinephone truly is the perfect pocket-sized computer! This is what “phones” should be like! The only inconvenience I’m trying to solve right now is the charging priority/behaviour with a power supply plugged in. (Just so you know: The phone’s USB port is covered up, the current limit of keyboard battery -> phone is set, the userspace driver is installed.)

Previously, I only owned a 5V 1A power supply. It charged the KB+PP fine (apparently at around 1.2A) and didn’t get too hot. The problem/inconvenience is that the priority of the keyboard charging chip seems to be keyboard battery > phone > phone battery. This means that the phone doesn’t receive any power from the power supply while the keyboard is charging, and only receives power once the keyboard is (almost) full, resulting in the phone battery percentage continuing to drop for the multiple hours it took my 1A supply to charge the keyboard battery. Since a 5V 3A PD supply is recommended, I thought that those might be enough to charge both batteries at the same time, which I believe the charging chip is supposed to be able to do.

To test this theory, which is mine, I asked around for 5V 3A supplies and C-C cables I could borrow. Apparently these are not common at all, at least among the people I know in real life. Two 5V 3A supplies I tested indeed resulted in both batteries charging and the phone’s percentage going up. According to /sys readings, the keyboard battery was getting 2.3A, the phone battery 0.8A and I assume the phone parts an additional 0.2A, which seems to be what it uses with the screen off and low workloads. However, shortly after plugging in one of these chargers, the keyboard charging chip started continuously shutting itself off and on again about once per second, as if I were spamming the side button. Since the current values seem to add up to more than 3A, I assumed that these power supplies were supplying too much power and the charging chip was shutting itself off as a safety measure. I noticed that neither of the supplies mentioned PD anywhere on them, which I guess means that PD is mandatory.

So I got this power supply and this C-C cable, which seem to charge the keyboard battery at around 2.4A, so twice as fast as the old supply which is great and also halves the time until the phone finally gets to receive power, but the phone still doesn’t get any power when the keyboard battery is not full yet. A last series of tests I made involved combinations of my new supply and cable with a USB C charging port in a car (that seems to support PD as it worked fine) and its C-C cable. These tests apparently showed that both power supplies have the same behaviour, but the cables differ. My cable charged with only 2.4A in the car as well, but the other person’s cable, in either supply, supplied the keyboard battery with 2.4A and additionally the phone battery with 0.4A, plus assumingly 0.2A for the phone itself (is there a way to read that value if it exists as I assume?). Which adds up to exactly 3A. I guess that means my cable for some reason only passes through 2.4A, even though it supposedly supports up to 60W (what cable would I have to get that works as intended?).

So 5V 3A PD supplies seem to work in general, but the keyboard still eats up 2.4A first with its highest priority, only leaving the phone with 0.6A. Which is enough to keep the battery percentage constant with the screen on at low loads, so that would at least mostly prevent the phone battery from completely discharging before it has reached its turn, as was the case previously. But of course it would be best if I could somehow influence how much the phone gets. The userspace driver seems to only allow toggling power supply input as a whole and keyboard battery -> phone charging, which is very useful but doesn’t help with this inconvenience. I also found /sys/class/power_supply/ip5xxx-charger/constant_charge_current (and _max) which is set to 2300000 (and 3100000). Would changing this value, say to 2000000 or 1800000, reduce the amount of power the keyboard battery takes and therefore pass through more to the phone? Or is there anything else I could do?

And as I said: This is only a minor inconvenience, especially with proper 5V 3A input (if I’m able to get a cable that works). I can live with it being like this. That’s a very small price to pay for this incredible device. Thanks to everyone involved, especially to Megi! But it would be nice to know if there is a way.

And sorry for this being so long, I tend to ramble on a lot. Maybe I shouldn’t have included so many details from my findings.
TLDR: Is there a way to change how much power the phone gets from a power supply while the keyboard battery is also charging and not full yet?
  Reply
#2
My results are a bit different, but I have only been running my keyboard on Mobian since I got it.
I discovered I need to turn off my keyboard separate from turning off the phone,
To turn off the keyboard battery the amount of time to hold the keyboard power button seems to vary for me from about 4 to 13 seconds,
but in settings ==> Power I can see when the phone battery says 'charging' or 'discharging'...

Several times after turning off the phone over night with both batteries showing 100%
I restarted in the morning to find the keyboard once at 0% and the phone battery 93 - 95%,
another time - keyboard at 83% - phone at 99%

The phone seems to "see" the keyboard battery as a charger with my OS
When I first got the keyboard it was hard to charge, but recent OS updates have improved the charging greatly.

These are my current readings, they have changed and improved since I first got the keyboard,
But since this is beta hardware, software, and firmware, it can change drastically with a single update.

Why is your phones usb port covered ?

The phone is 1.2a convergence edition running Mobian from a sd card.
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team
  Reply
#3
(03-19-2022, 07:07 AM)bcnaz Wrote: My results are a bit different, but I have only been running my keyboard on Mobian since I got it.
I discovered I need to turn off my keyboard separate from turning off the phone,
To turn off the keyboard battery the amount of time to hold the keyboard power button seems to vary for me from about 4 to 13 seconds,
but in settings ==> Power  I can see when the phone battery says 'charging' or 'discharging'...

Occasionally I have to hold the keyboard button longer to shut it off, but most of the time a quick double press works. My OS also always recognises the phone to be in a charging state whenever the keyboard battery is switched on or there is a power supply plugged into the keyboard, even if it’s not actually getting any power yet while the keyboard battery is charging. Since deactivating the keyboard charging chip with the button also leaves one unable to get any readings from the battery (and spams TTY with error messages), I usually use the userspace driver instead to toggle the keyboard battery charging the phone with ppkb-i2c-charger-ctl power-off. That way I can still read the keyboard battery values while the phone is neither charging from it nor in a charging state that inhibits sleep. Though I usually activate sleep manually whenever I’m done for maximum battery life.

(03-19-2022, 07:07 AM)bcnaz Wrote: Several times after turning off the phone over night with both batteries showing 100%
I restarted in the morning to find the keyboard once at 0% and the phone battery 93 - 95%,
another time - keyboard at 83% - phone at 99%

The keyboard completely draining over night only happened to me like once when it was not connected to a power supply and the phone battery was low with the phone switched on instead of off or sleeping, therefore consuming the keyboard’s battery over night and never going into sleep mode. The times when your batteries discharged so much over night sounds more like the phone was active and doing power intensive things. Only losing 20 % keyboard battery charge sounds more sensible, but still a little much. By turning the phone off, do you mean fully shutting it down or merely turning the screen off? Only turning the screen off and the keyboard battery losing charge sounds like the keyboard was supplying the phone and therefore inhibiting sleep and using a lot more power than it had to. Turning keyboard -> phone charging off via the hardware button or command or manually activating sleep with systemctl suspend could help with that.

(03-19-2022, 07:07 AM)bcnaz Wrote: But since this is beta hardware, software, and firmware, it can change drastically with a single update.

That’s true. What I’m wondering is if the keyboard battery > phone charging priority with power supplies is an unchangeable hardware property of the current model or if I or possible software updates could influence it.

(03-19-2022, 07:07 AM)bcnaz Wrote: Why is your phones usb port covered ?

To prevent me (or unsuspecting other people) from accidentally plugging in a power supply there and frying the keyboard charging chip. That way I can simply plug it in and don’t have to quadruple-check and worry about using the right port and my flat bursting into flames. That usually only happens when I cook.
  Reply
#4
I am still using a Pine 1.2a convergent phone (stand alone) as my daily driver,

I have my keyboard on another 1.2a convergent phone that is solely for testing, -  ((the "overnight" may have been a few days))

I also have a new Explorer Pro, and while I am satisfied  with the Pro's software progress,  I do still consider it to be "Testing"
and I do think it is a bit early for me to couple it with the new keyboard.

Interesting to compare our experiences, but even if both our operating systems were near perfect,
 they are bound to have some differences, as we are using different operating systems... 
--- (if someone tries the keyboard on a phone with a flaky OS they WILL be disappointed)   Sad

Mobian has suspend working pretty dependably on the original Pine phones, but on the Pro series,
my Pro freezes everytime it suspends. (latest release + updated)

I did read a warning about the multiple chargers,  -- "Yes we should use the keyboard usb port to charge".
* However my  'take'  on that  -  was --  "NOT to connect 2 chargers to your phone."
I don't think it will damage your phone if you plug a charger into the phones usb port,  -  " just it may not behave properly".

Yes, in actual use there appears to be a lot of difference in current carrying ability of the different charging cables,
I do like the cable they ship with, --  just it can be a little too short sometimes.

I too, am very pleased with my new keyboard, and being able to turn a phone into a mini-laptop.
--- (it may be a bit large to carry in your pocket to use as an everyday daily use phone ?)

I think I have tried all the popular OS's on these phones to educate myself and stay up with everything, and will continue
testing, but I picked Mobian for my daily use phone.

Eventually I will probably go back to being  --  'just a phone User' -- 
***  I have probably spent too much time and $$ playing with these phones, and browsing/studying the forum.
*** ( 1) Brave Heart,  3) 1.2a convergent,  1) 1.2b convergent,  and  1)Explorer Pro ***

But it has Sure been exciting and FUN    Big Grin
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team
  Reply
#5
It’s been exciting and fun indeed!

(03-19-2022, 07:36 PM)bcnaz Wrote: I did read a warning about the multiple chargers,  -- "Yes we should use the keyboard usb port to charge".
* However my  'take'  on that  -  was --  "NOT to connect 2 chargers to your phone."
I don't think it will damage your phone if you plug a charger into the phones usb port,  -  " just it may not behave properly".

Connecting 2 chargers at the same time is probably even worse, but the manual and more clearly the wiki and Megi’s blog mention that one charger in the phone port is bad as well. In the Arch Mobile and Pinephone Matrix rooms I’ve seen people get warned about this and told to cover the port up to be safe many times and I believe on Twitter I saw someone posting a photo of their PP+KB with a charger plugged into the phone and Pine64 replied that that shouldn’t be done, and the person replied that fortunately nothing seems to have been damaged as the pins hadn’t connected properly. I guess the pin connection issue also has its upsides. Fortunately I was able to solve that issue simply by inserting the phone differently. I hope that’ll work next time I’ll re-insert it as well.

(03-19-2022, 07:36 PM)bcnaz Wrote: Yes, in actual use there appears to be a lot of difference in current carrying ability of the different charging cables,
I do like the cable they ship with, --  just it can be a little too short sometimes.

I don’t use the A to C cable shipped with my Pinephone since that one only seems to deliver 0.3A or something, which was confirmed by giving the cable to someone with a regular modern smartphone that then displayed something about very low power input. I guess I just have bad luck with USB cables.

(03-19-2022, 07:36 PM)bcnaz Wrote: I too, am very pleased with my new keyboard, and being able to turn a phone into a mini-laptop.
--- (it may be a bit large to carry in your pocket to use as an everyday daily use phone ?)

It does fit into my pockets, it’s a bit tight especially with one pair of pants but it works.
  Reply
#6
Thanks for sharing the input & link  Exclamation
I've read a bit on the keyboard,  --  previously I had read  "no powered devices plugged into the phones usb while charging with keyboard/phone"

I have not used it just by chance,  ---  now I will not use it by choice.

Sorry to hear your Pine charging cable is not up to parr.

I have 6 of them now, one with each Pine phones I have bought, all of them seem to be passing the full current.
  (I do have some other cables that do noticeably restrict the current,  especially the 10 foot cable)
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team
  Reply
#7
Greetings,

I'm also a mostly-contented owner of a PinePhone + Keyboard. I've had similar problems/a query and was glad to see someone else has opened the discussion as well!

So my problem. I'm aware that the docs/wiki say when the KB is attached I shouldn't use the PinePhone's USBC port to charge the device. I've refrained from doing so since attaching the keyboard.

However since then, my PinePhone (and presumably the keyboard too) have drained their batteries and the PinePhone will not power on. I tried charging the Keyboard for many hours then pressing the on/off button on the keyboard. Still, when I press the power button on the pinephone nothing happens, it does not power on.

In short: I'm wondering how to recharge and power on my PinePhone after both batteries have completely drained. I would like to avoid detaching the keyboard as I'm afraid repeated attaching then detaching will damage the keyboard.

My charger outputs 5V/2.4A, though I have other chargers that supply 5V/3A and I will try these after reading the earlier posts in this thread. I have been using the Pine64 USB->USBC cable to charge these previously.

Until then, I would greatly value anyone's wisdom.

Best,
R-T-G.
there will be no peace when they release the geese

my homepage
  Reply
#8
(03-27-2022, 02:54 PM)ReleaseTheGeese Wrote: Greetings,

I'm also a mostly-contented owner of a PinePhone + Keyboard. I've had similar problems/a query and was glad to see someone else has opened the discussion as well!

So my problem. I'm aware that the docs/wiki say when the KB is attached I shouldn't use the PinePhone's USBC port to charge the device. I've refrained from doing so since attaching the keyboard.

However since then, my PinePhone (and presumably the keyboard too) have drained their batteries and the PinePhone will not power on. I tried charging the Keyboard for many hours then pressing the on/off button on the keyboard. Still, when I press the power button on the pinephone nothing happens, it does not power on.

In short: I'm wondering how to recharge and power on my PinePhone after both batteries have completely drained. I would like to avoid detaching the keyboard as I'm afraid repeated attaching then detaching will damage the keyboard.

My charger outputs 5V/2.4A, though I have other chargers that supply 5V/3A and I will try these after reading the earlier posts in this thread. I have been using the Pine64 USB->USBC cable to charge these previously.

Until then, I would greatly value anyone's wisdom.

Best,
R-T-G.

I also had inability to power the pp using the keyboard usb-c port. I resolved it by using a shim. Search this forum for 'shim' and you should see posts about where to place the shim. I used folded slightly this paper as the shim.

I like the keyboard. I use it until I have to take the pp phone out of the keyboard case and remove the pp battery and put it back into the pp. After about a week or two of using the pp with the keyboard, the phone won't turn on and this is the fix.

The keyboard is okay. I wish the keyboard battery last longer. For me, I get about 50% longer use time with the keyboard battery. It is not long enough for me to use the keyboard because of the battery in the keyboard. Perhaps a future  software  update will help lengthen the battery time when using the keyboard.
  Reply
#9
(03-27-2022, 02:54 PM)ReleaseTheGeese Wrote: Greetings,

I'm also a mostly-contented owner of a PinePhone + Keyboard. I've had similar problems/a query and was glad to see someone else has opened the discussion as well!

So my problem. I'm aware that the docs/wiki say when the KB is attached I shouldn't use the PinePhone's USBC port to charge the device. I've refrained from doing so since attaching the keyboard.

However since then, my PinePhone (and presumably the keyboard too) have drained their batteries and the PinePhone will not power on. I tried charging the Keyboard for many hours then pressing the on/off button on the keyboard. Still, when I press the power button on the pinephone nothing happens, it does not power on.

In short: I'm wondering how to recharge and power on my PinePhone after both batteries have completely drained. I would like to avoid detaching the keyboard as I'm afraid repeated attaching then detaching will damage the keyboard.

My charger outputs 5V/2.4A, though I have other chargers that supply 5V/3A and I will try these after reading the earlier posts in this thread. I have been using the Pine64 USB->USBC cable to charge these previously.

Until then, I would greatly value anyone's wisdom.

Best,
R-T-G.

As drh said, that sounds like your pins are not connecting so your phone doesn’t get any power from the keyboard at all. That initially was the case for me as well, keyboard input worked (though it also had short periods of not working) but power input only worked when I pressed against the screen where the pins are located. Try to either use the aforementioned shim method, or alternatively what worked for me is inserting the phone into the case differently. I interpreted the official instructions as having to put the long side with the volume buttons in first, but I found a post on Reddit that suggested inserting the short side with the cameras and headphone jack first and then firmly squeezing the phone in, starting from the headphone side working towards the microphone side and especially also applying pressure to the middle where the pins are and not only to the edges. This supposedly inserts it properly instead of the plastic clip thingy next to the pins pushing the pins away from the contacts which would be counteracted by a shim. And it worked for me as well. Power and keyboard input have worked flawlessly since.

I believe the keyboard charging chip activates automatically when a power supply is plugged in, so pressing the keyboard button isn’t necessary in that case. Since you’ll have to take the phone out of the case for the shim or insert methods anyway, I suggest taking it out, charging it to full by itself and then attempting to solve the pin connection issue. That way you can immediately turn the phone on after putting it in and tell if the pins are connecting by checking if the phone says it’s charging instead of being uncertain because the phone won’t turn on.

(03-28-2022, 01:15 AM)drh Wrote: The keyboard is okay. I wish the keyboard battery last longer. For me, I get about 50% longer use time with the keyboard battery. It is not long enough for me to use the keyboard because of the battery in the keyboard. Perhaps a future  software  update will help lengthen the battery time when using the keyboard.

For me the keyboard battery is enough for one full additional charge of the phone battery and then another small charge of up to 30%, depending on the circumstances. The phone of course continues to consume power while it’s charging from the keyboard battery, so that has to be entered into the equation as well, but it still feels like less than the supposed additional 200%. Or maybe electricity doesn’t work this way, I have no idea. Or future updates will improve it. Either way, I definitely consider the additional charge I get to be enough so far, thanks to the keyboard I haven’t had issues with not enough battery capacity as I had before.

Except of course for the power supply charging behaviour I mentioned in my original post, but I have a cable that transfers the full 3A now, so with it plugged in, the phone’s charge at least stays constant now at low loads until the keyboard battery is done charging instead of continuing to drain. So unless I have to do something that’s more power intensive than simpler terminal stuff while both batteries are low, I’ll be good. Still, I really wonder if setting /sys/class/power_supply/ip5xxx-charger/constant_charge_current to something lower would improve this, it seems to me that it might, but I have no experience with this type of stuff and I’m afraid I could damage something if I play around with these values. So I won’t try that until someone can tell me if it’s a good idea.
  Reply
#10
You can manually control how much current each battery gets. The kb battery has a current limit exposed in sysfs,

/sys/class/power_supply/ip5xxx-charger/constant_charge_current

By default it is 2.3 amps, which seems to be about all the usb interace can muster. If you lower it to something like 1.5amps, then you can raise the limit on the internal battery, and the current will be shifted the the internal battery. If you don't feel like doing this manually I've written a daemon that manages the interaction between the main battery and the kbd battery, available here https://github.com/estokes/pinephone-kbpwrd
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Searching for a PinePhone Keyboard Case RubiksCube 1 597 10-07-2024, 11:08 PM
Last Post: tllim
  So which keyboard you suggest for the Pinephone? Peter Gamma 21 4,668 07-19-2024, 08:05 AM
Last Post: Peter Gamma
  Rii mini 4 keyboard and touchpad work over Bluetooth Peter Gamma 0 390 07-19-2024, 08:02 AM
Last Post: Peter Gamma
  Bring the Pinephone keyboard back, it is worth it! Peter Gamma 1 752 07-04-2024, 07:32 AM
Last Post: Kevin Kofler
Heart The Pinephone keyboard offers alternative layouts Peter Gamma 0 287 07-04-2024, 05:40 AM
Last Post: Peter Gamma
  Keyboard & 2.4G usb dongle for the Pinephone? Peter Gamma 2 902 06-29-2024, 09:36 PM
Last Post: Peter Gamma
  Bluetooth keyboard with trackpad Zebulon Walton 11 11,202 06-29-2024, 04:09 AM
Last Post: Peter Gamma
  Was someone able to use the Pinephone keyboard & an usb mouse at the same? Peter Gamma 4 2,288 06-26-2024, 07:11 AM
Last Post: dachalife
Exclamation USB mouse isn't working when a PP keyboard is attached? mikeb 6 2,476 06-25-2024, 12:10 AM
Last Post: Peter Gamma
  keyboard case charging but not typing new2pinephone 18 8,628 02-19-2024, 07:30 AM
Last Post: theResonant

Forum Jump:


Users browsing this thread: 4 Guest(s)