Other OS

Memory Split (CPU - GPU) - How To?

8 12231
Arda  
Post Last Edited by Arda at 2014-8-6 05:36

Hi,

I am using Raspbian headless, so I don't need the extra GPU reserve (128 MB).

I have tried using raspi-config, and put 16MB as value, restarted, but GPU still has 128 MB of total memory.

My /boot.config.txt also has this value:

gpu_mem=16

How can I decrease Ram reserved for GPU?

Thanks,
Reply 1# Arda

banana pi do not use the config file to set up memory. We are modifying the raspi-config to bpi-config

shalo  
The way to do it would be to edit the uEnv.txt file that is in the /boot partition. Add some arguments in there, such as: sunxi_fb_mem_reserve=16 sunxi_no_mali_mem_reserve sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0

Those get my "free" memory total up to 1009468.

You can check out what all those arguments are in more detail here:
http://linux-sunxi.org/Kernel_arguments

Arda  
Reply  Arda

banana pi do not use the config file to set up memory. We are modifying the raspi-conf ...
tony_zhang Posted at 2014-8-6 07:06



    Thank you, this is great news, can't wait to see it in action

The way to do it would be to edit the uEnv.txt file that is in the /boot partition. Add some argumen ...
shalo Posted at 2014-8-6 07:07



    Sadly this had no affect, can you please provide your full configuration text ?

shalo  
Reply 4# Arda


   Hmm, I actually just copied that from my file where I had added it in. This is mine at any rate (note: I've changed root to a sata harddrive, so you might want to set that back to SD card).
bootargs=console=ttyS0,115200 console=tty0 sunxi_fb_mem_reserve=16 sunxi_no_mali_mem_reserve sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 disp.screen0_output_mode=EDID:1280x720p50 hdmi.audio=EDID:0 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline rootwait
aload_script=fatload mmc 0 0x43000000 bananapi/script.bin;
aload_kernel=fatload mmc 0 0x48000000 bananapi/uImage; bootm 0x48000000;
uenvcmd=run aload_script aload_kernel

Arda  
Reply 5# shalo


    Thank you, I was putting the values as a new line, so that's why it was not working (the reason I wanted your config). It seems to be working fine now . Just in case I've made a swapfile in an external drive in fstab.

f4exb  
Hello,

on my system "sunxi_fb_mem_reserve=16 sunxi_no_mali_mem_reserve" prevent the Banana to boot. The two other "sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0" are OK and do free memory leading to ~970MB of total free memory available instead of ~878MB. However the console does not display in full HD, I suppose you need some G2D memory for that so keeping only "sunxi_ve_mem_reserve=0" would probably do the trick at the expense of some memory.  VE is 80 MB so it is the big chunk to avoid anyway if you don't use video acceleration.

Thanks for the discussion. Here follows the straight  answer to reduce the GPU memory share.

Add this to your /boot/uEnv.txt
  1. sunxi_fb_mem_reserve=16 sunxi_no_mali_mem_reserve sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0
Copy the Code
At the end, the uEnv.txt will look like this:
  1. bootargs=console=ttyS0,115200 console=tty0 sunxi_fb_mem_reserve=16 sunxi_no_mali_mem_reserve sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 disp.screen0_output_mode=EDID:1280x720p50 hdmi.audio=EDID:0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
  2. aload_script=fatload mmc 0 0x43000000 bananapi/script.bin;
  3. aload_kernel=fatload mmc 0 0x48000000 bananapi/uImage; bootm 0x48000000;
  4. uenvcmd=run aload_script aload_kernel
Copy the Code
Description for each parameter can be found here:
http://linux-sunxi.org/Kernel_arguments

I'm using it headlessly.

signux  
Hi,

the bootargs doesn't work on BananaPro! On BananaPi they work well.

Know everyone the bootargs for BananaPro, to minimize the mem for GPU?

Thanks

You have to log in before you can reply Login | Sign Up

Points Rules