[Solved] Incorrect RAM-size in free -h, but not in dmidecode. What's wrong?

Need help with peripherals or devices?
Post Reply
Message
Author
wintermute
Posts: 4
Joined: 2024-06-05 23:02
Has thanked: 1 time

[Solved] Incorrect RAM-size in free -h, but not in dmidecode. What's wrong?

#1 Post by wintermute »

Hello everyone,
I'm Chris from Germany and I'm new to this forum. I just moved from Mint to Debian and I really love it so far, everything's running perfectly fine. I have one weird issue, though, and I hope you guys can explain what's going on:
I have 2 bars of 8GB-DDR4-RAM on my system (slots 1 and 3), so a total of 16GB, same brand, same model. When I go to Gnome settings > info, it shows 16GB. When I do

Code: Select all

sudo dmidecode --type memory
the output is:

Code: Select all

Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

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

Handle 0x0018, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0011
	Error Information Handle: 0x0017
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: Unknown
	Set: None
	Locator: DIMM 0
	Bank Locator: P0 CHANNEL A
	Type: Unknown
	Type Detail: Unknown

Handle 0x001A, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0011
	Error Information Handle: 0x0019
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 8 GB
	Form Factor: DIMM
	Set: None
	Locator: DIMM 1
	Bank Locator: P0 CHANNEL A
	Type: DDR4
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 2667 MT/s
	Manufacturer: Micron Technology
	Serial Number: 2F897838
	Asset Tag: Not Specified
	Part Number: 4ATF1G64AZ-3G2E1    
	Rank: 1
	Configured Memory Speed: 2667 MT/s
	Minimum Voltage: 1.2 V
	Maximum Voltage: 1.2 V
	Configured Voltage: 1.2 V

Handle 0x001D, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0011
	Error Information Handle: 0x001C
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: Unknown
	Set: None
	Locator: DIMM 0
	Bank Locator: P0 CHANNEL B
	Type: Unknown
	Type Detail: Unknown

Handle 0x001F, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0011
	Error Information Handle: 0x001E
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 8 GB
	Form Factor: DIMM
	Set: None
	Locator: DIMM 1
	Bank Locator: P0 CHANNEL B
	Type: DDR4
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 2667 MT/s
	Manufacturer: Micron Technology
	Serial Number: 2F89760F
	Asset Tag: Not Specified
	Part Number: 4ATF1G64AZ-3G2E1    
	Rank: 1
	Configured Memory Speed: 2667 MT/s
	Minimum Voltage: 1.2 V
	Maximum Voltage: 1.2 V
	Configured Voltage: 1.2 V
	
And this is the output of lshw -C memory:

Code: Select all

*-firmware                
       description: BIOS
       vendor: American Megatrends International, LLC.
       physical id: 0
       version: M.H0
       date: 07/26/2022
       size: 64KiB
       capacity: 16MiB
       capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb biosbootspecification uefi
  *-memory
       description: System Memory
       physical id: 11
       slot: System board or motherboard
       size: 16GiB
     *-bank:0
          description: 2667 MHz (0,4 ns) [empty]
          product: Unknown
          vendor: Unknown
          physical id: 0
          serial: Unknown
          slot: DIMM 0
          clock: 2667MHz (0.4ns)
     *-bank:1
          description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2667 MHz (0,4 ns)
          product: 4ATF1G64AZ-3G2E1
          vendor: Micron Technology
          physical id: 1
          serial: 2F897838
          slot: DIMM 1
          size: 8GiB
          width: 64 bits
          clock: 2667MHz (0.4ns)
     *-bank:2
          description: 2667 MHz (0,4 ns) [empty]
          product: Unknown
          vendor: Unknown
          physical id: 2
          serial: Unknown
          slot: DIMM 0
          clock: 2667MHz (0.4ns)
     *-bank:3
          description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2667 MHz (0,4 ns)
          product: 4ATF1G64AZ-3G2E1
          vendor: Micron Technology
          physical id: 3
          serial: 2F89760F
          slot: DIMM 1
          size: 8GiB
          width: 64 bits
          clock: 2667MHz (0.4ns)
  *-cache:0
       description: L1 cache
       physical id: 13
       slot: L1 - Cache
       size: 576KiB
       capacity: 576KiB
       clock: 1GHz (1.0ns)
       capabilities: pipeline-burst internal write-back unified
       configuration: level=1
  *-cache:1
       description: L2 cache
       physical id: 14
       slot: L2 - Cache
       size: 3MiB
       capacity: 3MiB
       clock: 1GHz (1.0ns)
       capabilities: pipeline-burst internal write-back unified
       configuration: level=2
  *-cache:2
       description: L3 cache
       physical id: 15
       slot: L3 - Cache
       size: 16MiB
       capacity: 16MiB
       clock: 1GHz (1.0ns)
       capabilities: pipeline-burst internal write-back unified
       configuration: level=3
However, when I type in

Code: Select all

free -h
I get

Code: Select all

             gesamt       benutzt     frei      gemns.  Puffer/Cache verfügbar
Speicher:      7,7Gi       4,3Gi       716Mi        60Mi       3,0Gi       3,3Gi
Swap:          3,3Gi          0B       3,3Gi
Stacer also shows 7,7 GB, and so does top. And sudo dmesg | grep Memory gives me:

Code: Select all

[    0.052579] Memory: 3014432K/8312428K available (14342K kernel code, 2332K rwdata, 9060K rodata, 2796K init, 17404K bss, 405404K reserved, 0K cma-reserved)
[    0.255768] x86/mm: Memory block size: 128MB
I have no idea what's going on... no entries in grub-cmdline, the Windows-installation on the same system correctly reports 16GB of installed RAM.
Do you have any ideas?
Any help is appreciated, thanks in advance,
Chris
Last edited by wintermute on 2024-06-06 09:20, edited 1 time in total.

CwF
Global Moderator
Global Moderator
Posts: 3000
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 60 times
Been thanked: 243 times

Re: Incorrect RAM-size in free -h, but not in dmidecode. What's wrong?

#2 Post by CwF »

Welcome to the forums, and I have no idea!

I am curious why they are in 1+3 and not 0+2. The bios's I'm used to have channel, stripe, mirror, independent settings for the slots. It may matter? The correct placement should be 0+2 or 0+1 depending on channel mode, as far as I know.
Mottainai

wintermute
Posts: 4
Joined: 2024-06-05 23:02
Has thanked: 1 time

Re: Incorrect RAM-size in free -h, but not in dmidecode. What's wrong?

#3 Post by wintermute »

Thanks for your answer,
I put them in 1+3 beause the slots were easier to access with everything else installed on the board, I thought it wouldn't matter. I will try to put them in 0+2 tomorrow and report back. Strange though that some of the tools report the correct size while others don't, isn't it?

wintermute
Posts: 4
Joined: 2024-06-05 23:02
Has thanked: 1 time

Re: Incorrect RAM-size in free -h, but not in dmidecode. What's wrong?

#4 Post by wintermute »

okay, when I put the memory in slots 0+2, UEFI informs me that it found memory in non-optimized slots and that it should be in slots 1+3 (maybe that's the reason why I put it in 1+3 in the first place, I don't remember). The board is a MSI B450-A pro max by the way, with 2 bars of 8GB Micron DDR4, nothing strange in the UEFI-settings.
However, in this configuration the memory was recognized correctly. For the sake of reproducibility (and because of the UEFI warning) I tried again with the memory in slots 1+3, and this time they were properly recognized in Debian. So, everything's fine for now, I will mark this as 'solved', but I'm still curious to know why this happened. Defective RAM? Software or UEFI issues? Bad luck?
Thanks a lot for your help, CwF!!

User avatar
fabien
Forum Helper
Forum Helper
Posts: 1039
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 91 times
Been thanked: 233 times

Re: [Solved] Incorrect RAM-size in free -h, but not in dmidecode. What's wrong?

#5 Post by fabien »

wintermute wrote: 2024-06-05 23:53

Code: Select all

sudo dmidecode --type memory
[...]
And this is the output of lshw -C memory:
[...]
However, when I type in

Code: Select all

free -h
[...]
I have no idea what's going on... no entries in grub-cmdline, the Windows-installation on the same system correctly reports 16GB of installed RAM.
Do you have any ideas?
Both dmidecode and lshw rely on the DMI information presented by the BIOS
man 8 dmidecode wrote:DESCRIPTION
dmidecode is a tool for dumping a computer's DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system's hardware components, as well as
other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware. While this
is a good point in terms of report speed and safeness, this also makes the presented information possibly unreliable.
man 1 lshw wrote:DESCRIPTION
lshw is a small tool to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU ver‐
sion and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems and on some PowerPC machines (PowerMac G4 is known to work).

It currently supports DMI (x86 and IA-64 only), OpenFirmware device tree (PowerPC only), PCI/AGP, CPUID (x86), IDE/ATA/ATAPI, PCMCIA (only tested on x86), SCSI and USB.
[...]
lshw -disable dmi
Don't use DMI to detect hardware.
While free uses actual hardware detection by the kernel
man 1 free wrote:DESCRIPTION
free displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered by parsing /proc/mem‐
info.
dmidecode, lshw, and Windows are unreliable on hardware detection, they all rely on information provided by the BIOS, which in your case turned out to be inaccurate.
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

wintermute
Posts: 4
Joined: 2024-06-05 23:02
Has thanked: 1 time

Re: [Solved] Incorrect RAM-size in free -h, but not in dmidecode. What's wrong?

#6 Post by wintermute »

ah, I see, that's very interesting and I wasn't aware of that. Well, that pretty much explains everything. Thank you for clarifying!

gracious24
Posts: 2
Joined: 2024-09-18 07:11

Re: [Solved] Incorrect RAM-size in free -h, but not in dmidecode. What's wrong?

#7 Post by gracious24 »

I have a similar problem.

Hardware: HP t630 - 2 memory slots - 32GB max supported.

2 pairs of 16 GB (2 X 16GB Mushkin / 2 X 16GB Hynix) memory modules.

When installing the Mushkin pair of 16GB modules I get the correct amount of 32 GB and everything is honky-dory.

When installing the Hynix pair - dmidecode (output below) + lshw report 32 GB installed memory, but only 16GB are available to the system (using the commands free -h or top). The only difference (apart from model information) on those reports is that the Mushkin are "Rank: 1" and the Hynix are "Rank: 2".

With the Hynix modules installed I've run both the HP memory test (reported 32GB of memory and tested those) and the Grub memory test (reported only 16GB and tested those) , which each took a while to complete and neither of them reported any errors.

What other things could I try to make the machine use the full 32 GB when using the Hynix modules?

This is the output for dmidecode for the Mushkin modules:

Code: Select all

# dmidecode 3.4
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

Handle 0x0027, DMI type 16, 23 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 32 GB
	Error Information Handle: Not Provided
	Number Of Devices: 3

Handle 0x0029, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0027
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 16 GB
	Form Factor: SODIMM
	Set: None
	Locator: Top-Slot 1 (left)
	Bank Locator: CHANNEL A
	Type: DDR4
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 1866 MT/s
	Manufacturer: <BAD INDEX>
	Serial Number: 00001863
	Asset Tag: 9876543210
	Part Number: J642GU44J2320NL
	Rank: 1
	Configured Memory Speed: 1866 MT/s
	Minimum Voltage: 1.5 V
	Maximum Voltage: 1.5 V
	Configured Voltage: 1.5 V

Handle 0x002A, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0027
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 16 GB
	Form Factor: SODIMM
	Set: None
	Locator: Top-Slot 2 (right)
	Bank Locator: CHANNEL B
	Type: DDR4
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 1866 MT/s
	Manufacturer: <BAD INDEX>
	Serial Number: 00001863
	Asset Tag: 9876543210
	Part Number: J642GU44J2320NL
	Rank: 1
	Configured Memory Speed: 1866 MT/s
	Minimum Voltage: 1.5 V
	Maximum Voltage: 1.5 V
	Configured Voltage: 1.5 V

This is the output for the Hynix modules:

Code: Select all

# dmidecode 3.4
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

Handle 0x0027, DMI type 16, 23 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 32 GB
	Error Information Handle: Not Provided
	Number Of Devices: 3

Handle 0x0029, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0027
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 16 GB
	Form Factor: SODIMM
	Set: None
	Locator: Top-Slot 1 (left)
	Bank Locator: CHANNEL A
	Type: DDR4
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 1866 MT/s
	Manufacturer: Hynix/Hyundai
	Serial Number: 72E89FE6
	Asset Tag: 9876543210
	Part Number: HMA82GS6CJR8N-VK  
	Rank: 2
	Configured Memory Speed: 1866 MT/s
	Minimum Voltage: 1.5 V
	Maximum Voltage: 1.5 V
	Configured Voltage: 1.5 V

Handle 0x002A, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0027
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 16 GB
	Form Factor: SODIMM
	Set: None
	Locator: Top-Slot 2 (right)
	Bank Locator: CHANNEL B
	Type: DDR4
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 1866 MT/s
	Manufacturer: Hynix/Hyundai
	Serial Number: 2F4A13FC
	Asset Tag: 9876543210
	Part Number: HMA82GS6CJR8N-VK  
	Rank: 2
	Configured Memory Speed: 1866 MT/s
	Minimum Voltage: 1.5 V
	Maximum Voltage: 1.5 V
	Configured Voltage: 1.5 V


CwF
Global Moderator
Global Moderator
Posts: 3000
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 60 times
Been thanked: 243 times

Re: [Solved] Incorrect RAM-size in free -h, but not in dmidecode. What's wrong?

#8 Post by CwF »

gracious24 wrote: 2024-09-18 18:43 I have a similar problem.
You should usually create a new topic for a 'similar' issue, especially a [Solved] one.

Rank 2 is essentially equivalent to two physical slots/dimms. Rank can go up to 4, maybe more, and not all systems can support all ranks in a single slot. The bios itself is where to check for proper support, or the systems manual. There is a total rank/slot/channel the system can support, a higher rank in one slot may prohibit the next slots function. It's possible the usable16GB reported for the Hynix pair is actually the first dimm only.
Mottainai

gracious24
Posts: 2
Joined: 2024-09-18 07:11

Re: [Solved] Incorrect RAM-size in free -h, but not in dmidecode. What's wrong?

#9 Post by gracious24 »

CwF wrote: 2024-09-18 20:24 You should usually create a new topic for a 'similar' issue, especially a [Solved] one.
I'm sorry. Will do next time.

That's a logical explanation that I haven't really seen explained so clearly. I will investigate, but probably that's it then... :-/ so probably off to sell those modules again...

Post Reply