2

I had 4gb ram on a old desktop pc, I just installed 4gb extra ram. Bios detects 8gb, windows detects it. But linux only sees 4gb.

uname -a:

Linux appie-imedia-S2185 5.4.0-70-generic #78-Ubuntu SMP Fri Mar 19 13:29:52 UTC 2021 x86_64  
x86_64 x86_64 GNU/Linux

free -m:

total        used        free      shared  buff/cache   available
Mem:           3365        1278         806         100        1280        1753
Swap:          3514           0        3514

cat /proc/meminfo | grep -i memtotal

MemTotal:        3446176 kB

But then lshw notices there is actually 8gb:

lshw -short | grep 'System\ Memory':

/0/14                        memory         8GiB System Memory

Since Bios, Windows and lshw sees the 8gb, the problem should be with linux.... Anyone any clue on how to make linux see and use all my ram?

0

1 Answer 1

1

What free shows is what is available for the OS to use. As per this, the difference might have been taken by the graphics.

OTOH, lshw shows the amount of hardware RAM, which is what you see in the BIOS/Windows (which would likely also use some of the 8Gb for shared video RAM).

Note that some commands may help assessing the difference:

  1. lshw -class memory -short (a slight modification of your command).
  2. free -h (a slight modification of your command).
  3. sudo dmidecode | less (showing info on the physical memory banks, etc.) You may add option --type memory.
  4. htop
  5. Comment #10 in this thread.
  6. cat /var/log/kern.log | grep -i memory
  7. cat /var/log/kern.log.1 | grep -i memory (and possibly other gzipped logs, ref)

Related:

  1. https://itsfoss.community/t/ram-in-lshw-compared-to-free/3368
  2. https://linuxhint.com/commands-to-manage-linux-memory/
  3. How to find how much RAM does my computer have?
  4. how to get graphics card memory info? windows and linux shows different value
2
  • Hmmm, i removed the ram and put it back in several times. And now all sudenly htop shows 7.2 gb...
    – Arjan
    Apr 5, 2021 at 13:23
  • @Arjan - I don't know what else changed in your case, and whether you found out more information about the suggested cause of the difference. Please see also added link #4. Apr 5, 2021 at 15:38

You must log in to answer this question.

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