You are not logged in.

#1 2019-01-29 19:56:54

bonanza
Member
Registered: 2015-06-08
Posts: 23

New RAM not detected

I just upgraded my RAM from 16GB to 32GB, but htop, free and /proc/meminfo all show only 16GB (the old setup):

# cat /proc/meminfo | grep MemTotal
MemTotal:       16417800 kB

# free -g
              total        used        free      shared  buff/cache   available
Mem:             15           2          11           0           2          12
Swap:            15           0          15

Interestingly, dmidecode shows:

# dmidecode -t memory | grep Size
        Size: 8192 MB
        Size: 8192 MB
        Size: 8192 MB
        Size: 8192 MB

In bios and windows (dual boot) all 32GB show up.

What am I doing wrong here?

P.S.:
I am running the current LTS kernel:

# uname -a                                                                                                                                                                                                                                                      :(
Linux arch-desktop 4.19.18-1-lts #1 SMP Sat Jan 26 13:20:43 CET 2019 x86_64 GNU/Linux

Offline

#2 2019-01-29 20:07:09

loqs
Member
Registered: 2014-03-06
Posts: 17,377

Re: New RAM not detected

What is the full output of dmesg?

Offline

#3 2019-01-29 20:10:34

bonanza
Member
Registered: 2015-06-08
Posts: 23

Re: New RAM not detected

loqs wrote:

What is the full output of dmesg?


Thanks for your reply. Please find the log here: https://pastebin.com/6SrQ7gHM

Offline

#4 2019-01-29 20:12:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: New RAM not detected

loqs wrote:

What is the full output of dmesg?

That is peculiar... you can also grep for errors:

dmesg | grep -i 'error\|warn\|exception'
bonanza wrote:

I just upgraded my RAM from 16GB to 32GB, but htop, free and /proc/meminfo all show only 16GB (the old setup):

# cat /proc/meminfo | grep MemTotal
MemTotal:       16417800 kB

As an aside, there is no need to cat the file, just grep it directly:

% grep MemTotal /proc/meminfo
MemTotal:       32835412 kB

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2019-01-29 20:15:53

bonanza
Member
Registered: 2015-06-08
Posts: 23

Re: New RAM not detected

graysky wrote:

That is peculiar... you can also grep for errors:

dmesg | grep -i 'error\|warn\|exception'

Thanks for your reply and the hint!

Here the output:

dmesg | grep -i 'error\|warn\|exception'
[    0.000000] ACPI BIOS Warning (bug): Optional FADT field Pm2ControlBlock has valid Length but zero Address: 0x0000000000000000/0x1 (20180810/tbfadt-624)
[    0.368666] RAS: Correctable Errors collector initialized.
[   12.470874] usb 4-2.2: Warning! Unlikely big volume range (=511), cval->res is probably wrong.
[   12.471392] usb 4-2.2: Warning! Unlikely big volume range (=767), cval->res is probably wrong.
[   12.717988] amdgpu: [powerplay] Error in phm_get_clock_info

Offline

#6 2019-01-29 20:17:22

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: New RAM not detected

Line 229 of your output clearly shows that the kernel isn't seeing it...  since you said Windows does see it, I am wondering about a more modern kernel.  Can you try the latest from the 4.20.x series?

[  +0.000000] Memory: 16283484K/16708136K available (12300K kernel code, 1362K rwdata, 3636K rodata, 1580K init, 3868K bss, 424652K reserved, 0K cma-reserved)

Last edited by graysky (2019-01-29 20:18:02)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2019-01-29 20:22:13

bonanza
Member
Registered: 2015-06-08
Posts: 23

Re: New RAM not detected

graysky wrote:

Line 229 of your output clearly shows that the kernel isn't seeing it...  since you said Windows does see it, I am wondering about a more modern kernel.  Can you try the latest from the 4.20.x series?

[  +0.000000] Memory: 16283484K/16708136K available (12300K kernel code, 1362K rwdata, 3636K rodata, 1580K init, 3868K bss, 424652K reserved, 0K cma-reserved)

Please find the 4.20 dmesg log here: https://pastebin.com/LQ66KzVT

It also says:

[  +0.000000] Memory: 16283624K/16708136K available (12293K kernel code, 1268K rwdata, 3688K rodata, 1536K init, 3936K bss, 424512K reserved, 0K cma-reserved)

Offline

#8 2019-01-29 20:28:36

loqs
Member
Registered: 2014-03-06
Posts: 17,377

Re: New RAM not detected

[  +0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000041f37ffff] usable
....
[  +0.000000] reserve setup_data: [mem 0x0000000100000000-0x000000041f37ffff] usable
....
[  +0.000000] TOM2: 0000000420000000 aka 16896M

The firmware map only lists 16GB as available.

graysky wrote:

That is peculiar... you can also grep for errors:

dmesg | grep -i 'error\|warn\|exception'

Please do not do that though as it removes context.

Offline

#9 2019-01-29 20:30:50

bonanza
Member
Registered: 2015-06-08
Posts: 23

Re: New RAM not detected

loqs wrote:
[  +0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000041f37ffff] usable
....
[  +0.000000] reserve setup_data: [mem 0x0000000100000000-0x000000041f37ffff] usable
....
[  +0.000000] TOM2: 0000000420000000 aka 16896M

The firmware map only lists 16GB as available.

Thanks, but what can I do about it?

Offline

#10 2019-01-29 20:37:56

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: New RAM not detected

To confirm Windows shows 32 available and 32 usable?  What about the BIOS?  If both are showing it, and if you're not some how limiting the is (boot flag?) in your bootloader, build and try current linux-mainline to see if it can see the memory: https://aur.archlinux.org/packages/linux-mainline/

In googling this, others with your hardware have reported similar issues, but quickly browsing the hits (circa late 2017), did not reveal a solution.

Last edited by graysky (2019-01-29 20:38:12)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2019-01-29 20:44:56

bonanza
Member
Registered: 2015-06-08
Posts: 23

Re: New RAM not detected

graysky wrote:

To confirm Windows shows 32 available and 32 usable?  What about the BIOS?  If both are showing it, and if you're not some how limiting the is (boot flag?) in your bootloader, build and try current linux-mainline to see if it can see the memory: https://aur.archlinux.org/packages/linux-mainline/

In googling this, others with your hardware have reported similar issues, but quickly browsing the hits (circa late 2017), did not reveal a solution.

windows showed 32 GB in dxdiag, that's all I checked.
In the BIOS, all 4 8GB sticks show up (just as in dmidecode).

I am not fully sure whether this is what you mean, but here my systemd-boot entry for this kernel:

cat /boot/loader/entries/arch.conf 
title Arch Linux Encrypted
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=/dev/nvme0n1p2:lvm:allow-discards: resume=/dev/mapper/vg0-swap root=/dev/mapper/vg0-root rw quiet

P.S.: I am building the mainline kernel now...

Last edited by bonanza (2019-01-29 20:45:38)

Offline

#12 2019-01-29 20:45:51

loqs
Member
Registered: 2014-03-06
Posts: 17,377

Re: New RAM not detected

Try the boot option add_efi_memmap see if the efi map adds the additional 16GB.
If that fails possibly the boot option memmap=16G@0x41F380000 would get someone to double check the values for that option.
Edit:
Unofficial_user_repositories#miffe contains linux-mainline prebuilt if you are prepared to trust an unofficial repository.

Last edited by loqs (2019-01-29 20:48:35)

Offline

#13 2019-01-29 20:52:09

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: New RAM not detected

If the mainline kernel fails to show all 32 and if loqs' suggestions also fail, you might try finding a ryzen 7 board somewhere and search/post to it.  Surely others are using 32 G with that CPU/chipset under Linux.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#14 2019-01-29 20:54:27

bonanza
Member
Registered: 2015-06-08
Posts: 23

Re: New RAM not detected

loqs wrote:

Try the boot option add_efi_memmap see if the efi map adds the additional 16GB.

I have added this boot option and obtained this dmesg log : https://pastebin.com/hEyTPw7k

This stuff is beyond my skills, but I noticed:

[  +0.000000] e820: update [mem 0xd42be018-0xd42ce857] usable ==> usable
[  +0.000000] e820: update [mem 0xd42be018-0xd42ce857] usable ==> usable
[  +0.000000] e820: update [mem 0xd42a1018-0xd42bda57] usable ==> usable
[  +0.000000] e820: update [mem 0xd42a1018-0xd42bda57] usable ==> usable

loqs wrote:

If that fails possibly the boot option memmap=16G@0x41F380000 would get someone to double check the values for that option.

Is the

memmap=16G@0x41F380000

option an additional boot parameter I shall provide (on top of add_efi_memmap)?

Offline

#15 2019-01-29 21:02:57

loqs
Member
Registered: 2014-03-06
Posts: 17,377

Re: New RAM not detected

Try add_efi_mmap first then replace it with memmap=16G@0x41F380000 assuming the base address is correct the kernel will then use the additional 16G even though the firmware has told it the memory is not there.
However if the firmware has mapped anything there then when the kernel tries to use the memory there that could lead to memory access violations / corruption.
If Windows shows 32GB available it might be the firmware is showing different maps based on the ACPI identifier the OS uses.

Offline

#16 2019-01-29 21:09:02

bonanza
Member
Registered: 2015-06-08
Posts: 23

Re: New RAM not detected

loqs wrote:

Try add_efi_mmap first then replace it with memmap=16G@0x41F380000 assuming the base address is correct the kernel will then use the additional 16G even though the firmware has told it the memory is not there.
However if the firmware has mapped anything there then when the kernel tries to use the memory there that could lead to memory access violations / corruption.

The first option resulted in the log above, where still just 16GB show up in free.
The second option results in a fully blank screen after kernel selection (the cryptsetup/luks password prompt does not show up)


loqs wrote:

If Windows shows 32GB available it might be the firmware is showing different maps based on the ACPI identifier the OS uses.

Is there anything on the BIOS side I can do to help this? (latest BIOS already installed)

Offline

#17 2019-01-29 21:32:29

loqs
Member
Registered: 2014-03-06
Posts: 17,377

Re: New RAM not detected

From the firmware not that I can think of. kernel-parameters.txt lists all the options you can try.
acpi_osi=! acpi_osi="Windows 2012" might cause the firmware to supply a different memory map.
Otherwise someone else might be able to come up with better parameters for the memmap options.

Offline

#18 2019-01-29 22:05:42

seth
Member
Registered: 2012-09-03
Posts: 51,299

Re: New RAM not detected

In case that doesn't work, please notice that the mere fact that the BIOS can report 4 8GB DIMMs does not guarantee that it can actually address 32GB. Consult the boards manual.
I've no idea how dxdiag obtains that info, but you should check the free memory in the task manager and also try to actually use it.
Also try https://www.archlinux.org/packages/extr … emtest86+/ (provides an image to boot and test RAM, but more importantly report the amount ;-)

Did you specify the actual board/bios/version… somewhere?

Offline

#19 2019-01-29 23:10:47

loqs
Member
Registered: 2014-03-06
Posts: 17,377

Re: New RAM not detected

@seth

[  +0.000000] DMI: To Be Filled By O.E.M. To Be Filled By O.E.M./X370 Gaming K4, BIOS P5.10 12/17/2018

Motherboard Fatal1ty X370 Gaming K4
https://www.asrock.com/mb/AMD/Fatal1ty% … asp#Memory http://asrock.pc.cdn.bitgravity.com/Man … g%20K4.pdf
32GB appears to be supported although higher timings are officially limited to 2 single rank DIMMs.

Last edited by loqs (2019-01-29 23:13:02)

Offline

#20 2019-01-29 23:34:54

seth
Member
Registered: 2012-09-03
Posts: 51,299

Re: New RAM not detected

It also doesn't support random arrangements of SR/DR mixes
@bonanza, see page 23 in that pdf and cross-check it w/ your actual setup - also despite popular belief, there's no direct relation between the rank count and on how many sides the black bricks are on the green board.

Offline

#21 2019-01-30 05:10:54

krutoileshii
Member
Registered: 2019-01-15
Posts: 45

Re: New RAM not detected

Can you post the output of

sudo dmidecode

and the memory module information?

Offline

#22 2019-01-30 09:49:24

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: New RAM not detected

seth wrote:

In case that doesn't work, please notice that the mere fact that the BIOS can report 4 8GB DIMMs does not guarantee that it can actually address 32GB.

It shouldn't be the case with any modern AMD BIOS, I got 32GB to work even on old socket AM3 boards without BIOS updates and with official support for 16GB only, including one from MSI.

BIOS may not enable all modules it found for some reason but it will still report them as present. Therefore seeing all of them in DMI means nothing.
In BIOS setup, look for position called "total system memory" or something like that. This should be 32G. In Windows, do indeed use the task manager.
Though I think that dxdiag would report the same number, so we are probably seeing some problem unique to Linux.

Offline

#23 2019-01-30 21:47:00

bonanza
Member
Registered: 2015-06-08
Posts: 23

Re: New RAM not detected

krutoileshii wrote:

Can you post the output of

sudo dmidecode

and the memory module information?

Please find dmidecode output here: https://pastebin.com/sGy5AP1T

Sorry, but what exactly is the "memory module"?

I have also made a screen shot from windows' task manager and shows something odd (to me atleast): https://i.imgur.com/o66941y.png
He seems to recognize 32GB but probably can use only 16GB (just like linux?)


seth wrote:

It also doesn't support random arrangements of SR/DR mixes
@bonanza, see page 23 in that pdf and cross-check it w/ your actual setup - also despite popular belief, there's no direct relation between the rank count and on how many sides the black bricks are on the green board.


Thanks for the hint! The BIOS reports that all RAM sticks are working on 2133 Mhz in single mode, please see: https://i.imgur.com/MLfa7jl.jpg
I am not fully sure whether I understand page 23. What do they mean with ?

SR: Single rank DIMM, 1Rx4 or 1Rx8 on DIMM module label
DR: Dual rank DIMM, 2Rx4 or 2Rx8 on DIMM module label

Last edited by bonanza (2019-01-30 21:51:53)

Offline

#24 2019-01-30 22:03:13

seth
Member
Registered: 2012-09-03
Posts: 51,299

Re: New RAM not detected

The windows taskmanager is weird but does indeed support a similar condition (32GB seen, only 16GB available)

https://en.wikipedia.org/wiki/DIMM#Ranking
https://de.wikipedia.org/wiki/Speicherm … 4nke/Ranks (OP seems german and the page has nice pictures smile
It's usually noted on the module, sometimes on an ugly sticker.
According to dmidecode you've 4 SR modules, so the speed should™ be fine, but we don't live in shouldland so just try to downclock the memory.

Offline

#25 2019-01-30 22:11:38

loqs
Member
Registered: 2014-03-06
Posts: 17,377

Re: New RAM not detected

CMK16GX4M2B3000C15 * 4 appear to me to 4 rank 1 modules currently running at 2133MHz@ 1.2V.
Although it is specified to 3000MHz @ 1.35V.
CPU-Z for Windows should be able to provide more information on each memory module.

Offline

Board footer

Powered by FluxBB