Skip to content

Latest commit

 

History

History
54 lines (27 loc) · 2.79 KB

File metadata and controls

54 lines (27 loc) · 2.79 KB

Memory options in config.txt

gpu_mem

GPU memory in megabytes: gpu_mem sets the memory split between the CPU and GPU; the CPU gets the remaining memory. Theinimum value is 16, and the maximum value is 192, 448, or 944, depending on whether you're using a 256M, 512MB, or 1024MB Pi. The default value is 64.

Setting gpu_mem to low values may automatically disable certain firmware features, as there are some things the GPU simply can't do with too little memory. So if a certain feature you're trying to use isn't working, try setting a larger GPU memory split.

Using gpu_mem_256, gpu_mem_512, and gpu_mem_1024 allows you to swap the same SD card between 256MB, 512MB, and 1024MB Pis without having to edit config.txt each time:

gpu_mem_256

The gpu_mem_256 command sets the GPU memory in megabytes for the 256MB Raspberry Pi (it is ignored if memory size is not 256MB). This overrides gpu_mem. The maximum value is 192 and the default is not set.

gpu_mem_512

The gpu_mem_512 command sets the GPU memory in megabytes for the 512MB Raspberry Pi (it is ignored if memory size is not 512MB). This overrides gpu_mem. The maximum value is 448 and the default is not set.

gpu_mem_1024

The gpu_mem_1024 command sets the GPU memory in megabytes for the 1024MB Raspberry Pi 2 (it is ignored if memory size is not 1024MB). This overrides gpu_mem. The maximum value is 944 and the default is not set.

disable_l2cache

Setting disable_12cache to 1 disables the CPU's access to the GPU's L2 cache. It requires a corresponding L2 disabled kernel. The default value is 0.

disable_pvt

Setting disable_pvt to 1 disables adjusting the refresh rate of RAM every 500ms. This action measures the RAM's temperature. The default value is 0.

CMA - Dynamic memory split

As of 19th November 2012, the firmware and kernel support Contiguous Memory Allocator (CMA), which means that the memory split between the CPU and GPU is managed dynamically at runtime. However, this is not officially supported.

You can find an example config.txt here.

cma_lwm

When the GPU has less than cma_lwm megabytes of memory available (the low-water mark), it will request some from the CPU.

cma_hwm

When the GPU has more than cma_hwm megabytes of memory available (the high-water mark), it will release some to the CPU.

The following options need to be in cmdline.txt for CMA to work:

coherent_pool=6M smsc95xx.turbo_mode=N

This article uses content from the eLinux wiki page RPiconfig, which is shared under the Creative Commons Attribution-ShareAlike 3.0 Unported license