I have a Raspberry B and a Raspberry 2.

In the B model, I set the config file to gpu_mem_512=256 in order to get more memory for the graphics. It works fine. If I type the command vcgencmd get_mem gpu it shows gpu=256M as requested.

Now , with the Raspberry 2 model, there is a 1024M GPU, but, we can set it to work. We type gpu_mem_1024=512, but the command vcgencmd get_mem gpu shows gpu=64M, and the application throws a OUT_OF_MEMORY when loading textures.

What is the correct config line?

  • For anyone not following this clearly: the 1024M of the RPi 2 is shared between the GPU and the CPU - indeed that is what the setting controls. {It is so that the same SD Card can be used in different RPi versions and the _256, _512 and now _1024 suffix settings control the split for each of those base-memory sizes and which one is used depends on what is on the RPi reading it.} I suspect that using a gpu_mem without will override one with if they BOTH appear...
    – SlySven
    Commented Feb 7, 2016 at 0:28

6 Answers 6


I don't have any problem with this, although I am using a custom setup. In config.txt:


When I boot, I only have half the RAM:

> free
Mem:         495684

And the correct amount appears to be allocated to the GPU:

> vcgencmd get_mem gpu

768 worked too; the docs claim the limit is 944.


Just run sudo raspi-config, then go to Advanced Options then Memory Split:

Raspi-Config Shot

  • 3
    Note this solution works only with Raspbian Commented Aug 13, 2015 at 1:30
  • Just had problems using Kodi with Raspbian on the Pi 2 as the video kept not displaying. Changing the gpu memory to 512 MB using raspi-config worked first time.
    – user41133
    Commented Feb 6, 2016 at 23:10

I don't see any documentation on the RPi 2's max GPU setting. It appears that the max memory split is 448MB for the 512MB RPi. My guess is that since the RPi 2 doesn't currently allow for the max ram to be used by default, they also haven't upped that limit yet.

My suggestion is to try and set it at 448, and wait for more news.


  • I did, and vcgetcmd get_mem gpu returns 64M, and the textures are not loaded. Commented Feb 16, 2015 at 16:54

you could set the GPU-setting in general:

Open /boot/config.txt and add the line "gpu_mem=512".

After reboot it should work. However, you should not use the SD-card in other Raspberries than the Raspberry 2 with this setting. I just set my one to 128MB, so I am not sure if it works with 512MB.

  • 1
    it doesn't work. The pi resets the value to 64M after the config. Commented Mar 3, 2015 at 12:02

The highest I've set the gpu_mem on a rpi2 is 720mb. 756mb and it wouldn't get past the rainbow splash screen. Openelec runs fine, but I also have an 8gb usb stick as swap. I just read a 32gb stick is actually 3x the speed of an 8gb though. A 32gb stick is only about $10.

  • The speed of a USB flash drive is not directly related to its size, though it's not infrequently the case that larger drives will be faster because they are newer or have more internal memory bandwidth. If you're concerned, you need to test the specific drive.
    – cjs
    Commented Apr 20, 2017 at 8:23

It seems that the Raspberry Pi software has a bug that defaults it to 64M after change. In rpi they say they will publish a update.

  • 3
    Can you provide a link to where this was mentioned? Commented Mar 12, 2015 at 12:24
  • 3
    Have you tried apt-get update; apt-get upgrade? I think this problem has been fixed.
    – goldilocks
    Commented Mar 12, 2015 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.