-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathvcgencmd.1
More file actions
271 lines (271 loc) · 6.15 KB
/
vcgencmd.1
File metadata and controls
271 lines (271 loc) · 6.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
'\" t
.TH VCGENCMD 1
.
.SH NAME
vcgencmd \- query the VideoCore for information
.
.
.SH SYNOPSIS
.SY vcgencmd
.IR command \ [ params ]
.YS
.
.
.SH DESCRIPTION
.B vcgencmd
is a command line utility that can get various pieces of information
from the VideoCore GPU on the Raspberry Pi.
.
.
.SH COMMANDS
To get a list of all the commands that
.B vcgencmd
supports, type
.IR "vcgencmd\ commands" .
Some of the more useful commands are described below.
.
.TP
.BI vcos \ sub-command
The
.B vcos
command has a number of sub-commands:
.RS
.TP
.B version
Displays the build date and version of the firmware on the VideoCore.
.TP
.B log status
Displays the error log status of the various VideoCore software areas.
.RE
.
.TP
.B version
Displays the build date and version of the firmware on the VideoCore.
.
.TP
.B get_camera
Displays the enabled and detected state of the official camera. 1 means yes, 0
means no. Whilst all firmware (except cutdown versions) will support the camera,
this support needs to be enabled by using the
.I start_x
boot option
.BR [BOOT] .
.
.TP
.B get_throttled
Returns the throttled state of the system. This is a bit pattern - a bit being
set indicates the following meanings:
.TS
tab(|);
l l .
Bit|Meaning
\_|\_
.T&
n l .
0|Under-voltage detected
1|Arm frequency capped
2|Currently throttled
3|Soft temperature limit active
16|Under-voltage has occurred
17|Arm frequency capping has occurred
18|Throttling has occurred
19|Soft temperature limit has occurred
.TE
.IP
A value of zero indicates that none of the above conditions is true.
.IP
To find if one of these bits has been set, convert the value returned to binary,
then number each bit along the top. You can then see which bits are set. For
example:
.IP
.EX
0x50000 = 0101 0000 0000 0000 0000
.EE
.IP
Adding the bit numbers along the top we get:
.TS
tab( );
n n n n n n n n n n n n n n n n n n n n .
19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.TE
.IP
From this we can see that bits 18 and 16 are set, indicating that the Pi has
previously been throttled due to under-voltage, but is not currently throttled
for any reason.
.
.TP
.B measure_temp
Returns the temperature of the SoC as measured by the on-board temperature
sensor.
.
.TP
.BI measure_clock \ clock
This returns the current frequency of the specified clock. The options are:
.TS
tab(|);
l l .
Clock|Description
\_|\_
arm|ARM cores
core|VC4 scaler cores
h264|H.264 block
isp|Image Signal Processor
v3d|3D block
uart|UART
pwm|PWM block (analog audio output)
emmc|SD card interface
pixel|Pixel valve
vec|Analog video encoder
hdmi|HDMI
dpi|Display Peripheral Interface
.TE
.IP
For example,
.IR "vcgencmd measure_clock arm" .
.
.TP
.BI measure_volts \ block
Displays the current voltages used by the specific block.
.TS
tab(|);
l l .
Block|Description
\_|\_
core|VC4 core voltage
sdram_c|
sdram_i|
sdram_p|
.TE
.
.TP
.B otp_dump
Displays the content of the One Time Programmable (OTP) memory, which is part
of the SoC. These are 32 bit values, indexed from 8 to 64. See the
.BR raspi-otp (7)
for more details.
.
.TP
.BI get_mem \ type
Reports on the amount of memory allocated to the ARM cores with
.I vcgencmd get_mem arm
or the VC4 with
.IR "vcgencmd get_mem gpu" .
.IP
.B Note:
On a Raspberry Pi 4 with greater than 1GB of RAM, the
.I arm
option is inaccurate.
This is because the GPU firmware which implements this command is only aware of
the first gigabyte of RAM on the system, so the
.I arm
setting will always return
1GB minus the
.I gpu
memory value. To get an accurate report of the amount of ARM
memory, use one of the standard Linux commands, such as
.I free
or
.IR "cat /proc/meminfo" .
.
.TP
.BI codec_enabled \ type
Reports whether the specified CODEC type is enabled. Possible options for type
are AGIF, FLAC, H263, H264, MJPA, MJPB, MJPG, MPG2, MPG4, MVC0, PCM, THRA,
VORB, VP6, VP8, WMV9, WVC1.
.IP
MPG2, WMV9, and WVC1 currently require a paid for licence (see the
.B [FAQ]
for more info), except on the Pi4, where these hardware codecs are disabled in
preference to software decoding, which requires no licence. Note that because
the H265 hardware block on the Raspberry Pi4 is not part of the VideoCore GPU,
its status is not accessed via this command.
.
.TP
.BI get_config \ type|name
This returns all the configuration items of the specified type that have been
set in config.txt, or a single configuration item. Possible values for type
parameter are
.IR int ", " str ", "
or simply use the name of the configuration item.
.
.TP
.B get_lcd_info
Displays the resolution and colour depth of any attached display.
.
.TP
.B mem_oom
Displays statistics on any Out Of Memory events occuring in the VC4 memory
space.
.
.TP
.B mem_reloc_stats
Displays statistics from the relocatable memory allocator on the VC4.
.
.TP
.B read_ring_osc
Returns the curent speed voltage and temperature of the ring oscillator.
.
.TP
.B hdmi_timings
Displays the current HDMI settings timings. See
.B [VIDEO]
for details of the values returned.
.
.TP
.B dispmanx_list
Dump a list of all dispmanx items currently being displayed.
.
.TP
.BI display_power \ 0|1|-1
.TQ
.BI display_power " 0|1|-1 display"
Show current display power state, or set the display power state.
.I vcgencmd display_power 0
will turn off power to the current display.
.I vcgencmd display_power 1
will turn on power to the display. If no parameter is set, this will display
the current power state. The final parameter is an optional display ID, as
returned by
.I tvservice -l
or from the table below, which allows a specific display to be turned on or
off.
.IP
.I vcgencmd display_power 0 7
will turn off power to display ID 7, which is HDMI 1 on a Raspberry Pi 4.
.TS
tab(|);
l l .
Display|ID
\_|\_
.T&
l n .
Main LCD|0
Secondary LCD|1
HDMI 0|2
Composite|3
HDMI 1|7
.TE
.IP
To determine if a specific display ID is on or off, use -1 as the first
parameter.
.IP
.I vcgencmd display_power -1 7
will return 0 if display ID 7 is off, 1 if display ID 7 is on, or -1 if display
ID 7 is in an unknown state, for example undetected.
.
.
.SH EXIT STATUS
.
.IP 0
Command completed successfully
.IP -1
Problem with VHCI
.IP -2
VideoCore returned an error
.
.
.SH SEE ALSO
.B [DOCS]
https://www.raspberrypi.com/documentation/computers/os.html#vcgencmd
.