PINE64
Pinephone Pro will not shut down when peripheral connected - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone Pro (https://forum.pine64.org/forumdisplay.php?fid=177)
+--- Forum: General Discussion of PinePhone Pro (https://forum.pine64.org/forumdisplay.php?fid=178)
+--- Thread: Pinephone Pro will not shut down when peripheral connected (/showthread.php?tid=18170)



Pinephone Pro will not shut down when peripheral connected - flyfast32 - 04-26-2023

Hi all - hoping someone may be able to shed some light into a solution.  I have a Pinephone Pro connected to an Anker 6-in-1 usb hub.  Intermittent power is being provided through the anker hub.  It will be set up in a remote location to collect some weather data and powered by solar.  My goal is to have the pinephone shut itself down when the battery gets under 50%, then boot back up when power is applied.


The problem: A script can successfully tell the phone to shut down at the specified battery percentage, but the phone will instantaneously reboots as soon as the shutdown process is complete.  This happens when no power is present, but the hub is still plugged in.  I expect this when power is available, but it is a problem that it happens when power is absent as I need the device to shut down to conserve power for bootup.  This seems to happens when any device is plugged into the phone (flash drive, FTDI chip, pinehub, etc).


My theory is that the RK818 PMIC chip is misconfigured and is recognizing the phone's own OTG power as if it were power being passed in.  This then initiates the boot cycle.  Does this make sense?  Can anybody explain what is happening here, and any resolution?  I've seen some threads about a similar issue noted with the keyboard, but none with a resolution to this issue.


I've tried:

  - Mobian, Manjaro, and PostmarketOS and the behavior is consistent across all three.
  - Shutting down OTG power in mobian manually.  Peripherals shut down, but the phone still reboots after shutdown
  - Every type of cable known to humanity between the phone and the hub