13

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?

Piotr Kula
  • 17,336
  • 6
  • 66
  • 105
diego.martinez
  • 245
  • 1
  • 2
  • 8

6 Answers6

15

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

gpu_mem_1024=512

When I boot, I only have half the RAM:

> free
              total
Mem:         495684
             ^^^^^^

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

> vcgencmd get_mem gpu
gpu=512M

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

goldilocks
  • 60,325
  • 17
  • 117
  • 234
9

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

Raspi-Config Shot

techie007
  • 123
  • 7
ppersia37
  • 159
  • 1
  • 3
2

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.

source

Jacobm001
  • 11,904
  • 7
  • 47
  • 58
1

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.

Nayaro
  • 11
  • 1
0

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.

greenbag
  • 31
  • 2
-3

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.

Steve Robillard
  • 34,988
  • 18
  • 106
  • 110
diego.martinez
  • 245
  • 1
  • 2
  • 8