Keyboard Case Power Management Daemon
#1
Hi, I've made an attempt at writing the daemon Megi described in his blog post about the keyboard case. It's gone well enough that I thought it was time to share.

https://github.com/estokes/pinephone-kbpwrd

The focus is on maximizing efficiency by avoiding moving charge into the main battery where possible. I'm open to discussion, and especially feedback and data.
  Reply
#2
That's pretty cool.

Quote:At the moment it is only working on the pinephone pro, mainly because that is it's development platform, but also because the PPP has more need of it due to it's higher power consumption. I do plan to make it work on the pinephone at some point.

Please do.

Quote:Because this software runs as root, you should read it, or have someone you trust read it before running it. I know there have been malware incidents in the pine community recently. This isn't malware, but don't take my word for it!

Also very cool.
  Reply
#3
Oh very cool indeed! I need to build and try this... could be running it in a screen session for now.
  Reply
#4
I just released a new version that supports the original pinephone as well as the pro. Running i in a screen session is a great idea. Once I get more experience and data I'll write some systemd units so it can start automatically on startup
  Reply
#5
I was going to thank you for sharing this, but there is actually no LICENSE/COPYING file in the repo. Wink
Cheers,
TRS-80

What is Free Software and why is it so important for society?

Protocols, not Platforms

For the most Linux-y experience on your Linux phone, try SXMO!
  Reply
#6
It's MIT licensed, I'll update it.
  Reply
#7
I'm trying to run this but I get the error
Code:
[ERROR kbpwrd] error: Invalid cross-device link (os error 18) will retry

Also here is a simple systemd script that could start it

kbpwrd.service
Code:
[Unit]
Description=Pinephone (Pro) Keyboard power management daemon
[Service]
Type=simple
ExecStart=/usr/bin/kbpwrd
[Install]
WantedBy=sysinit.target
  Reply
#8
I have seen that error a few times when the pogo pins weren't making good contact, so perhaps that is the issue. The daemon just reads sysfs files, so you can easily check if you have the same problem when you read them manually.

an easy one to try is '/sys/class/power_supply/battery/capacity'
  Reply
#9
(02-18-2022, 02:40 PM)estokes Wrote: Hi, I've made an attempt at writing the daemon Megi described in his blog post about the keyboard case. It's gone well enough that I thought it was time to share.

https://github.com/estokes/pinephone-kbpwrd

The focus is on maximizing efficiency by avoiding moving charge into the main battery where possible. I'm open to discussion, and especially feedback and data.

Megi is integrating this functionality into the kernel (where it honestly belongs IMHO). As such my project is deprecated.

https://xnux.eu/log/#065
  Reply
#10
(04-16-2022, 04:17 PM)estokes Wrote:
(02-18-2022, 02:40 PM)estokes Wrote: Hi, I've made an attempt at writing the daemon Megi described in his blog post about the keyboard case. It's gone well enough that I thought it was time to share.

https://github.com/estokes/pinephone-kbpwrd

The focus is on maximizing efficiency by avoiding moving charge into the main battery where possible. I'm open to discussion, and especially feedback and data.

Megi is integrating this functionality into the kernel (where it honestly belongs IMHO). As such my project is deprecated.

https://xnux.eu/log/#065

Your contribution to the PinePhone project is much appreciated! Smile 

Though personally I've had no luck getting the Keyboard case working on the PPP, although it works fine on my original PP, I've tried the suggested trick of pushing the pins on the case slightly close to the pogo pins on the phone, but that has made no difference, I cant use either the keyboard functionality or the battery charging functionality.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Battery meter slowly reducing under keyboard charger robocone 0 31 09-23-2022, 10:19 PM
Last Post: robocone
  Manjaro 5.17.5-1 Keyboard stopped working Yst 7 1,180 06-09-2022, 11:12 AM
Last Post: graphicpanda444
  Fix keyboard layout robocone 1 526 05-16-2022, 08:03 AM
Last Post: robocone
  Screen keyboard Japanese input issue Yst 1 368 04-30-2022, 09:13 PM
Last Post: TRS-80
  PackageKit daemon has crashed dgiffin 10 2,592 03-22-2022, 05:02 PM
Last Post: S H
  Howto Full disk encryption manjaro and detached header (with keyboard) robocone 0 638 03-09-2022, 06:53 AM
Last Post: robocone
  Keyboard stopped working -- big problem tckosvic 15 2,882 02-06-2022, 02:04 PM
Last Post: Emilio

Forum Jump:


Users browsing this thread: 1 Guest(s)