Score:0

RAM not detected correctly

nz flag

I just installed Ubuntu 22.10 in my laptop with 8 GB of RAM. I was doing some tests to test the performance of the pc when I notice that Ubuntu see only 6.7 GB instead of 8, and I don't understand why. I also notice that a lot of memory is used by the buff/cache even if I don't open anything. How can I solve this problem? I put the result of free -h in order to show you the problem.

total        used        free      shared  buff/cache   available
Mem:        6,7Gi       2,0Gi       2,8Gi        50Mi       1,9Gi       4,4Gi
Swap:       4,0Gi          0B       4,0Gi
Anthony Kelly avatar
ng flag
Do other methods of examining memory agree that total memory is 6.7GB? Try `cat /proc/meminfo`, `vmstat -s`, `top`. A high buff/cache memory isn't unusual and may be quickly available for other purposes. See https://unix.stackexchange.com/questions/390518/what-do-the-buff-cache-and-avail-mem-fields-in-top-mean.
Ludovico Latini avatar
nz flag
With all the other methods the system seems to detect only 6,7 GB
Anthony Kelly avatar
ng flag
The kernel can set aside some memory for its own use. What does `cat /var/log/dmesg.0 | grep "Memory:"` return? The various memory commands show usable RAM, which is always less that physically installed RAM for various reasons (see https://unix.stackexchange.com/questions/30324/why-does-linux-show-both-more-and-less-memory-than-i-physically-have-installed).
Ludovico Latini avatar
nz flag
`[ 0.058070] kernel: Memory: 6883660K/7274124K available (18440K kernel code, 4054K rwdata, 11244K rodata, 3148K init, 4924K bss, 390204K reserved, 0K cma-reserved)`
Anthony Kelly avatar
ng flag
So it looks like it's detecting ~7GB physical memory, still not 8GB.
Ludovico Latini avatar
nz flag
I'm pretty sure that I have 8GB lol
Ludovico Latini avatar
nz flag
It could be a kernel problem?
Anthony Kelly avatar
ng flag
Run `sudo dmidecode --type 17` to see memory module size. You could have integrated graphics that is using some of your memory. Also, memory is usually sold as GB (1000^3) whereas Linux will be quoting GiB (1024^3). This could explain about 0.3GB of the difference and possibly 1GB of integrated graphics bringing it down to 6.7GB.
Ludovico Latini avatar
nz flag
Indeed, I have integrated graphics in fact my laptop is the Huawei Matebook d15 with a R7 3700U, but I didn't know that integrated graphics takes memory from ram I thought it has its own memory. However the command says I have 2 4GB slots
ChanganAuto avatar
us flag
No, a dGPU has its own memory. iGPUs always use the system's memory. It was always like this.
Ludovico Latini avatar
nz flag
How can I see how many GB my iGPU use?
ChanganAuto avatar
us flag
IF you can that information is in the motherboard's firmware (UEFI and previously BIOS).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.