Forums › Reference, Evaluation, and Development Boards › Dunfell and PONKEY poweroff
I have a custom board that works with the PONKEY to poweroff the board with the Debian SDK.
I am migrating to dunfell and pressing the PONKEY no longer signals the system to power off the board. I have looked at the udev rules and systemd configuration files and they seem correct. The IRQ and event debugging indicates the key press is being recognized.
Any suggestions for troubleshooting this issue?
Carlos,
I am testing right now. Will update once I have anything here.
Best,
Neeraj
Sorry, I found the solution, I should have updated this topic with the fix.
Indeed systemd is controlling the power key event and needs to be changed to respond to poweroff.
To troubleshoot, first determine if the root user session is ignoring the power key.
1 | loginctl show-user |
If HandlePowerKey=ignore, then run systemd-analyze to find out where it is set.
1 | systemd-analyze cat-config systemd/logind.conf --no-pager |
The key is ignored in /lib/systemd/logind.conf.d/01-openstlinux.conf. Apparently, ST didn’t think it was a good idea to respond to a PONKEYn to poweroff a board. To override, create a file in /lib/systemd/login.conf.d/ named 02-osd32mp1-myboard.conf
1 2 | [Login] HandlePowerKey=poweroff |
Then restart systemd-logind:
1 | systemctl restart systemd-logind |
I fixed this in my own Yocto layer with a custom bbappend. Should this be changed in the Octavo layer? I don’t know. Depends on what you think the PONKEYn should do or not while the system is running.
One other gotcha. In the TF-A device tree, the STM32_PM_SHUTDOWN may not be honored. In other words, suspends but not a total poweroff and you encounter a watchdog timeout which reboots the board. The workaround is to emit a message to the console in stm32mp1_pm.c. See this link for details: https://github.com/Seeed-Studio/meta-st-odyssey/issues/5. Happy patching!
Thanks for the update!
Best,
Neeraj
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields