I am running Ubuntu 25.04 on a new ThinkPad L13, with 8GB of RAM. When I use the "free" command, it tells me I have just 6.1GB in total!
$ free -hw
               total        used        free      shared     buffers       cache   available
Mem:           6.1Gi       3.6Gi       1.0Gi       112Mi       172Mi       1.8Gi       2.5Gi
Here are the kernel boot messages regarding memory; they say quite a bit about system/video RAM, but I am not an expert so I cannot construct the "missing" 1.9GB from these figures.
May 15 09:59:40 mung kernel: Memory: 6289280K/7158200K available (21770K kernel code, 4579K rwdata, 15936K rodata, 5096K init, 4468K bss, 850456K reserved, 0K cma-reserved)
May 15 09:59:40 mung kernel: x86/mm: Memory block size: 128MB
May 15 09:59:40 mung kernel: Freeing initrd memory: 74372K
May 15 09:59:40 mung kernel: memory memory25: hash matches
May 15 09:59:40 mung kernel: Freeing unused decrypted memory: 2028K
May 15 09:59:40 mung kernel: Freeing unused kernel image (initmem) memory: 5096K
May 15 09:59:40 mung kernel: Freeing unused kernel image (text/rodata gap) memory: 756K
May 15 09:59:40 mung kernel: Freeing unused kernel image (rodata/data gap) memory: 448K
May 15 09:59:40 mung kernel: nvme nvme0: allocated 64 MiB host memory buffer (1 segment).
May 15 09:59:41 mung kernel: Non-volatile memory driver v1.3
May 15 09:59:44 mung kernel: amdgpu 0000:07:00.0: amdgpu: Trusted Memory Zone (TMZ) feature enabled
May 15 09:59:44 mung kernel: [drm] amdgpu: 1024M of VRAM memory ready
May 15 09:59:44 mung kernel: [drm] amdgpu: 3120M of GTT memory ready.
Can anyone explain why I am "losing" nearly 2GB of RAM? Well, I have been into the BIOS, and can confirm that 1GB is allocated to integrated graphics, but that "reserved" figure in the available RAM reported by the kernel message (nearly 1GB) is suspicous to me.
Here is some data for comparison (all machines have 8GB of physical RAM), first, an Intel NUC (Debian):
May 06 12:20:17 bonsai kernel: Memory: 3550328K/8282144K available (12295K kernel code, 2542K rwdata, 7640K rodata, 2680K init, 17688K bss, 340280K reserved, 0K cma-reserved)
                   total        used        free      shared  buff/cache   available
    Mem:           7.7Gi       2.1Gi       1.4Gi       419Mi       4.2Gi       4.8Gi
also, A Raspberry Pi 500 (PiOS):
May 11 15:51:08 orion kernel: Memory: 8145632K/8380416K available (13952K kernel code, 2264K rwdata, 4800K rodata, 5440K init, 647K bss, 162544K reserved, 65536K cma-reserved)
                   total        used        free      shared  buff/cache   available
    Mem:           7.9Gi       2.7Gi       2.2Gi       300Mi       3.4Gi       5.2Gi
(let's ignore that the NUC seem to be reporting ~3.55GB/~8GB, that one is for another day!). The NUC and the Pi give me nearly all of my RAM (remember we are talking about the "total" column here), but the Thinkpad takes nearly 2GB!
Anyhow, the question is, can I do anything to "recover" some of this lost memory? I am aware of this question, but my situation is much worse, and also I have provided more information.
This is not a question about swap, buffers, cache, or applications, it is about Ubuntu, the hardware, and the Linux kernel. This is fairly common hardware, and a standard Ubuntu installation. MX Linux live USB "reserves" 0.5GB less RAM than Ubuntu.
Enjoy your memory-hog of an OS people, I am long gone!
 
    
 
    