"press any key to shutdown" after successful flash
- Dominant language
- JavaScript
- Stars
- 20
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
We've had two cases now of good devices getting flashed all the way to the success screen, then end up on "press any key to shutdown."
**#1 [trey during EPHOT](https://commadotai.slack.com/archives/C083F1BGMJR/p1763613445880719?thread_ts=1763610319.466649&cid=C083F1BGMJR)**
* flashed an EPHOT mici with 435fa2da43c8f67812f61314058f5462e1d8c014
* ended up with "press any key to shutdown"
* changed cable, flashed again, and it was fine
**#2 [Apolloyaya on Discord](https://discord.com/channels/469524606043160576/1436852432503046294/1454163202882670615)**
* flashed a good comma four with 4e577e16495930a468430d1ba247d389c5dbf2c9
* immediately ended up with "press any key to shutdown"
* flashed 2x more time with same version
* tried this a few things on https://github.com/commaai/flash/pull/184, same result
* debug dump after a few attempts on the branch [dump.txt](https://github.com/user-attachments/files/24352156/dump.txt)
* slot is marked as `unbootable`, unclear why it's not reproducible or deterministic though
* update: fixed after changing cables and reflashing with https://github.com/commaai/flash/pull/184 on b3186ab9831fa6da32696f324bad21e25e4d20ab
```
Alright we got it successfully flashed. It was the usb-c cable but it was not the data one. Turns out my pc usbc doesn't supply sufficient power for the comma four to survive the reboot after flash. after I plug the power source into a 30w charger and reflash, it went through and boot into setup screen.
```
---
Similarities between both cases:
* comma four (though this shouldn't make a difference)
* core flashing code is the same for the initial bad flash
* fixed with a reflash, though case #2 had different flashing code on the good reflash
First order of business is to add a bunch of local and remote logging:
- [x] setup sentry (or some other platform)
- [ ] log GPT headers and other metadata before any write ops
- [ ] log same metadata right after flashing but before reboot
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.