Repository navigation
vcgencmd: Document pmic_read_adc and measure_temp pmic, fix exit status - #220
Merged
pelwell merged 1 commit intoOct 14, 2026
Merged
Conversation
Add the Raspberry Pi 5 pmic_read_adc command and the pmic argument of measure_temp, note that mem_oom and mem_reloc_stats are not available on Raspberry Pi 5, and fix two typos. The EXIT STATUS section listed -1 (VHCI) and -2, which a shell never sees. vcgencmd exits with the low 8 bits of the error value, so both a mailbox open failure and a firmware error such as "Command not registered" exit with status 255. Signed-off-by: Manu Nicholas Jacob <manunicholasjacob@gmail.com>
popcornmix
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The vcgencmd(1) man page has no entry for the Raspberry Pi 5
pmic_read_adccommand or thepmicargument ofmeasure_temp, and its EXIT STATUS section lists -1 ("Problem with VHCI") and -2, which a shell never sees.Changes (vcgencmd/vcgencmd.1 only):
measure_temp [pmic]: on Raspberry Pi 5,measure_temp pmicreturns the PMIC temperature.pmic_read_adc [channel]entry: what it lists, how to read one channel, what happens with an unknown name, and that USB and other loads on the 5V supply are not included (same wording as the power supplies page of the documentation).mem_oomandmem_reloc_stats: not available on Raspberry Pi 5. This is the explanation given in vcgencmd mem_reloc_status: "Command not registered" #137 (Pi 5 has no relocatable heap); the man page now says so for anyone who gets "Command not registered".main()returns the firmware error value andmbox_open()callsexit(-1), so the shell sees the low 8 bits: both a mailbox open failure and an unknown command exit with 255.Checked on a Raspberry Pi 5 Model B Rev 1.0, firmware 2025/03/19 cec1d3ae, raspi-utils-core 20250314-1 (exit codes captured without a pipe):
groff -t -man -Tascii -ww vcgencmd/vcgencmd.1(groff 1.23.0) andman -lrender it with the same single warning as master (the existing get_throttled bit table at line 80).AI disclosure: drafted with AI assistance (Claude); each statement was checked against the vcgencmd source and the Pi 5 output above.