Dunfell and PONKEY poweroff

Forums Reference, Evaluation, and Development Boards Dunfell and PONKEY poweroff

Viewing 3 reply threads
  • Author
    Posts
    • #12517
      coloradocarlos
      Participant

      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?

    • #12554
      Neeraj Dantu
      Moderator

      Carlos,

      I am testing right now. Will update once I have anything here.

      Best,

      Neeraj

    • #12559
      coloradocarlos
      Participant

      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.

      If HandlePowerKey=ignore, then run systemd-analyze to find out where it is set.

      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

      Then 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!

    • #12560
      Neeraj Dantu
      Moderator

      Thanks for the update!

      Best,

      Neeraj

Viewing 3 reply threads
  • You must be logged in to reply to this topic.