Page 1 of 1

To limit the amount of GPU memory in RPI4 B

Posted: Tue Jul 23, 2019 8:48 am
by webbsmurfen
In the older Raspberry PI you could limit the amount of memory the GPU used by the system by entering a line in config.txt
gpu_mem=16

But how do you do this with the new Raspberry PI 4 that have 2 HDMI-ports? I intend only to use one of the ports

Re: To limit the amount of GPU memory in RPI4 B

Posted: Tue Jul 23, 2019 9:12 am
by jamesh
The same. Set max_framebuffers to 1 in config.txt to reduce memory requirements for the framebuffers in legacy mode, and probably has some effect in FKMS mode as well.

Re: To limit the amount of GPU memory in RPI4 B

Posted: Tue Jul 23, 2019 9:16 am
by jahboater
jamesh wrote:
Tue Jul 23, 2019 9:12 am
The same. Set max_framebuffers to 1 in config.txt to reduce memory requirements for the framebuffers in legacy mode, and probably has some effect in FKMS mode as well.
I don't suppose you can set max_framebuffers=0 for a headless Pi?

Re: To limit the amount of GPU memory in RPI4 B

Posted: Tue Jul 23, 2019 9:32 am
by webbsmurfen
jamesh wrote:
Tue Jul 23, 2019 9:12 am
The same. Set max_framebuffers to 1 in config.txt to reduce memory requirements for the framebuffers in legacy mode, and probably has some effect in FKMS mode as well.
Thanks!

Re: To limit the amount of GPU memory in RPI4 B

Posted: Tue Jul 23, 2019 11:13 am
by jamesh
jahboater wrote:
Tue Jul 23, 2019 9:16 am
jamesh wrote:
Tue Jul 23, 2019 9:12 am
The same. Set max_framebuffers to 1 in config.txt to reduce memory requirements for the framebuffers in legacy mode, and probably has some effect in FKMS mode as well.
I don't suppose you can set max_framebuffers=0 for a headless Pi?
Not sure, try it and see?

Re: To limit the amount of GPU memory in RPI4 B

Posted: Tue Jul 23, 2019 12:59 pm
by jahboater
jamesh wrote:
Tue Jul 23, 2019 11:13 am
jahboater wrote:
Tue Jul 23, 2019 9:16 am
jamesh wrote:
Tue Jul 23, 2019 9:12 am
The same. Set max_framebuffers to 1 in config.txt to reduce memory requirements for the framebuffers in legacy mode, and probably has some effect in FKMS mode as well.
I don't suppose you can set max_framebuffers=0 for a headless Pi?
Not sure, try it and see?
Seems to work!

Code: Select all

pi@pi4:~ $ free -h
              total        used        free      shared  buff/cache   available
Mem:          3.9Gi        77Mi       3.7Gi       8.0Mi        68Mi       3.7Gi
Swap:          99Mi          0B        99Mi
pi@pi4:~ $