PINE64
Keyboard Case Power Management Daemon - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone Pro (https://forum.pine64.org/forumdisplay.php?fid=177)
+--- Forum: PinePhone Pro Software (https://forum.pine64.org/forumdisplay.php?fid=179)
+--- Thread: Keyboard Case Power Management Daemon (/showthread.php?tid=16124)

Pages: 1 2


Keyboard Case Power Management Daemon - estokes - 02-18-2022

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.


RE: Keyboard Case Power Management Daemon - CharlieGordon - 02-18-2022

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.


RE: Keyboard Case Power Management Daemon - xnopasaranx - 02-19-2022

Oh very cool indeed! I need to build and try this... could be running it in a screen session for now.


RE: Keyboard Case Power Management Daemon - estokes - 02-20-2022

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


RE: Keyboard Case Power Management Daemon - TRS-80 - 02-22-2022

I was going to thank you for sharing this, but there is actually no LICENSE/COPYING file in the repo. Wink


RE: Keyboard Case Power Management Daemon - estokes - 02-22-2022

It's MIT licensed, I'll update it.


RE: Keyboard Case Power Management Daemon - robocone - 03-27-2022

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



RE: Keyboard Case Power Management Daemon - estokes - 03-27-2022

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'


RE: Keyboard Case Power Management Daemon - estokes - 04-16-2022

(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


RE: Keyboard Case Power Management Daemon - PineFLOWn - 04-16-2022

(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.