不显示可用 RAM

不显示可用 RAM

我目前在笔记本电脑上运行 Ubuntu。根据我的规格并查看我的 BIOS,应该有 16GiB 的 RAM。我第一次拿到它时有 16GiB 的 RAM,但无论我何时打电话freehtop现在,它都只显示 12GiB。输出为free

              total        used        free      shared  buff/cache   available
Mem:       12077124     1817484     8333912       18500     1925728     9965952
Swap:      33554428           0    33554428

输出为dmesg | grep -i memory

[    0.004350] check: Scanning 1 areas for low memory corruption
[    0.004667] ACPI: Reserving FACP table memory at [mem 0xc5993000-0xc5993113]
[    0.004668] ACPI: Reserving DSDT table memory at [mem 0xc597c000-0xc598d8ca]
[    0.004669] ACPI: Reserving FACS table memory at [mem 0xcbc19000-0xcbc1903f]
[    0.004669] ACPI: Reserving SSDT table memory at [mem 0xc7c9c000-0xc7c9c0a1]
[    0.004670] ACPI: Reserving SSDT table memory at [mem 0xc7c9a000-0xc7c9b18e]
[    0.004670] ACPI: Reserving SSDT table memory at [mem 0xc7c8c000-0xc7c93228]
[    0.004671] ACPI: Reserving IVRS table memory at [mem 0xc7c6a000-0xc7c6a1a3]
[    0.004671] ACPI: Reserving SSDT table memory at [mem 0xc7c38000-0xc7c38a41]
[    0.004672] ACPI: Reserving SSDT table memory at [mem 0xc7bb3000-0xc7bb3631]
[    0.004672] ACPI: Reserving TPM2 table memory at [mem 0xc7bb2000-0xc7bb2033]
[    0.004673] ACPI: Reserving POAT table memory at [mem 0xc7baf000-0xc7baf054]
[    0.004673] ACPI: Reserving BATB table memory at [mem 0xc7b9a000-0xc7b9a049]
[    0.004674] ACPI: Reserving HPET table memory at [mem 0xc5992000-0xc5992037]
[    0.004675] ACPI: Reserving APIC table memory at [mem 0xc5991000-0xc5991137]
[    0.004675] ACPI: Reserving MCFG table memory at [mem 0xc5990000-0xc599003b]
[    0.004676] ACPI: Reserving SBST table memory at [mem 0xc598f000-0xc598f02f]
[    0.004676] ACPI: Reserving WSMT table memory at [mem 0xc598e000-0xc598e027]
[    0.004677] ACPI: Reserving VFCT table memory at [mem 0xc596e000-0xc597b883]
[    0.004677] ACPI: Reserving SSDT table memory at [mem 0xc5968000-0xc596d353]
[    0.004678] ACPI: Reserving CRAT table memory at [mem 0xc5967000-0xc5967ebf]
[    0.004679] ACPI: Reserving CDIT table memory at [mem 0xc5966000-0xc5966028]
[    0.004679] ACPI: Reserving FPDT table memory at [mem 0xc7b9b000-0xc7b9b033]
[    0.004680] ACPI: Reserving SSDT table memory at [mem 0xc5965000-0xc5965148]
[    0.004680] ACPI: Reserving SSDT table memory at [mem 0xc5963000-0xc59644ba]
[    0.004681] ACPI: Reserving SSDT table memory at [mem 0xc5961000-0xc596257f]
[    0.004681] ACPI: Reserving SSDT table memory at [mem 0xc595d000-0xc5960972]
[    0.004682] ACPI: Reserving BGRT table memory at [mem 0xc595c000-0xc595c037]
[    0.004683] ACPI: Reserving SSDT table memory at [mem 0xc595b000-0xc595b057]
[    0.004683] ACPI: Reserving SSDT table memory at [mem 0xc595a000-0xc595a24c]
[    0.004684] ACPI: Reserving SSDT table memory at [mem 0xc5958000-0xc59592bb]
[    0.004684] ACPI: Reserving SSDT table memory at [mem 0xc5957000-0xc5957ad4]
[    0.004685] ACPI: Reserving UEFI table memory at [mem 0xcbc18000-0xcbc180d9]
[    0.004685] ACPI: Reserving SSDT table memory at [mem 0xc5956000-0xc5956051]
[    0.004686] ACPI: Reserving SSDT table memory at [mem 0xc7c98000-0xc7c9808f]
[    0.004687] ACPI: Reserving SSDT table memory at [mem 0xc7c97000-0xc7c979b4]
[    0.004947] Early memory node ranges
[    0.032537] PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.032539] PM: hibernation: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[    0.032539] PM: hibernation: Registered nosave memory: [mem 0x000a0000-0x000dffff]
[    0.032540] PM: hibernation: Registered nosave memory: [mem 0x000e0000-0x000fffff]
[    0.032541] PM: hibernation: Registered nosave memory: [mem 0x09c00000-0x09da0fff]
[    0.032542] PM: hibernation: Registered nosave memory: [mem 0x09f00000-0x09f0cfff]
[    0.032542] PM: hibernation: Registered nosave memory: [mem 0x9973c000-0x9973cfff]
[    0.032543] PM: hibernation: Registered nosave memory: [mem 0x99749000-0x99749fff]
[    0.032544] PM: hibernation: Registered nosave memory: [mem 0xc0a5b000-0xc0aebfff]
[    0.032545] PM: hibernation: Registered nosave memory: [mem 0xc1214000-0xc1214fff]
[    0.032546] PM: hibernation: Registered nosave memory: [mem 0xc1bee000-0xc1beefff]
[    0.032547] PM: hibernation: Registered nosave memory: [mem 0xc4b7e000-0xcad7dfff]
[    0.032548] PM: hibernation: Registered nosave memory: [mem 0xcad7e000-0xcbd7dfff]
[    0.032548] PM: hibernation: Registered nosave memory: [mem 0xcbd7e000-0xcbdfdfff]
[    0.032549] PM: hibernation: Registered nosave memory: [mem 0xce000000-0xcfffffff]
[    0.032549] PM: hibernation: Registered nosave memory: [mem 0xd0000000-0xf7ffffff]
[    0.032550] PM: hibernation: Registered nosave memory: [mem 0xf8000000-0xfbffffff]
[    0.032550] PM: hibernation: Registered nosave memory: [mem 0xfc000000-0xfdbfffff]
[    0.032551] PM: hibernation: Registered nosave memory: [mem 0xfdc00000-0xfdcfffff]
[    0.032551] PM: hibernation: Registered nosave memory: [mem 0xfdd00000-0xfed7ffff]
[    0.032551] PM: hibernation: Registered nosave memory: [mem 0xfed80000-0xfed80fff]
[    0.032552] PM: hibernation: Registered nosave memory: [mem 0xfed81000-0xffffffff]
[    0.071132] Memory: 11923324K/12401088K available (14345K kernel code, 3478K rwdata, 10340K rodata, 2688K init, 5976K bss, 477504K reserved, 0K cma-reserved)
[    0.109279] Freeing SMP alternatives memory: 40K
[    0.255382] x86/mm: Memory block size: 128MB
[    0.633239] Freeing initrd memory: 56768K
[    0.636859] check: Scanning for low memory corruption every 60 seconds
[    0.922923] Freeing unused decrypted memory: 2036K
[    0.923550] Freeing unused kernel image (initmem) memory: 2688K
[    0.936446] Freeing unused kernel image (text/rodata gap) memory: 2036K
[    0.937019] Freeing unused kernel image (rodata/data gap) memory: 1948K
[    2.777602] Non-volatile memory driver v1.3
[    3.074212] amdgpu 0000:07:00.0: amdgpu: Trusted Memory Zone (TMZ) feature disabled as experimental (default)
[    3.314687] [TTM] Zone  kernel: Available graphics memory: 6038562 KiB
[    3.314688] [TTM] Zone   dma32: Available graphics memory: 2097152 KiB
[    3.314780] [drm] amdgpu: 4096M of VRAM memory ready
[    3.314782] [drm] amdgpu: 4096M of GTT memory ready.

我真的不知道我在寻找什么,希望得到任何建议。尤其是它显示了它并且我能够使用它,这让我很困惑。我可能做错了什么?

更新 1:我运行了sudo dmidecode -t memory,结果显示:

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.
# SMBIOS implementations newer than version 3.2.0 are not
# fully supported by this version of dmidecode.

Handle 0x0001, DMI type 16, 23 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: None
    Maximum Capacity: 64 GB
    Error Information Handle: 0x0000
    Number Of Devices: 2

Handle 0x0008, DMI type 17, 92 bytes
Memory Device
    Array Handle: 0x0001
    Error Information Handle: 0x0007
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 16384 MB
    Form Factor: SODIMM
    Set: None
    Locator: DIMM 0
    Bank Locator: P0 CHANNEL A
    Type: DDR4
    Type Detail: Synchronous Unbuffered (Unregistered)
    Speed: 3200 MT/s
    Manufacturer: Hynix
    Serial Number: 00000000
    Asset Tag: Not Specified
    Part Number: HMAB2GS6AMR6N-XN    
    Rank: 1
    Configured Memory Speed: 3200 MT/s
    Minimum Voltage: 1.2 V
    Maximum Voltage: 1.2 V
    Configured Voltage: 1.2 V
    Memory Technology: DRAM
    Memory Operating Mode Capability: Volatile memory
    Firmware Version: Unknown
    Module Manufacturer ID: Bank 1, Hex 0xAD
    Module Product ID: Unknown
    Memory Subsystem Controller Manufacturer ID: Unknown
    Memory Subsystem Controller Product ID: Unknown
    Non-Volatile Size: None
    Volatile Size: 16 GB
    Cache Size: None
    Logical Size: None

Handle 0x000B, DMI type 17, 92 bytes
Memory Device
    Array Handle: 0x0001
    Error Information Handle: 0x000A
    Total Width: Unknown
    Data Width: Unknown
    Size: No Module Installed
    Form Factor: Unknown
    Set: None
    Locator: DIMM 0
    Bank Locator: P0 CHANNEL B
    Type: Unknown
    Type Detail: Unknown
    Speed: Unknown
    Manufacturer: Null
    Serial Number: Null
    Asset Tag: Not Specified
    Part Number: Null
    Rank: Unknown
    Configured Memory Speed: Unknown
    Minimum Voltage: Unknown
    Maximum Voltage: Unknown
    Configured Voltage: Unknown
    Memory Technology: Unknown
    Memory Operating Mode Capability: Unknown
    Firmware Version: Unknown
    Module Manufacturer ID: Unknown
    Module Product ID: Unknown
    Memory Subsystem Controller Manufacturer ID: Unknown
    Memory Subsystem Controller Product ID: Unknown
    Non-Volatile Size: None
    Volatile Size: None
    Cache Size: None
    Logical Size: None

更新 2:我的规格是:

CPU: AMD Ryzen™ 7 PRO (5850U)

GPU: Radeon RX Vega 8

RAM: 16 GB DDR4 3200 MHz (I don't know the company)

答案1

Ubuntu 无法检测到所有已安装的 RAM 容量,可能是因为其中一个 RAM 条出现硬件故障,可以选择用具有相同类型、容量和时钟速度的新 RAM 条替换该 RAM 条,以将 RAM 容量恢复到其原始的 16GB。运行以下命令显示所有 RAM 插槽以及每个插槽中是否安装了 RAM 条。

sudo dmidecode -t memory

部分结果示例sudo dmidecode -t memory

设备数量:4

句柄 0x0011,DMI 类型 17,84 字节
记忆装置
    数组句柄:0x0009
    错误信息句柄:0x0010
    总宽度:未知
    数据宽度:未知
    尺寸:未安装模块

上述示例的完整结果将显示主机有 4 个 RAM 插槽,其中两个插槽目前已安装 RAM 模块。它还将显示每个已安装 RAM 模块的容量以及主机的最大 RAM 容量。

答案2

这个答案主要由 jawtheshark 在评论中提供。我将在这里总结一下以解决问题。问题是 Linux 占用了集成 GPU 的一部分 RAM 并将其用作 VRAM。APU 的图形部分保留了 4GB 的系统 RAM 供其使用。查看此内核文档:kernel.org/doc/html/latest/gpu/amdgpu.html 参数:vramlimit (int) --> 限制用于测试的 MiB 中的 VRAM 总量。默认值为 0(使用完整 VRAM)。这意味着将 RAM 委托给集成 GPU 的“自动”选项会将大量 RAM 委托给 GPU。由于我只将机器用作工作站,因此我将在 bios 中将“自动”选项设置为“1 GB”(最小值)。

相关内容