Fix handling of gpu_mem to match raspi-config #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
rc_gui
currently handles settinggpu_mem
slightly differently to raspi-config:gpu_mem
specified inconfig.txt
,raspi-config
will assume the defaultgpu_mem
setting of 64MB(PR Fix default gpu_mem for boards with >=1GB RAM RPi-Distro/raspi-config#131 pending to change this to the actual firmware default of 64 or 76MB, which depends on memory size)
gpu_mem
specified inconfig.txt
,rc_gui
will callvcgencmd get_mem gpu
and default to thatThe
rc_gui
version of the algorithm suffers from a minor problem (apart from the fact it doesn't matchraspi-config
): if the user has previously booted with agpu_mem
setting in config.txt (for example 320MB), then removed that line (perhaps using a previous run ofrc_gui
), then runrc_gui
, it will prompt the user with a "default" of e.g. 320MB, not what the firmware actually defaults to in the case of nothing being specified inconfig.txt
, i.e. 64 or 76MB. This PR fixes uprc_gui
so that it behaves the same asraspi-config
with RPi-Distro/raspi-config#131 applied.