RPI vcgencmd usage

From eLinux.org
Jump to: navigation, search

Verified commands

Command outputs are from firmware version 362371.


vcgencmd commands

Shows a list of possible commands.

root@raspberrypi:~# vcgencmd commands
commands="vcos, ap_output_control, ap_output_post_processing, vchi_test_init, vchi_test_exit,
pm_set_policy, pm_get_status, pm_show_stats, pm_start_logging, pm_stop_logging, version, commands,
set_vll_dir, led_control, set_backlight, set_logging, get_lcd_info, set_bus_arbiter_mode,
cache_flush, otp_dump, codec_enabled, measure_clock, measure_volts, measure_temp, get_config,
hdmi_ntsc_freqs, render_bar, disk_notify, inuse_notify, sus_suspend, sus_status, sus_is_enabled,
sus_stop_test_thread, egl_platform_switch, mem_validate, mem_oom, mem_reloc_stats, file,
vctest_memmap, vctest_start, vctest_stop, vctest_set, vctest_get"

(I've just checked on a more recent firmware version and there's now also get_camera, get_mem and hdmi_status_show commands)

vcgencmd measure_clock <clock>

Shows clock frequency, clock can be one of arm, core, h264, isp, v3d, uart, pwm, emmc, pixel, vec, hdmi, dpi.

root@raspberrypi:~# \
> for src in arm core h264 isp v3d uart pwm emmc pixel vec hdmi dpi ; do \
>     echo -e "$src:\t$(vcgencmd measure_clock $src)" ; \
> done
arm:    frequency(45)=700000000
core:   frequency(1)=250000000
h264:   frequency(28)=0
isp:    frequency(42)=250000000
v3d:    frequency(43)=250000000
uart:   frequency(22)=3000000
pwm:    frequency(25)=0
emmc:   frequency(47)=100000000
pixel:  frequency(29)=154000000
vec:    frequency(10)=0
hdmi:   frequency(9)=163682000
dpi:    frequency(4)=0


vcgencmd measure_volts <id>

Shows voltage. id can be one of core, sdram_c, sdram_i, sdram_p, and defaults to core if not specified.

root@raspberrypi:~# \
> for id in core sdram_c sdram_i sdram_p ; do \
>     echo -e "$id:\t$(vcgencmd measure_volts $id)" ; \
> done
core:   volt=1.20V
sdram_c:        volt=1.20V
sdram_i:        volt=1.20V
sdram_p:        volt=1.23V


vcgencmd measure_temp

Shows core temperature of BCM2835 SoC.

root@raspberrypi:~# vcgencmd measure_temp
temp=42.8'C


vcgencmd codec_enabled <codec>

Shows if the specified codec is enabled, codec can be one of H264, MPG2, WVC1, MPG4, MJPG, WMV9. Please note this was run on a Pi with the MPG2 and VC1 licences enabled.

root@raspberrypi:~# \
> for codec in H264 MPG2 WVC1 MPG4 MJPG WMV9 ; do \
>     echo -e "$codec:\t$(vcgencmd codec_enabled $codec)" ; \
> done
H264:   H264=enabled
MPG2:   MPG2=enabled
WVC1:   WVC1=enabled
MPG4:   MPG4=enabled
MJPG:   MJPG=enabled
WMV9:   WMV9=enabled

If you also follow the instructions in this Forum post then the codec options for VP6 and VP8 (WEBM) also work, this is experimental and unsupported at present so any changes are at your own risk.


vcgencmd get_config [config|int|str] Will print the configurations you have set. Argument can ether be a specific option or int, showing all configs with number-datatype, or str showing all configurations with datatype sting (aka text).

root@raspberrypi:~# vcgencmd get_config int
arm_freq=1000
core_freq=500
sdram_freq=600
over_voltage=6
disable_overscan=1
force_pwm_open=1


vcgencmd get_mem arm/gpu

Shows how much memory is split between the CPU (arm) and GPU.

root@raspberrypi:~# vcgencmd get_mem arm && vcgencmd get_mem gpu
arm=448M
gpu=64M


vcgencmd version

Shows the firmware version

root@raspberrypi:~# vcgencmd version
Jan 13 2013 16:24:29
Copyright (c) 2012 Broadcom
version 362371 (release)


vcgencmd otp_dump

Displays the contents of the OTP (One Time Programmable) memory embedded inside the SoC.

root@raspberrypi:~# vcgencmd otp_dump
08:00000000
09:00000000
10:00000000
11:00000000
12:00000000
13:00000000
14:00000000
15:00000000
16:00280000
17:1020000a
18:1020000a
19:ffffffff
20:ffffffff
21:ffffffff
22:ffffffff
23:ffffffff
24:ffffffff
25:ffffffff
26:ffffffff
27:0000c2c2
28:6c14ba0d
29:93eb45f2
30:0000000e
31:00000000
32:00000000
33:00000000
34:00000000
35:00000000
36:00000000
37:00000000
38:00000000
39:00000000
40:00000000
41:00000000
42:00000000
43:00000000
44:00000000
45:00000000
46:00000000
47:00000000
48:00000000
49:00000000
50:00000000
51:00000000
52:00000000
53:00000000
54:00000000
55:00000000
56:00000000
57:00000000
58:00000000
59:00000000
60:00000000
61:00000000
62:00000000
63:00000000
64:00000000

Locations 28 and 30 store the Serial and Revision values that get displayed by /proc/cpuinfo (the Serial is also used to determine the Ethernet MAC address on Model B boards), and location 32 stores the value of the warranty bit. Purpose of values in other locations is unknown.


vcgencmd set_backlight

Currently unusable, might be used in the future to control the backlight of LCD displays


vcgencmd render_bar

Debug function created by Dom, used in OMXPlayer

vcgencmd display_power 0

Turns off video output.

vcgencmd display_power 1

Turns on video output.


Parameters and function of other vcgencmd commands are not known.

Links

  • This list also lists and describes vcgencmd options
{"cc_re__cc_re__cc_by_sa_3_0": ["?title=RPI_vcgencmd_usage&amp;action=info\" title=\"More information about this page\">Page information</a></li>\n\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t</div>\n\t\t\t\t</div>\n\t\t</div>\n\t\t<div id=\"footer\" role=\"contentinfo\">\n\t\t\t\t\t\t\t<ul id=\"footer-info\">\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-info-lastmod\"> This page was last modified on 17 August 2015, at 06:12.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-info-viewcount\">This page has been accessed 131,721 times.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-info-copyright\">Content is available under <a class=\"external\" rel=\"nofollow\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">a Creative Commons Attribution-ShareAlike 3.0 Unported License</a> unless otherwise noted.</li>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t<ul id=\"footer-places\">\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-privacy\"><a href=\"/eLinux.org:Privacy_policy\" title=\"eLinux.org:Privacy policy\">Privacy policy</a></li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-about\"><a href=\"/eLinux.org:About\" title=\"eLinux.org:About\">About eLinux.org</a></li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-disclaimer\"><a href=\"/eLinux.org:General_disclaimer\" title=\"eLinux.or", "oter-places-privacy\"><a href=\"/eLinux.org:Privacy_policy\" title=\"eLinux.org:Privacy policy\">Privacy policy</a></li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-about\"><a href=\"/eLinux.org:About\" title=\"eLinux.org:About\">About eLinux.org</a></li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-disclaimer\"><a href=\"/eLinux.org:General_disclaimer\" title=\"eLinux.org:General disclaimer\">Disclaimers</a></li>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t<ul id=\"footer-icons\" class=\"noprint\">\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-copyrightico\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img src=\"http://i.creativecommons.org/l/by-sa/3.0/88x31.png\" alt=\"a Creative Commons Attribution-ShareAlike 3.0 Unported License\" width=\"88\" height=\"31\" /></a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-poweredbyico\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/resources/assets/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" srcset=\"/resources/assets/poweredby_mediawiki_132x47.png 1.5x, /resources/assets/poweredby_mediawiki_176x62.png 2x\" width=\"88\" height=\"31\" /></a>\n\t"], "copyright__copyright__copyright": ["", " the value of the warranty bit. Purpose of values in other locations is unknown.\n\n\nvcgencmd set_backlight\n\nCurrently unusable, might be used in the future to control the backlight of LCD displays\n\n\nvcgencmd render_bar\n\nDebug function created by Dom, used in OMXPlayer\n\nvcgencmd display_power 0\n\nTurns off video output.\n\nvcgencmd display_power 1\n\nTurns on video output.\n\n\nParameters and function of other vcgencmd commands are not known.\n\nLinks\n\n  \u2022 This list also lists and describes vcgencmd options", " the value of the warranty bit. Purpose of values in other locations is unknown.\n\n\nvcgencmd set_backlight\n\nCurrently unusable, might be used in the future to control the backlight of LCD displays\n\n\nvcgencmd render_bar\n\nDebug function created by Dom, used in OMXPlayer\n\nvcgencmd display_power 0\n\nTurns off video output.\n\nvcgencmd display_power 1\n\nTurns on video output.\n\n\nParameters and function of other vcgencmd commands are not known.\n\nLinks\n\n  \u2022 This list also lists and describes vcgencmd options", " the value of the warranty bit. Purpose of values in other locations is unknown.\n\n\nvcgencmd set_backlight\n\nCurrently unusable, might be used in the future to control the backlight of LCD displays\n\n\nvcgencmd render_bar\n\nDebug function created by Dom, used in OMXPlayer\n\nvcgencmd display_power 0\n\nTurns off video output.\n\nvcgencmd display_power 1\n\nTurns on video output.\n\n\nParameters and function of other vcgencmd commands are not known.\n\nLinks\n\n  \u2022 This list also lists and describes vcgencmd options"]}