NixOS does not find all of my Memory

I have a laptop with 16G of RAM, but NixOS often only detects about 2.5G of it. The problem often goes away after a reboot, but last time it took about 10 reboots to get my memory back, and that’s pretty annoying.

Also, the ‘reboot’ command doesn’t work for me, although I don’t know if that’s related.

Thanks in advance :smiley:

PS: This is the current Output of the ‘free’ command:

              total        used        free      shared  buff/cache   available
Mem:        2593576     1989576      229740       20660      374260      290316
Swap:             0           0           0

Huh. Someone else had a very similar issue recently: Only 2.2GB of 32GB of RAM available on most boots

I’ve ducked around a bit, it seems most other people reporting similar things had physically mis-seated sticks, BIOS issues, the occasional UEFI vs legacy BIOS, or just broken motherboards. It seems to be failure before Linux boots more often than not, and that seems consistent with the flaky behavior.

Why it shows up as “reserved” is probably a question for the kernel ML rather than here.

If this is a laptop you didn’t modify yourself, I’d give updating the BIOS a shot, and make sure I’m booting via UEFI (frankly the latter is unlikely to be the issue in 2023). If that doesn’t fix it, I’d start digging around with dmidecode and memtest.

Probably not, what happens when you use it?

Thanks for the response, I’ll have a look at updating the firmware as I’ve not done that in a while.

Probably not, what happens when you use it?

Nothing. When I do reboot now it complains about missing permissions, when I do sudo reboot now it prompts me for my password, exits without any output or error, but does not shut down or reboot my Computer.

Afaik reboot doesn’t take any positional args, you’re confusing it with shutdown. That should not cause issues though.

Anything useful in dmesg or journalctl -xe --boot after you try to reboot?

Hey, sry for the Delay. I’m not that familiar with those logs, so not everything I pasted below may have something todo with my Problem. Thanks again for helping :smiley:

Output of journal -xe --boot

Okt 25 11:54:45 laptop sudo[19378]: isiko404 : TTY=pts/0 ; PWD=/home/isiko404 ; USER=root ; COMMAND=/run/current-system/sw/bin/reboot
Okt 25 11:54:45 laptop sudo[19378]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Okt 25 11:54:45 laptop systemd[1]: Received SIGTERM from PID 19383 (reboot).
Okt 25 11:54:45 laptop sudo[19378]: pam_unix(sudo:session): session closed for user root
Okt 25 11:54:46 laptop systemd[1]: Reexecuting.
Okt 25 11:54:46 laptop systemd[1]: systemd 254.3 running in system mode (+PAM +AUDIT -SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE >
Okt 25 11:54:46 laptop systemd[1]: Detected architecture x86-64.
Okt 25 11:54:46 laptop systemd-timesyncd[853]: Network configuration changed, trying to establish connection.
Okt 25 11:54:46 laptop systemd[1]: bpf-lsm: LSM BPF program attached

Output of dmesg

[ 1298.604762] systemd[1]: systemd 254.3 running in system mode (+PAM +AUDIT -SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK -XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
[ 1298.604877] systemd[1]: Detected architecture x86-64.
[ 1299.269609] systemd[1]: bpf-lsm: LSM BPF program attached