Skip to content
thor-a edited this page Feb 18, 2014 · 10 revisions

As I work with Qt 5 on the Raspberry Pi, I frequently have a need for getting information about what impact I am having on the GPU. The tools available to get this information however are not well documented, and any information about them is spread about in various forums and wikis. So in an effort to dump the information that I've found so far here goes:

Environment Variables:

V3D_GL_ERROR_ASSIST=1

V3D_DOUBLE_BUFFER=1
By default VideoCore is set up to have a triple buffered framebuffer, setting this variable forces double buffering

V3D_NO_BIN_RENDER_OVERLAP=1

V3D_REG_DUMP_ON_LOCK=1

V3D_CLIF_DUMP_ON_LOCK=1

V3D_FORCE_DITHER_OFF=1

V3D_BIN_BLOCK_SIZE=(int)

V3D_MAX_BIN_BLOCKS=(int)

vcdbg Commands

Tools are provided in: /opt/vc/bin

vcdbg dump addr len
Dumps memory (Hex and ASCII)

vcdbg help [command]
Prints command help information

vcdbg hist
Generates gnuplot task history files.

vcdbg log command [args]
Commands related to logging

vcdbg malloc
Report on the VC malloc heap

vcdbg pools [name]
Report on vc_pools

vcdbg reloc [small|stats] Dump out relocatable heap [or just small, or stats]

vcdbg save filename [addr len]
Saves the indicated memory (or all) to a file

vcdbg sym symbol
Prints out the values of the indicated symbol

vcdbg syms
Prints out the values of the available symbols

vcdbg trash addr [len]
Trash VC memory (Hex and ASCII) [default: 1 byte]

vcdbg reloc | awk -F '[ ,]*' '/^\[/ {sum += $12} END { print sum }'
prints the size of all allocated buffers in bytes

vcdbg log assert
check VideoCore log for any recent asserts

vcdbg log msg
check VideoCore log

vcgencmd Commands

vcgencmd vcos command
Possible commands are log, help, and version

vcgencmd vcos log assert
Does a vcos_assert(0) to test logging

vcgencmd vcos log set category level
Sets the vcos logging level for a category

vcgencmd vcos log status [category]
Prints the vcos log status for a (or all) categories

vcgencmd vcos log test [arbitrary text]
Does a vcos_log to test logging

vcgencmd ap_output_control

vcgencmd ap_output_post_processing

vcgencmd pm_set_policy

vcgencmd pm_get_status

vcgencmd pm_show_stats

vcgencmd pm_start_logging

vcgencmd pm_stop_logging

vcgencmd set_vll_dir

vcgencmd led_control

vcgencmd set_backlight
Predates the Pi and is used for controlling the backlight on LCD displays. It's not plumbed in to anything on Pi (although could be in the future).

vcgencmd get_lcd_info
Returns height, width, and depth of the display framebuffer

vcgencmd set_bus_arbiter_mode

vcgencmd otp_dump

vcgencmd codec_enabled
Shows if the specified codec is enabled, codec can be one of H264 MPG2 WVC1

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

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

vcgencmd measure_temp
Shows core temperature of BCM2835 SoC.

vcgencmd get_config

vcgencmd hdmi_ntsc_freqs

vcgencmd render_bar
Created for debug purposes, see omxplayer.cpp. Needs 'enable_hdmi_status=1' in config.txt

vcgencmd disk_notify

vcgencmd inuse_notify

vcgencmd sus_suspend

vcgencmd sus_status

vcgencmd sus_is_enabled

vcgencmd sus_stop_test_thread

vcgencmd egl_platform_switch

vcgencmd mem_validate

vcgencmd mem_oom
Reports statistics on Out of Memory events

vcgencmd mem_reloc_stats
Reports statics on relocatable memory

vcgencmd file

vcgencmd vctest_memmap

vcgencmd vctest_start

vcgencmd vctest_stop

vcgencmd vctest_set

vcgencmd vctest_get

vcgencmd cache_flush
flush GPU's L1 cache

vcgencmd version
print current build version of VideoCore firmware

vcgencmd set_logging level=64
Change the verbosity of the VideoCore logger. The following table lists the possible values for level (which can be combined)

Log Level Description Value
LOGGING_GENERAL for logging general messages 1
LOGGING_GENERAL_VERBOSE 2
LOGGING_CODECS for codec messages 4
LOGGING_CODECS_VERBOSE 8
LOGGING_FILESYSTEM filesystem messages 16
LOGGING_FILESYSTEM_VERBOSE 32
LOGGING_VMCS VMCS related messages 64
LOGGING_VMCS_VERBOSE 128
LOGGING_DISPMAN2 Dispman2/scalar logs 256
LOGGING_DISPMAN2_VERBOSE 512
LOGGING_GCE Re-use Dispman2 for GCE logging 256
LOGGING_GCE_VERBOSE 512
LOGGING_CAMPLUS Camplus logs 1024
LOGGING_CAMPLUS_VERBOSE 2048
LOGGING_APPS Application log 4096
LOGGING_APPS_VERBOSE 8192
LOGGING_CLOCKMAN_POWERMAN Clockman + powerman logs 16384
LOGGING_CLOCKMAN_POWERMAN_VERBOSE 32768
LOGGING_VCOS 65536
LOGGING_VCOS_VERBOSE 131072
LOGGING_IMAGE_POOL Image pool messages 262144
LOGGING_IMAGE_POOL_VERBOSE 524288
LOGGING_HDMI HDMI and HDCP messages 1048576
LOGGING_HDMI_VERBOSE 2097152
LOGGING_MINIMAL minimal logging for bandwidth measurement, ie all others off 4194304
LOGGING_MINIMAL_VERBOSE 8388608
LOGGING_TUNER ISP Tuner logs - AGC, AWB etc 16777216
LOGGING_TUNER_VERBOSE 33554432
LOGGING_VCHI For all VCHI based services 67108864
LOGGING_VCHI_VERBOSE 134217728
LOGGING_FOCUS Focus messages 268435456
LOGGING_HANDLERS For handler messages 536870912
LOGGING_VOWIFI Re-use FOCUS for VOWIFI 268435456
LOGGING_VOWIFI_VERBOSE Re-use HANDLERS for VOWIFI 536870912
LOGGING_USER only for code under development - do not check in! 1073741824
LOGGING_USER_VERBOSE 2147483648