4

I have a problem with OS. All tools including kernel shows only half of my actual RAM memory. I have one 16G memory chip installed in my laptop and all is shown good in BIOS.

Some info about configuration:

HW

A laptop Dell XPS 15 9550 (PDF link), which says among other things:

Memory

Slots: Two SODIMM slots

Type: DDR4

Speed: 2133 MHz

Configurations supported: 8 GB, 16 GB, and 32 GB

CPU

Intel® Core™ i7-6700HQ Processor (Ark link), which says among other things:

Max Memory Size (dependent on memory type): 64 GB

Memory Types: DDR4-2133, LPDDR3-1866, DDR3L-1600

System info

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.
90 structures occupying 5605 bytes.
Table at 0x000E8C20.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: Dell Inc.
        Version: 1.14.0
        Release Date: 02/13/2020
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 16 MB
        Characteristics:
                PCI is supported
                PNP is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                EDD is supported
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 kB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                Print screen service is supported (int 5h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                Printer services are supported (int 17h)
                ACPI is supported
                USB legacy is supported
                Smart battery is supported
                BIOS boot specification is supported
                Function key-initiated network boot is supported
                Targeted content distribution is supported
                UEFI is supported
        BIOS Revision: 1.14

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Dell Inc.
        Product Name: XPS 15 9550
        Version: Not Specified
        Serial Number: GR1RD72
        UUID: 4c4c4544-0052-3110-8052-c7c04f443732
        Wake-up Type: Power Switch
        SKU Number: 06E4
        Family: XPS

Kernel

$ uname -a
Linux piotr-XPS-15-9550 5.11.0-22-generic #23~20.04.1-Ubuntu SMP Thu Jun 17 12:51:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Memory shown by free

$ free -h
              total        used        free      shared  buff/cache   available
Mem:          7,0Gi       2,6Gi       1,1Gi       887Mi       3,4Gi       3,3Gi
Swap:         979Mi          0B       979Mi

Memory show by /proc/meminfo:

$ cat /proc/meminfo 
MemTotal:        7382044 kB
MemFree:         1142512 kB
MemAvailable:    3467104 kB
Buffers:          201548 kB
Cached:          3183760 kB
SwapCached:            0 kB
Active:           823272 kB
Inactive:        4182420 kB
Active(anon):       1924 kB
Inactive(anon):  2520488 kB
Active(file):     821348 kB
Inactive(file):  1661932 kB
Unevictable:      831044 kB
Mlocked:              32 kB
SwapTotal:       1003516 kB
SwapFree:        1003516 kB
Dirty:               104 kB
Writeback:             0 kB
AnonPages:       2451456 kB
Mapped:           842608 kB
Shmem:            908320 kB
KReclaimable:     137292 kB
Slab:             238076 kB
SReclaimable:     137292 kB
SUnreclaim:       100784 kB
KernelStack:       19088 kB
PageTables:        36676 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     4694536 kB
Committed_AS:    9487844 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       76280 kB
VmallocChunk:          0 kB
Percpu:             6176 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      328276 kB
DirectMap2M:     6234112 kB
DirectMap1G:     2097152 kB

Memory shown by dmidecode

$ sudo dmidecode -t memory
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

Handle 0x0038, 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: 2

Handle 0x0039, DMI type 17, 40 bytes
Memory Device
        Array Handle: 0x0038
        Error Information Handle: Not Provided
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 16384 MB
        Form Factor: SODIMM
        Set: None
        Locator: DIMM A
        Bank Locator: DIMM A
        Type: DDR4
        Type Detail: Synchronous
        Speed: 2133 MT/s
        Manufacturer: 0793
        Serial Number: 12161215
        Asset Tag: 16360000
        Part Number: GR2133S464L15/16G   
        Rank: 2
        Configured Memory Speed: 2133 MT/s
        Minimum Voltage: Unknown
        Maximum Voltage: Unknown
        Configured Voltage: 1.2 V

Handle 0x003A, DMI type 17, 40 bytes
Memory Device
        Array Handle: 0x0038
        Error Information Handle: Not Provided
        Total Width: Unknown
        Data Width: Unknown
        Size: No Module Installed
        Form Factor: DIMM
        Set: None
        Locator: DIMM B
        Bank Locator: DIMM B
        Type: Unknown
        Type Detail: None
        Speed: Unknown
        Manufacturer: Not Specified
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Rank: Unknown
        Configured Memory Speed: Unknown
        Minimum Voltage: Unknown
        Maximum Voltage: Unknown
        Configured Voltage: Unknown

Output of dmesg:

$ dmesg | grep -i e820
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009dbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009dc00-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000032667fff] usable
[    0.000000] BIOS-e820: [mem 0x0000000032668000-0x0000000032668fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x0000000032669000-0x0000000036fcefff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000036fcf000-0x000000003700cfff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000003700d000-0x0000000037674fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x0000000037675000-0x000000003fffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fe000000-0x00000000fe010fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000029e22cfff] usable
[    0.000000] BIOS-e820: [mem 0x000000029e22d000-0x00000004bdffffff] reserved
[    0.000767] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000771] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.123701] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in E820
[    0.333546] e820: reserve RAM buffer [mem 0x0009dc00-0x0009ffff]
[    0.333548] e820: reserve RAM buffer [mem 0x32668000-0x33ffffff]
[    0.333549] e820: reserve RAM buffer [mem 0x29e22d000-0x29fffffff]

Full output of dmesg: https://pastebin.com/B7qLzVvK

OS: Linux Mint 20 Ulyana

What I've done before posting here:

  1. Updated bios to newest version
  2. Used memtest86 and dell diagnostics tool - everything fine, bios shows 16G
  3. Upgraded kernel to 5.11
  4. I've tried Ubuntu 20.04 from USB drive and it shows 16G RAM in system monitor app (somehow I could not type any characters in console form build in keyboard or from usb one :/)

Could it be because I don't use UEFI to boot?

What can I do to debug and fix this? Thank you.

//EDIT

$ decode-dimms                                                                                                                                              
# decode-dimms version $Revision$

Memory Serial Presence Detect Decoder
By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner,
Jean Delvare, Trent Piepho and others


Decoding EEPROM: /sys/bus/i2c/drivers/ee1004/0-0050
Guessing DIMM is in                              bank 1

---=== SPD EEPROM Information ===---
EEPROM CRC of bytes 0-125                        OK (0xEF1D)
# of bytes written to SDRAM EEPROM               384
Total number of bytes in EEPROM                  512
Fundamental Memory type                          DDR4 SDRAM
SPD Revision                                     1.0
Module Type                                      SO-DIMM
EEPROM CRC of bytes 128-253                      OK (0x2355)

---=== Memory Characteristics ===---
Maximum module speed                             2132 MHz (PC4-17000)
Size                                             16384 MB
Banks x Rows x Columns x Bits                    16 x 16 x 10 x 64
SDRAM Device Width                               8 bits
Ranks                                            2
Rank Mix                                         Symmetrical
AA-RCD-RP-RAS (cycles)                           15-15-15-36
Supported CAS Latencies                          16T, 15T, 14T, 13T, 12T, 11T, 10T

---=== Timings at Standard Speeds ===---
AA-RCD-RP-RAS (cycles) as DDR4-1866              13-13-13-31
AA-RCD-RP-RAS (cycles) as DDR4-1600              11-11-11-27

---=== Timing Parameters ===---
Minimum Cycle Time (tCKmin)                      0.938 ns
Maximum Cycle Time (tCKmax)                      1.500 ns
Minimum CAS Latency Time (tAA)                   13.750 ns
Minimum RAS to CAS Delay (tRCD)                  13.750 ns
Minimum Row Precharge Delay (tRP)                13.750 ns
Minimum Active to Precharge Delay (tRAS)         33.000 ns
Minimum Active to Auto-Refresh Delay (tRC)       46.750 ns
Minimum Recovery Delay (tRFC1)                   350.000 ns
Minimum Recovery Delay (tRFC2)                   260.000 ns
Minimum Recovery Delay (tRFC4)                   160.000 ns
Minimum Four Activate Window Delay (tFAW)        21.000 ns
Minimum Row Active to Row Active Delay (tRRD_S)  3.700 ns
Minimum Row Active to Row Active Delay (tRRD_L)  5.300 ns
Minimum CAS to CAS Delay (tCCD_L)                5.625 ns

---=== Other Information ===---
Package Type                                     Monolithic
Maximum Activate Count                           Unlimited
Post Package Repair                              One row per bank group
Soft PPR                                         Not Supported
Module Nominal Voltage                           1.2 V
Thermal Sensor                                   No

---=== Physical Characteristics ===---
Module Height                                    30 mm
Module Thickness                                 2 mm front, 2 mm back
Module Reference Card                            E revision 1

---=== Manufacturer Data ===---
Module Manufacturer                              Wilk Elektronik S.A.
Manufacturing Date                               2017-W06
Part Number                                      GR2133S464L15/16G   


Number of SDRAM DIMMs detected and decoded: 1

I've run dmesg again and did some calculations about this used/reserved memory. I hope they are correct but they look more less correct:

$ dmesg | grep 'BIOS-e820: \[mem' | sed -r 's/.*mem (0x.*)-(0x.*)\] (.*)/\1|\2|\3/g' | awk -F '|' '{printf "%10s %15.2f MB\n", $3, (strtonum($2) - strtonum($1)) / 1024/1024 }'
    usable            0.62 MB
  reserved            0.01 MB
  reserved            0.12 MB
    usable          798.46 MB
  ACPI NVS            0.00 MB
  reserved           80.34 MB
 ACPI data            0.24 MB
  ACPI NVS            6.41 MB
  reserved          137.54 MB
  reserved          256.00 MB
  reserved            0.07 MB
  reserved            0.00 MB
  reserved            0.00 MB
  reserved           16.00 MB
    usable         6626.18 MB
  reserved         8701.82 MB

Looks like around 9G is reserved and I don't know why...

// EDIT 2

Now it is getting super weird. I was just now in laptop service and we tested some other memory chips owned by them, and BIOS always shows correct values but not Linux:

  • when using my old 1x16G - OS shows 7G
  • when using my old 2x16G - OS shows 17G
  • when using 1x8G from service - shows 7G
  • when using 1x16G from service - shows 7G

This is just weird.

// EDIT 3

Damn it. I think I found the cause of showing only half of memory.

I've downloaded Kubuntu 21.04 USB version and booted it:

  1. in legacy mode (no UEFI) - shows half of memory
  2. in UEFI mode - shows all memory

My question now is why?

0

1 Answer 1

3

I'll answer my own question since I finally found what was happening.

TLDR;

Linux reported a maximum 8 GB per memory chip because I was using the legacy boot. When using the UEFI boot Linux shows full memory per chip.


Full story, maybe it will be of use to someone

I get this Dell laptop some time ago. It had nice spec like 32G RAM (2x16G), 4 cores i7, 512G SSD etc. I installed Linux Mint 19 and it was working well most of the time. Cashed like once or twice a day when there was heavy use of apps like two browser windows with multiple tabs, three instances of IDE, Youtube, video call, etc. at the same time. Symptoms were looking like graphic issues because of a "broken tv like" display when crashed. Only hard reset was able to bring back the laptop to life.

After few crashes, I decided to monitor some temperatures, CPU usage, memory usage, etc. This was the first time when I noticed that OS is showing around half of the actual memory showed in BIOS. This suggested some serious memory problems.

What is interesting dmidecode always shows correct values. Also dmesg shows that kerenel knows about full memory but reports only around half as usable.

I decided to make some tests on this laptop and start by running dell diagnostic tools and memtest86. Both tools showed 32G RAM and both failed after few minutes of the memory testing phase. Same symptoms as before. I was 99% sure it was a memory issue.

After this, I've tested different memory chip configurations and it failed only when both memory chips were inserted, no matter which slots. Looks like they both are fine (every single chip passed memtest86) but they don't work well when together with Dell hardware.

So to fix crashes I just needed to use only one memory slot.

Crashes were gone now but OS only reported 8 GB of RAM with 16 GB inserted. This was a problem because OS was starting to use swap pretty soon and was quite unusable.

Decided to check some entirely different memory chips just to see if reporting is ok.

  • old two 16G chips - reports around 17G RAM
  • one 8G chip - reports 8G RAM
  • 16G chip (different than previous ones) - report 8 GB (what the heck!?)

On all configurations, memtest86 and BIOS show correct RAM. So this is an OS problem. But why?

After the @LinuxSecurityFreak suggestion, I've tried booting Ubuntu live USB to see what is shown there. Dell one-time boot shows two possible boot options for USB, legacy, and UEFI. I first tried UEFI and RAM amount was correct, 16 GB. Then I tried legacy mode and boom! 8 GB only.

So my problem was caused by OS installed without UEFI boot. I probably turned off UEFI because I had some problems with live USB boot but I'm not sure.

The biggest mystery to me is why does it matter for OS kernel?

"Fix"

To fix all this I've just installed Kubuntu with UEFI enabled in BIOS. Now memory is reported correctly...

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .