Power Consumption on Suspend
#4
Thanks for the feedback!
I have tested this part thoroughly as well, and while there would be certainly a difference in turning the keyboard off, I could not measure one relevant enough (no power meter, simply battery consumption/X hours).
However, if this is a problem for you, I stumbled upon a solution you may find handy. You can turn the battery charging of the keyboard off programmatically, and turn it on again. Also, you can run scripts triggered right before and after suspend. This means that you would not have to do it manually.
For this to work, you will first need to compile the pinephone keyboard software:

sudo apt install -y php gcc make git i2c-tools
sudo systemctl disable apache2 && sudo systemctl stop apache2
git clone https://megous.com/git/pinephone-keyboard
cd pinephone-keyboard
make
sudo modprobe i2c-dev
echo i2c-dev | sudo tee -a /etc/modules
sudo cp build/ppkb-charger-ctl /usr/local/bin/
sudo /usr/local/bin/ppkb-charger-ctl info

After that, you can write a script that triggers this ppkb-charger-ctl power-off or similar (as root user, try around the commands)
by placing a bashscript in /usr/lib/systemd/system-sleep/ with something like

#!/bin/sh
if [ "${1}" == "pre" ]; then
# Do the thing you want before suspend here, e.g.:
/usr/local/bin/ppkb-charger-ctl power-off
elif [ "${1}" == "post" ]; then
# Do the thing you want after resume here, e.g.:
/usr/local/bin/ppkb-charger-ctl power-on
fi

The sleep/resume script is entirely untested, but I managed to control the keyboard with the commands from ppkb-charger-ctl.

Maybe that helps, you can ask if that interests you and you need more info Smile
  Reply


Messages In This Thread
Power Consumption on Suspend - by JudgeFudge - 07-17-2023, 03:00 PM
RE: Power Consumption on Suspend - by JudgeFudge - 07-24-2023, 08:28 AM
RE: Power Consumption on Suspend - by jakfish - 07-25-2023, 01:52 PM
RE: Power Consumption on Suspend - by JudgeFudge - 07-26-2023, 06:31 AM
RE: Power Consumption on Suspend - by jakfish - 07-26-2023, 12:23 PM
RE: Power Consumption on Suspend - by JudgeFudge - 07-27-2023, 08:48 AM
RE: Power Consumption on Suspend - by jakfish - 07-28-2023, 08:55 AM
RE: Power Consumption on Suspend - by JudgeFudge - 07-29-2023, 06:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to wake up from suspend xavi92 5 1,276 10-26-2023, 03:02 PM
Last Post: xavi92
  Suspend on ram user641 2 790 09-25-2023, 01:44 PM
Last Post: user641
  System won't suspend due to suspention notification user641 6 1,575 09-24-2023, 05:47 AM
Last Post: user641
  Chatty does not work after suspend mode user641 4 2,032 07-18-2023, 10:43 AM
Last Post: alaraajavamma
  Screen stay black unless power key pressed short freelectro 0 692 06-24-2023, 01:55 PM
Last Post: freelectro
  suspend inhibit no longer working jsch 3 2,076 10-23-2022, 09:20 AM
Last Post: LibrePhoneUser
  Suspend broken on the pp user641 0 879 04-08-2022, 04:18 PM
Last Post: user641
  Screen/display gets switched on by itself / Phone wakes up from suspend Anna 5 4,179 01-04-2022, 01:24 PM
Last Post: pothos
  Notification light when entering low power Barugon 5 3,571 11-22-2021, 06:20 AM
Last Post: beta-user
  Eliminate swiping/logging in when waking up from suspend? Zebulon Walton 5 4,209 08-13-2021, 06:15 PM
Last Post: Zebulon Walton

Forum Jump:


Users browsing this thread: 1 Guest(s)