Power Off / Reset Buttons - DietPi - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4) +--- Forum: Pine A64 Hardware, Accessories and POT (https://forum.pine64.org/forumdisplay.php?fid=32) +---- Forum: POT modules (https://forum.pine64.org/forumdisplay.php?fid=8) +---- Thread: Power Off / Reset Buttons - DietPi (/showthread.php?tid=1999) |
Power Off / Reset Buttons - DietPi - casmiguefl - 08-11-2016 Hi! My pine arrived a couple days ago. I'm loving this little beast. I have a couple trigger buttons laying around and I'd like to use one for the power off and other for the reset but I have no idea if the system is actively listening to the circuit of both these buttons. I tried them on and nothing. Any tips? Currently running DietPi as the OS. Thanks! RE: Power Off / Reset Buttons - DietPi - xalius - 08-11-2016 Reset is just a hardwired hardware reset, the power button is wired to the PMIC (Power Management IC) and has the usual power-on, soft-off and hard-off function depending on how long you press it. The PMIC sends an interrupt to the A64 when the Power button is pressed and you can read/write registers on the PMIC to configure the behavior a bit. In linux the powerbutton is also a event device (think /dev/input/eventXXX) and you can watch for those events with a tool like evtest ... on my Ubuntu images with Mate Desktop the power button brings up the normal Reboot/Shutdown menu, so I guess they already wired up some udev rules for that... For reference see: http://files.pine64.org/doc/Pine%20A64%20Schematic/a64-db-rev%20b-20151217-Plus-Release.pdf http://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf RE: Power Off / Reset Buttons - DietPi - casmiguefl - 08-11-2016 (08-11-2016, 03:46 PM)xalius Wrote: Reset is just a hardwired hardware reset, the power button is wired to the PMIC (Power Management IC) and has the usual power-on, soft-off and hard-off function depending on how long you press it. The PMIC sends an interrupt to the A64 when the Power button is pressed and you can read/write registers on the PMIC to configure the behavior a bit. In linux the powerbutton is also a event device (think /dev/input/eventXXX) and you can watch for those events with a tool like evtest ... on my Ubuntu images with Mate Desktop the power button brings up the normal Reboot/Shutdown menu, so I guess they already wired up some udev rules for that... Thank you very much for the clarification, I'll give that a look and luckily make it able to shutdown. Right now either of them does nothing at all! It is indeed in the /dev/input/event1. When the button is pressed, weird characters are written to it. Any idea on how I can make it so when the button is pressed "init 0" command is executed? Total noob to udev rules RE: Power Off / Reset Buttons - DietPi - pfeerick - 08-11-2016 (08-11-2016, 04:12 PM)casmiguefl Wrote:(08-11-2016, 03:46 PM)xalius Wrote: Reset is just a hardwired hardware reset, the power button is wired to the PMIC (Power Management IC) and has the usual power-on, soft-off and hard-off function depending on how long you press it. The PMIC sends an interrupt to the A64 when the Power button is pressed and you can read/write registers on the PMIC to configure the behavior a bit. In linux the powerbutton is also a event device (think /dev/input/eventXXX) and you can watch for those events with a tool like evtest ... on my Ubuntu images with Mate Desktop the power button brings up the normal Reboot/Shutdown menu, so I guess they already wired up some udev rules for that... This most might be of use. Be warned... my OS of choice is Debian, if that makes an difference. RE: Power Off / Reset Buttons - DietPi - casmiguefl - 08-12-2016 (08-11-2016, 07:18 PM)pfeerick Wrote:(08-11-2016, 04:12 PM)casmiguefl Wrote:(08-11-2016, 03:46 PM)xalius Wrote: Reset is just a hardwired hardware reset, the power button is wired to the PMIC (Power Management IC) and has the usual power-on, soft-off and hard-off function depending on how long you press it. The PMIC sends an interrupt to the A64 when the Power button is pressed and you can read/write registers on the PMIC to configure the behavior a bit. In linux the powerbutton is also a event device (think /dev/input/eventXXX) and you can watch for those events with a tool like evtest ... on my Ubuntu images with Mate Desktop the power button brings up the normal Reboot/Shutdown menu, so I guess they already wired up some udev rules for that... Thank you very much! That actually seems like it will work perfectly. |