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 Feb 7 '16 at 0:28

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 – Matthew Cordaro Aug 13 '15 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 Feb 6 '16 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. – diego.martinez Feb 16 '15 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. – diego.martinez Mar 3 '15 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. – Curt J. Sampson Apr 20 '17 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? – Steve Robillard Mar 12 '15 at 12:24
  • 3
    Have you tried apt-get update; apt-get upgrade? I think this problem has been fixed. – goldilocks Mar 12 '15 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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