User avatar
RasPiGaming
Posts: 189
Joined: Mon Jul 26, 2021 1:06 pm

How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 6:17 pm

I have an 8GB RAM Pi4, with Ubuntu Desktop, and I installed the raspi-config tool to change GPU memory. But I can't change the GPU memory to more than 128mb. I got the 8GB model so shouldn't I be able to have 4GB for the CPU and 4GB for the GPU? Also how can I overclock the Pi4, because raspi-config can only overclock Pi1/2.
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

trejan
Posts: 3622
Joined: Tue Jul 02, 2019 2:28 pm

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 6:37 pm

RasPiGaming wrote:
Fri Jul 30, 2021 6:17 pm
I installed the raspi-config tool to change GPU memory.
You need to set it manually by editing config.txt. For the vast majority of users, you don't need to touch the GPU memory allocation at all and increasing it will just take RAM away from the ARM side. See https://www.raspberrypi.org/documentati ... /memory.md
RasPiGaming wrote:
Fri Jul 30, 2021 6:17 pm
I got the 8GB model so shouldn't I be able to have 4GB for the CPU and 4GB for the GPU?
No. The Pi 4 hardware isn't like an ordinary GPU which has dedicated RAM. Higher gpu_mem doesn't mean higher performance for a Pi.
RasPiGaming wrote:
Fri Jul 30, 2021 6:17 pm
Also how can I overclock the Pi4, because raspi-config can only overclock Pi1/2.
You need to manually set it as well.

User avatar
RasPiGaming
Posts: 189
Joined: Mon Jul 26, 2021 1:06 pm

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 6:48 pm

No. The Pi 4 hardware isn't like an ordinary GPU which has dedicated RAM. Higher gpu_mem doesn't mean higher performance for a Pi.
Does that mean I can run Steam games with low amounts of GPU memory?
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

W. H. Heydt
Posts: 14980
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 7:01 pm

RasPiGaming wrote:
Fri Jul 30, 2021 6:48 pm
No. The Pi 4 hardware isn't like an ordinary GPU which has dedicated RAM. Higher gpu_mem doesn't mean higher performance for a Pi.
Does that mean I can run Steam games with low amounts of GPU memory?
By and large, Steam games are written to run on x86 (Intel or AMD) hardware. Pis use ARM CPU cores. you'd have to use a simulator and--potentially--an API interface converter. Performance would be...poor...at best. (For which read, the frame rate would make the games unplayable.)

User avatar
RasPiGaming
Posts: 189
Joined: Mon Jul 26, 2021 1:06 pm

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 7:08 pm

W. H. Heydt wrote:
Fri Jul 30, 2021 7:01 pm
RasPiGaming wrote:
Fri Jul 30, 2021 6:48 pm
No. The Pi 4 hardware isn't like an ordinary GPU which has dedicated RAM. Higher gpu_mem doesn't mean higher performance for a Pi.
Does that mean I can run Steam games with low amounts of GPU memory?
By and large, Steam games are written to run on x86 (Intel or AMD) hardware. Pis use ARM CPU cores. you'd have to use a simulator and--potentially--an API interface converter. Performance would be...poor...at best. (For which read, the frame rate would make the games unplayable.)
Forgot to mention I'm using box86. :oops:
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

fruitoftheloom
Posts: 27226
Joined: Tue Mar 25, 2014 12:40 pm

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 7:21 pm

RasPiGaming wrote:
Fri Jul 30, 2021 7:08 pm
W. H. Heydt wrote:
Fri Jul 30, 2021 7:01 pm
RasPiGaming wrote:
Fri Jul 30, 2021 6:48 pm

Does that mean I can run Steam games with low amounts of GPU memory?
By and large, Steam games are written to run on x86 (Intel or AMD) hardware. Pis use ARM CPU cores. you'd have to use a simulator and--potentially--an API interface converter. Performance would be...poor...at best. (For which read, the frame rate would make the games unplayable.)
Forgot to mention I'm using box86. :oops:

Yes quite and rather than asking about BOX86 in different ways, as I mentioned in your other posts you need to ask the developers how they get BOX86 and associated software to run / not run.

You are going round in circles at present :?
Take what I advise as advice not the utopian holy grail, and it is gratis !!

User avatar
RasPiGaming
Posts: 189
Joined: Mon Jul 26, 2021 1:06 pm

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 7:35 pm

fruitoftheloom wrote:
Fri Jul 30, 2021 7:21 pm
RasPiGaming wrote:
Fri Jul 30, 2021 7:08 pm
W. H. Heydt wrote:
Fri Jul 30, 2021 7:01 pm

By and large, Steam games are written to run on x86 (Intel or AMD) hardware. Pis use ARM CPU cores. you'd have to use a simulator and--potentially--an API interface converter. Performance would be...poor...at best. (For which read, the frame rate would make the games unplayable.)
Forgot to mention I'm using box86. :oops:

Yes quite and rather than asking about BOX86 in different ways, as I mentioned in your other posts you need to ask the developers how they get BOX86 and associated software to run / not run.

You are going round in circles at present :?
I got Box86 up and running. Did I forget to post that? :?: Steam too. This post is simply about GPU memory/overclocking.
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

User avatar
jahboater
Posts: 7332
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 7:52 pm

RasPiGaming wrote:
Fri Jul 30, 2021 7:35 pm
This post is simply about GPU memory/overclocking.
I read somewhere that there is nothing to be gained by gpu_mem exceeding 128MB (or was it 256MB?).

Add "gpu_mem=256" (say) to your /boot/config.txt file with any text editor:

Code: Select all

sudo nano /boot/con<tab>
To overclock a Pi4, add "arm_freq=xxx" to your /boot/config.txt file and stress test it carefully.
For example, one of my Pi4's has these entries:

Code: Select all

over_voltage=6
arm_freq=2100
arm_freq_min=400
initial_turbo=30
gpu_mem=128
Lower "arm_freq" if yours is not stable at 2.1GHz (most are, likely with a heatsink but no fan is needed).

Another Pi4 running headless uses this config:

Code: Select all

over_voltage=2
arm_freq=1800
arm_freq_min=400
initial_turbo=30
gpu_mem=16

ejolson
Posts: 8127
Joined: Tue Mar 18, 2014 11:47 am

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 9:18 pm

jahboater wrote:
Fri Jul 30, 2021 7:52 pm
RasPiGaming wrote:
Fri Jul 30, 2021 7:35 pm
This post is simply about GPU memory/overclocking.
I read somewhere that there is nothing to be gained by gpu_mem exceeding 128MB (or was it 256MB?).

Add "gpu_mem=256" (say) to your /boot/config.txt file with any text editor:

Code: Select all

sudo nano /boot/con<tab>
To overclock a Pi4, add "arm_freq=xxx" to your /boot/config.txt file and stress test it carefully.
For example, one of my Pi4's has these entries:

Code: Select all

over_voltage=6
arm_freq=2100
arm_freq_min=400
initial_turbo=30
gpu_mem=128
Lower "arm_freq" if yours is not stable at 2.1GHz (most are, likely with a heatsink but no fan is needed).

Another Pi4 running headless uses this config:

Code: Select all

over_voltage=2
arm_freq=1800
arm_freq_min=400
initial_turbo=30
gpu_mem=16
My understanding is recent kernels will crash when gpu_mem=512. From what I understand, even though a Pi may have 8GB RAM, certain operations can only be performed using the first 1GB. If that is in low supply, things run slowly; if it runs out, the system crashes.

LTolledo
Posts: 5856
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 9:29 pm

How can I change the GPU memory to more than 128.....

build your own highly specialized kernel, having the ability to modify GPU memory with higher values, without crashing the entire system...
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

ejolson
Posts: 8127
Joined: Tue Mar 18, 2014 11:47 am

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 9:31 pm

LTolledo wrote:
Fri Jul 30, 2021 9:29 pm
How can I change the GPU memory to more than 128.....

build your own highly specialized kernel, having the ability to modify GPU memory with higher values, without crashing the entire system...
I think it's a hardware limitation.

LTolledo
Posts: 5856
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 9:38 pm

ejolson wrote:
Fri Jul 30, 2021 9:31 pm
LTolledo wrote:
Fri Jul 30, 2021 9:29 pm
How can I change the GPU memory to more than 128.....

build your own highly specialized kernel, having the ability to modify GPU memory with higher values, without crashing the entire system...
I think it's a hardware limitation.
therefore.... for the OP's use case.... wrong hardware for the task the OP has in mind....

thus.... build own customized hardware, using specialized kernel.....

but wait... this is for running STEAM games right?
just get an affordable X86 PC that does the task without problems.....and save on frustrations, agony...and "white elephant" syndrome....
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
RasPiGaming
Posts: 189
Joined: Mon Jul 26, 2021 1:06 pm

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 9:42 pm

LTolledo wrote:
Fri Jul 30, 2021 9:38 pm
ejolson wrote:
Fri Jul 30, 2021 9:31 pm
LTolledo wrote:
Fri Jul 30, 2021 9:29 pm
How can I change the GPU memory to more than 128.....

build your own highly specialized kernel, having the ability to modify GPU memory with higher values, without crashing the entire system...
I think it's a hardware limitation.
therefore.... for the OP's use case.... wrong hardware for the task the OP has in mind....

thus.... build own customized hardware, using specialized kernel.....

but wait... this is for running STEAM games right?
just get an affordable X86 PC that does the task without problems.....and save on frustrations, agony...and "white elephant" syndrome....
I went with the Pi4 because it IS affordable.
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

LTolledo
Posts: 5856
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 9:45 pm

RasPiGaming wrote:
Fri Jul 30, 2021 9:42 pm
LTolledo wrote:
Fri Jul 30, 2021 9:38 pm
ejolson wrote:
Fri Jul 30, 2021 9:31 pm

I think it's a hardware limitation.
therefore.... for the OP's use case.... wrong hardware for the task the OP has in mind....

thus.... build own customized hardware, using specialized kernel.....

but wait... this is for running STEAM games right?
just get an affordable X86 PC that does the task without problems.....and save on frustrations, agony...and "white elephant" syndrome....
I went with the Pi4 because it IS affordable.
affordable....definitely it is..... but not up for the task in mind....
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
RasPiGaming
Posts: 189
Joined: Mon Jul 26, 2021 1:06 pm

Re: How can I change the GPU memory to more than 128mb on Pi4?

Fri Jul 30, 2021 10:02 pm

LTolledo wrote:
Fri Jul 30, 2021 9:45 pm
RasPiGaming wrote:
Fri Jul 30, 2021 9:42 pm
LTolledo wrote:
Fri Jul 30, 2021 9:38 pm


therefore.... for the OP's use case.... wrong hardware for the task the OP has in mind....

thus.... build own customized hardware, using specialized kernel.....

but wait... this is for running STEAM games right?
just get an affordable X86 PC that does the task without problems.....and save on frustrations, agony...and "white elephant" syndrome....
I went with the Pi4 because it IS affordable.
affordable....definitely it is..... but not up for the task in mind....
But you can play Shovel Knight and Terreria, so I'm good.
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 29367
Joined: Sat Jul 30, 2011 7:41 pm

Re: How can I change the GPU memory to more than 128mb on Pi4?

Sat Jul 31, 2021 6:43 am

ejolson wrote:
Fri Jul 30, 2021 9:18 pm
jahboater wrote:
Fri Jul 30, 2021 7:52 pm
RasPiGaming wrote:
Fri Jul 30, 2021 7:35 pm
This post is simply about GPU memory/overclocking.
I read somewhere that there is nothing to be gained by gpu_mem exceeding 128MB (or was it 256MB?).

Add "gpu_mem=256" (say) to your /boot/config.txt file with any text editor:

Code: Select all

sudo nano /boot/con<tab>
To overclock a Pi4, add "arm_freq=xxx" to your /boot/config.txt file and stress test it carefully.
For example, one of my Pi4's has these entries:

Code: Select all

over_voltage=6
arm_freq=2100
arm_freq_min=400
initial_turbo=30
gpu_mem=128
Lower "arm_freq" if yours is not stable at 2.1GHz (most are, likely with a heatsink but no fan is needed).

Another Pi4 running headless uses this config:

Code: Select all

over_voltage=2
arm_freq=1800
arm_freq_min=400
initial_turbo=30
gpu_mem=16
My understanding is recent kernels will crash when gpu_mem=512. From what I understand, even though a Pi may have 8GB RAM, certain operations can only be performed using the first 1GB. If that is in low supply, things run slowly; if it runs out, the system crashes.
Not sure about the 512 thing, but anything over 256 is often pointless anyway.

The 1gb limit depends on the stepping of the 2711 soc.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Working in the Applications Team.

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

Re: How can I change the GPU memory to more than 128mb on Pi4?

Sat Jul 31, 2021 8:28 am

On the Pi4 the RAM you'll be using should be allocated dynamically.
The old config.sys setting if still for the camera memory mainly (and maybe some mpeg decoding?). The new HD camera needed a bit more than 128MB being reserved.
It's been a while and not sure what they have changed since the Pi4 first came out or if ARM64 changes that (if you're using it).

So Box86 should be asking Linux what to set it at when it needs it.
If I have that all right.

Anyway, there are quite a few topics on this and what uses what memory. (perhaps this need putting in raspi-config notes for the ram setting page?)

I suggest asking the box86 people how they have programmed it.

There are also a few overclocking topic or websites like magpie, tomshardware and retropie that have how to's

Have fun :-)

User avatar
RasPiGaming
Posts: 189
Joined: Mon Jul 26, 2021 1:06 pm

Re: How can I change the GPU memory to more than 128mb on Pi4?

Sat Jul 31, 2021 4:17 pm

The Pi4 does have a have gaming power unlike most people think actually. I play PPSSPP on it all the time, and it works great. But this post was supposed to be about GPU memory/overclocking, not Steam. Forgot to say I was just going to play games that only list 500mb or less as the GPU requirement too.
An RPi can be a gaming PC. As long as you have the right packages and software anyway.
Using a RPi4 8GB with Ubuntu Desktop 21.04, main interests are gaming and programming. Also occasionally uses two RPi3B+ and a RPi3B.

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

Re: How can I change the GPU memory to more than 128mb on Pi4?

Sat Jul 31, 2021 4:27 pm

And people are saying, Linux does it for you on the Pi4/400, unless box86 does it differently and needs it allocating*. but then it probably needs allocating within box86 itself. Nothing to do with Steam/GOG/CD..
Hence what it is used for is often needed.


*as a side, I would have thought you can set it to 256MB as that the recommendation as a max for a Pi4 for cameras etc.

It'll be interesting to see what Overclock you can get. Make sure your Eeprom (the Pi's firmware) is up to date.
sudo rpi-eeprom-update
Should check for you.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 29367
Joined: Sat Jul 30, 2011 7:41 pm

Re: How can I change the GPU memory to more than 128mb on Pi4?

Sat Jul 31, 2021 4:55 pm

Depending on the use case, 256 would almost always be more than enough. In this particular use case, not using the camera and probably not the H264 codecs,. then I think the default of 76 might be enough. Or 128 if you want a little headroom without too much waste.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Working in the Applications Team.

Return to “Beginners”