Jump to content

Recommended Posts

Posted

On a fresh install of Armbian 20.08.1/Linux 5.8.5-sunxi on an OPi Zero (256MB version), total memory is 238MB according to "free -m":

root@orangepizero:~# free -m
              total        used        free      shared  buff/cache   available
Mem:            238          74          78           1          85         154
Swap:           119           0         119

238MB is not 256MB. :-)

 

I assume the discrepancy is due to reserved framebuffer memory, but after a bit of testing I've found that the "sunxi_fb_mem_reserve" parameter (set to "16" in /boot/boot.cmd by default) has no apparent effect.


Here's a boot with the Armbian default "sunxi_fb_mem_reserve=16":

root@orangepizero:~# dmesg | grep "command line" && free -m
[    0.000000] Kernel command line: root=UUID=442e3394-ebc5-4a14-82f8-235d74d6b2e5 rootwait rootfstype=ext4 console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 consoleblank=0 loglevel=1 ubootpart=7d536c8c-01 ubootsource=mmc usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u   sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 cgroup_enable=memory swapaccount=1
              total        used        free      shared  buff/cache   available
Mem:            238          73          82           1          81         155
Swap:           119           0         119

A boot with "sunxi_fb_mem_reserve=0":

root@orangepizero:~# dmesg | grep "command line" && free -m
[    0.000000] Kernel command line: root=UUID=442e3394-ebc5-4a14-82f8-235d74d6b2e5 rootwait rootfstype=ext4 console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 consoleblank=0 loglevel=1 ubootpart=7d536c8c-01 ubootsource=mmc usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u   sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=0 cgroup_enable=memory swapaccount=1
              total        used        free      shared  buff/cache   available
Mem:            238          74          82           1          81         154
Swap:           119           0         119

A boot with "sunxi_fb_mem_reserve=32" (the kernel default according to https://linux-sunxi.org/Kernel_arguments):

root@orangepizero:~# dmesg | grep "command line" && free -m
[    0.000000] Kernel command line: root=UUID=442e3394-ebc5-4a14-82f8-235d74d6b2e5 rootwait rootfstype=ext4 console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 consoleblank=0 loglevel=1 ubootpart=7d536c8c-01 ubootsource=mmc usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u   sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=32 cgroup_enable=memory swapaccount=1
              total        used        free      shared  buff/cache   available
Mem:            238          74          82           1          81         154
Swap:           119           0         119

Now, since I'm building a headless server and have no actual use for a framebuffer and "sunxi_fb_mem_reserve=0" doesn't appear to work, is there any other way to recover the framebuffer memory?

 

Or am I completely off track and the memory is taken by something else entirely? ;-)

Posted
20 hours ago, 1xe said:

the kernel default according to

 

cma=96M the amount of memory to reserve for contimuous allocation. Default is 16M so you have to raise it for the Cedar ve_size to fit.

Posted
2 hours ago, Igor said:

 

cma=96M the amount of memory to reserve for contimuous allocation. Default is 16M so you have to raise it for the Cedar ve_size to fit.

I'm not sure what you're trying to tell me, but I did a few boots with the "cma" parameter set to different values (from 64M to 144M), and it had no effect on the total amount of memory reported by "free".

Posted
1 hour ago, 1xe said:

I'm not sure what you're trying to tell me, but I did a few boots with the "cma" parameter set to different values (from 64M to 144M), and it had no effect on the total amount of memory reported by "free".

 

It should have effect unless you set parameter wrong or this value is fixed since ...

Provide

armbianmonitor -u

after you added this parameter and I will be able to tell you more. Now I am blind.

Posted
22 hours ago, Igor said:

 

It should have effect unless you set parameter wrong or this value is fixed since ...

Provide


armbianmonitor -u

after you added this parameter and I will be able to tell you more. Now I am blind.

 

Done: http://ix.io/2x7v

 

Notice how the "cma" parameter appears to be picked up correctly, but has no effect on the total amount of memory.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines