Manjaro uses less RAM than is available from the BIOS

Hi folks,

I have 16GB of installed RAM, all displaying correctly in the BIOS and passing the Lenovo recovery “thorough” diagnostic tests. They’re also all displaying correctly in dmidecode:

~> sudo dmidecode -t memory
# dmidecode 3.6
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.

Handle 0x0006, DMI type 16, 23 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 64 GB
	Error Information Handle: 0x0005
	Number Of Devices: 4

Handle 0x0009, DMI type 17, 92 bytes
Memory Device
	Array Handle: 0x0006
	Error Information Handle: 0x0008
	Total Width: 32 bits
	Data Width: 32 bits
	Size: 4 GB
	Form Factor: Other
	Set: None
	Locator: DIMM 0
	Bank Locator: P0 CHANNEL A
	Type: LPDDR5
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 6400 MT/s
	Manufacturer: Hynix
	Serial Number: 00000000
	Asset Tag: Not Specified
	Part Number: H9JCNNNCP3MLYR-N6E  
	Rank: 2
	Configured Memory Speed: 6400 MT/s
	Minimum Voltage: 0.5 V
	Maximum Voltage: 0.5 V
	Configured Voltage: 0.5 V
	Memory Technology: DRAM
	Memory Operating Mode Capability: Volatile memory
	Firmware Version: Unknown
	Module Manufacturer ID: Bank 1, Hex 0xAD
	Module Product ID: Unknown
	Memory Subsystem Controller Manufacturer ID: Unknown
	Memory Subsystem Controller Product ID: Unknown
	Non-Volatile Size: None
	Volatile Size: 4 GB
	Cache Size: None
	Logical Size: None

Handle 0x000C, DMI type 17, 92 bytes
Memory Device
	Array Handle: 0x0006
	Error Information Handle: 0x000B
	Total Width: 32 bits
	Data Width: 32 bits
	Size: 4 GB
	Form Factor: Other
	Set: None
	Locator: DIMM 0
	Bank Locator: P0 CHANNEL B
	Type: LPDDR5
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 6400 MT/s
	Manufacturer: Hynix
	Serial Number: 00000000
	Asset Tag: Not Specified
	Part Number: H9JCNNNCP3MLYR-N6E  
	Rank: 2
	Configured Memory Speed: 6400 MT/s
	Minimum Voltage: 0.5 V
	Maximum Voltage: 0.5 V
	Configured Voltage: 0.5 V
	Memory Technology: DRAM
	Memory Operating Mode Capability: Volatile memory
	Firmware Version: Unknown
	Module Manufacturer ID: Bank 1, Hex 0xAD
	Module Product ID: Unknown
	Memory Subsystem Controller Manufacturer ID: Unknown
	Memory Subsystem Controller Product ID: Unknown
	Non-Volatile Size: None
	Volatile Size: 4 GB
	Cache Size: None
	Logical Size: None

Handle 0x000F, DMI type 17, 92 bytes
Memory Device
	Array Handle: 0x0006
	Error Information Handle: 0x000E
	Total Width: 32 bits
	Data Width: 32 bits
	Size: 4 GB
	Form Factor: Other
	Set: None
	Locator: DIMM 0
	Bank Locator: P0 CHANNEL C
	Type: LPDDR5
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 6400 MT/s
	Manufacturer: Hynix
	Serial Number: 00000000
	Asset Tag: Not Specified
	Part Number: H9JCNNNCP3MLYR-N6E  
	Rank: 2
	Configured Memory Speed: 6400 MT/s
	Minimum Voltage: 0.5 V
	Maximum Voltage: 0.5 V
	Configured Voltage: 0.5 V
	Memory Technology: DRAM
	Memory Operating Mode Capability: Volatile memory
	Firmware Version: Unknown
	Module Manufacturer ID: Bank 1, Hex 0xAD
	Module Product ID: Unknown
	Memory Subsystem Controller Manufacturer ID: Unknown
	Memory Subsystem Controller Product ID: Unknown
	Non-Volatile Size: None
	Volatile Size: 4 GB
	Cache Size: None
	Logical Size: None

Handle 0x0012, DMI type 17, 92 bytes
Memory Device
	Array Handle: 0x0006
	Error Information Handle: 0x0011
	Total Width: 32 bits
	Data Width: 32 bits
	Size: 4 GB
	Form Factor: Other
	Set: None
	Locator: DIMM 0
	Bank Locator: P0 CHANNEL D
	Type: LPDDR5
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 6400 MT/s
	Manufacturer: Hynix
	Serial Number: 00000000
	Asset Tag: Not Specified
	Part Number: H9JCNNNCP3MLYR-N6E  
	Rank: 2
	Configured Memory Speed: 6400 MT/s
	Minimum Voltage: 0.5 V
	Maximum Voltage: 0.5 V
	Configured Voltage: 0.5 V
	Memory Technology: DRAM
	Memory Operating Mode Capability: Volatile memory
	Firmware Version: Unknown
	Module Manufacturer ID: Bank 1, Hex 0xAD
	Module Product ID: Unknown
	Memory Subsystem Controller Manufacturer ID: Unknown
	Memory Subsystem Controller Product ID: Unknown
	Non-Volatile Size: None
	Volatile Size: 4 GB
	Cache Size: None
	Logical Size: None

However, the kernel seems to only be using 3 of the 4 sticks, for reasons I don’t understand!

~> sudo cat /proc/meminfo
MemTotal:       12008528 kB
MemFree:         2191040 kB
MemAvailable:    3275084 kB
Buffers:           67996 kB
Cached:          1167372 kB
SwapCached:      1546576 kB
Active:          4087860 kB
Inactive:        1236504 kB
Active(anon):    3178500 kB
Inactive(anon):   957392 kB
Active(file):     909360 kB
Inactive(file):   279112 kB
Unevictable:         176 kB
Mlocked:             176 kB
SwapTotal:      16777212 kB
SwapFree:        9226220 kB
Zswap:           2252996 kB
Zswapped:        5454680 kB
Dirty:              9596 kB
Writeback:             0 kB
AnonPages:       3982388 kB
Mapped:           537968 kB
Shmem:             46896 kB
KReclaimable:     220880 kB
Slab:            1167376 kB
SReclaimable:     220880 kB
SUnreclaim:       946496 kB
KernelStack:       38352 kB
PageTables:        92332 kB
SecPageTables:         0 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    22781476 kB
Committed_AS:   24691020 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      167940 kB
VmallocChunk:          0 kB
Percpu:            19840 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:    11023056 kB
DirectMap2M:     1318912 kB
DirectMap1G:           0 kB

I’m not sure where next to go to troubleshoot this; any suggestions? hw-probe results available here if they’re useful!

Hi @curtispf :wink:

Looks to me like a hardware lock via firmware. Check the UEFI Settings, if there is something you can change. Possible that the GPU reserve that much of RAM. Anyway… The kernel get the info about available RAM from the UEFI and works with that.

2 Likes

Manjaro uses a part of memory as a filesystem to mount /tmp on it.
You can run df to see that. For my PC :

tmpfs 3,4G 8,3M 3,4G 1% /tmp

You could also see that in /etc/fstab

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

I have 30.5 GiB available of 32 installed because the iGpu on my Ryzen 7900 reserves some system memory as video RAM.

Perhaps your 680M is doing the same?

2 Likes

That won’t reduce the amount of memory reported.

Besides, tmpfs only consumes as much virtual memory as the volume of the data stored on it. The values set for tmpfs at mount time are the maximum amount of virtual memory tmpfs may use — if no value is supplied at mount time, the default is half of the available RAM.


He’s missing a lot more than 680 MiB. :point_down:

He’s missing about 4 GiB. But yes, it is possible that his UEFI firmware is set up to assign 4 GiB to the onboard GPU — which is way too much. I too have 16 GiB of RAM, but my onboard GPU only uses some 512 MiB.

3 Likes

My system reports 1.5GiB less than installed.

First post HWPROBE indicates installed Rembrandt [Radeon 680M] iGPU

1 Like

4GB does seem rather a lot though, but some systems do do that if there isn’t separate RAM for the graphics. I think mine takes about 512M; will check it at some point. I have 8G in this machine.

On Intel-based systems, the default amount of shared memory allotted to an onboard GPU is 1/32 of your installed RAM. Therefore, with 32 GiB of installed RAM, 1 GiB will be reserved for the GPU by default, unless you change that value in your UEFI settings.

I will however admit that I don’t know how much it is on AMD-based systems nowadays, but my previous computer was an AMD with 4 GiB of RAM, and there the onboard GPU was using 640 KiB. So 1.5 GiB does seem acceptable for an AMD…

Some indication that “resize BAR” or “Smart Access Memory” in UEFI can map video memory onto system RAM used to boost gaming FPS, and that it can be a dynamic demand. I would check UEFI for that setting.

1 Like

Taking 4 GB of VRAM is normal on 680M and 780M. For example on the ASUS ALLY X 8 GB is reserved for VRAM. Other gaming handhelds have 4 GB of VRAM reserved on an APU. Probe of 8840u model (32 GB RAM), Probe of 7840u model (16 GB RAM). Simply check how much VRAM is used.

1 Like

This is normal for your system … it is assigned to the GPU part of the APU

1 Like

Thanks all for the help!

Looking at the card, it seems to have at least some onboard memory of its own:

~> sudo lspci -v -s 04:00.0
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt [Radeon 680M] (rev d1) (prog-if 00 [VGA controller])
	Subsystem: Lenovo Device 50b7
	Flags: bus master, fast devsel, latency 0, IRQ 43, IOMMU group 15
	Memory at 4b0000000 (64-bit, prefetchable) [size=256M]
	Memory at 4c0000000 (64-bit, prefetchable) [size=2M]
	I/O ports at 1000 [size=256]
	Memory at 80800000 (32-bit, non-prefetchable) [size=512K]
	Capabilities: [48] Vendor Specific Information: Len=08 <?>
	Capabilities: [50] Power Management version 3
	Capabilities: [64] Express Legacy Endpoint, IntMsgNum 0
	Capabilities: [a0] MSI: Enable- Count=1/4 Maskable- 64bit+
	Capabilities: [c0] MSI-X: Enable+ Count=4 Masked-
	Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
	Capabilities: [270] Secondary PCI Express
	Capabilities: [2a0] Access Control Services
	Capabilities: [2b0] Address Translation Service (ATS)
	Capabilities: [2c0] Page Request Interface (PRI)
	Capabilities: [2d0] Process Address Space ID (PASID)
	Capabilities: [410] Physical Layer 16.0 GT/s <?>
	Capabilities: [450] Lane Margining at the Receiver
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

But, you’re right that glxinfo suggests that it is what’s using up the 4GB extra!

~> sudo glxinfo | grep -E -i 'device|memory'
    Device: AMD Radeon Graphics (radeonsi, rembrandt, LLVM 18.1.8, DRM 3.49, 6.1.99-1-MANJARO) (0x1681)
    Video memory: 4096MB
    Unified memory: no
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 3079 MB, largest block: 3079 MB
    VBO free aux. memory - total: 5743 MB, largest block: 5743 MB
    Texture free memory - total: 3079 MB, largest block: 3079 MB
    Texture free aux. memory - total: 5743 MB, largest block: 5743 MB
    Renderbuffer free memory - total: 3079 MB, largest block: 3079 MB
    Renderbuffer free aux. memory - total: 5743 MB, largest block: 5743 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 4096 MB
    Total available memory: 9959 MB
    Currently available dedicated video memory: 3079 MB
    GL_AMD_performance_monitor, GL_AMD_pinned_memory, 
    GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB, GL_EXT_memory_object, 
    GL_EXT_memory_object_fd, GL_EXT_packed_depth_stencil, GL_EXT_packed_float, 
    GL_NVX_gpu_memory_info, GL_NV_alpha_to_coverage_dither_control, 
    GL_AMD_pinned_memory, GL_AMD_query_buffer_object, 
    GL_EXT_gpu_program_parameters, GL_EXT_gpu_shader4, GL_EXT_memory_object, 
    GL_EXT_memory_object_fd, GL_EXT_multi_draw_arrays, 
    GL_MESA_window_pos, GL_NVX_gpu_memory_info, GL_NV_ES1_1_compatibility, 
    GL_EXT_instanced_arrays, GL_EXT_map_buffer_range, GL_EXT_memory_object, 
    GL_EXT_memory_object_fd, GL_EXT_multi_draw_arrays,

The thing about this that confuses me, though, is that this isn’t a new install: previously, this same laptop, still running Manjaro, with no hardware or firmware changes, was reporting 16GB of usable memory… and it’s I think only after the last pacman update run that it started reporting 12GB.

I did go through and look in the UEFI settings, but couldn’t find anything relating to video memory there at all :confused:

1 Like