poweroff/shutdown on a Pi 400 can stall

Open
#3,941 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, linux

Research direction

Start by reviewing commit 63bd88ba88650a34ba10006aa2722b1f699e34ad and the mailbox GET/SET path described in the report. Reproduce the intermittent Pi 400 shutdown stall, then verify that poweroff completes reliably without leaving the display active.

Written by the indexing model from the issue text.

Description

The most recent firmware release (https://github.com/raspberrypi/firmware/commit/0c3ecac52e4ef4dde82e6261b917fd77a884be37) prevents Pi 400 from powering off reliably - there's at least a 50% chance that it will stall with the display still active. Pi 400 bypasses the usual watchdog-based poweroff mechanism and uses one of the GPIOs on the expander to trigger a full power down. Control of the expander is via mailbox calls, and in the failure case the first of two mailbox methods (the GET from the GET/SET pair) appears not to be completing.

Although suspicion first fell on the recent tryboot changes, either in the firmware or in the kernel, these appear not to be the cause. sudo SKIP_KERNEL=1 rpi-update exonerated the firmware changes, and choosing a few strategic commits to test turned my attention to the 408 upstream commits. A few hours of bisecting later (which took two attempts due to the probabilistic nature of the failure) pointed the finger of suspicion at 63bd88ba88650a34ba10006aa2722b1f699e34ad - which makes sense as it is a mailbox-related change.

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.