twobikes22
Posts: 3
Joined: Sat Jul 06, 2019 2:52 am

Pi 4, 4GB RAM, not booting, CMA: failed to reserve 256 MiB mib.

Sat Jul 06, 2019 3:37 am

New Pi 4, booted several times using buster full OK. Then in Raspberry Pi Config menu re allocated memory for GPU from 64 to 1024, dialog box returned 896 i think, left it at that also set hdmi port 0 to 60Hz, then rebooted.

Flash screen, 4 raspberry's, and following error messages:

[ 0.000000] cma: Failed to reserve 256 MiB
[ 0.220610] brcm-pcie fd500000.pcie: dmabounce: could not allocate 33554432 byte DMA pool
[ 0.220696] brcm-pcie fd500000.pcie: could not init bounce buffers: -12
[ 0.749793] [vc_sm_connected init]: failed to initialise CMA heap

Screen blanks out and nothing, also no USB port working or have power. No USB power worries me!

Any ideas? Have I faulty memory chip?

twobikes22
Posts: 3
Joined: Sat Jul 06, 2019 2:52 am

Re: Pi 4, 4GB RAM, not booting, CMA: failed to reserve 256 MiB mib.

Sat Jul 06, 2019 6:14 am

Sorted it out myself. Fortunately had enabled ssh, so ssh into pi, and edited /boot/config.txt, had the line gpu_mem=896, changed it to gpu_mem=256, saved and rebooted.

This fixed the usb ports and booted into gui. Begs the question why did it return 896, when i entered 1024 then corrupt the boot and usb ports on reboot?

What is the highest gpu_mem? 512, I tried 1024 for gui to insert 896. But does higher mem allocation help video performance? more play and pain will tell what the limits.

kflmiami420
Posts: 61
Joined: Thu Mar 21, 2019 6:54 pm

Re: Pi 4, 4GB RAM, not booting, CMA: failed to reserve 256 MiB mib.

Sat Jul 06, 2019 8:46 am

try buster with desktop instead

User avatar
rpdom
Posts: 21828
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Pi 4, 4GB RAM, not booting, CMA: failed to reserve 256 MiB mib.

Sat Jul 06, 2019 11:22 am

No point in putting GPU memory over 256MB. The new VC6 uses CMA to split memory between CPUS and GPU as required.

Even 256MB is possibly excessive.
Unreadable squiggle

User avatar
bensimmo
Posts: 6084
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Pi 4, 4GB RAM, not booting, CMA: failed to reserve 256 MiB mib.

Sat Jul 06, 2019 12:33 pm

Less and less will need the GPU allocation set aside.
Leave it at default unless it complains.

twobikes22
Posts: 3
Joined: Sat Jul 06, 2019 2:52 am

Re: Pi 4, 4GB RAM, not booting, CMA: failed to reserve 256 MiB mib.

Sat Jul 06, 2019 9:26 pm

Thank you for the replies.

Learned that CMA stands for Contiguous Memory Allocation, this from a neat web site www.allacronyms.com, which will be my 1st place of call when I think what does ***** stand for? Yeah and back in the days I once thought LOL was Lots of Love.

Also learned that allocating more than 64 is not really going to help video performance, but hey I have got 4GB, so I think I will compromise at 128.

User avatar
bensimmo
Posts: 6084
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Pi 4, 4GB RAM, not booting, CMA: failed to reserve 256 MiB mib.

Sun Jul 07, 2019 8:39 am

If you didn't find it
https://www.raspberrypi.org/forums/view ... 7&start=50
So we'll see how they get on with the big changes.
(And there is another roost somewhere)

Towelie
Posts: 1
Joined: Fri Jul 26, 2019 11:49 am

Re: Pi 4, 4GB RAM, not booting, CMA: failed to reserve 256 MiB mib.

Fri Jul 26, 2019 11:54 am

I am having the same issue. The difference is the software I run seems to check for available video memory and won't run if it is set to low.

The max I can seem to set it at is 512. Does anyone know of any way around this?

scarlet_man
Posts: 1
Joined: Fri Sep 27, 2019 5:27 pm

Re: Pi 4, 4GB RAM, not booting, CMA: failed to reserve 256 MiB mib.

Fri Sep 27, 2019 5:32 pm

Huge thanks to twobikes22 - this saved me.

Had the same problem, tried setting video memory to 1024 just - well - just for something to do :D

Next day found blank display on boot up...

Followed a slightly different process, not using SSH.

I happened to have another SD card with Raspbian on which came with the PI4 bundle, which I'd kept when I upgraded to 32GB. Was able to boot from this, then connect the usual SD card into a USB adaptor. Browsed to the SD and reset the line of config.txt as advised by twobikes22.

10 minute fix. Many thanks.

simonliu
Posts: 2
Joined: Tue Mar 17, 2020 1:43 pm

Re: Pi 4, 4GB RAM, not booting, CMA: failed to reserve 256 MiB mib.

Sat Apr 18, 2020 9:38 am

In my Pi 4b 2GB RAM, I changed the gpu_mem=192 to gpu_mem =256, and it is working fine.

Return to “Troubleshooting”