“使固定”

“使固定”

我的作業系統有問題。包括核心在內的所有工具僅顯示我實際 RAM 記憶體的一半。我的筆記型電腦中安裝了一顆 16G 記憶體晶片,BIOS 中顯示一切正常。

有關配置的一些資訊:

硬體

筆記型電腦 Dell XPS 15 9550 (PDF連結),除其他外,它還說:

記憶

插槽:兩個 SODIMM 插槽

類型:DDR4

速度:2133兆赫

支援的配置:8 GB、16 GB 和 32 GB

中央處理器

英特爾® 酷睿™ i7-6700HQ 處理器(方舟連結),除其他外,它還說:

最大記憶體大小(取決於記憶體類型):64 GB

記憶體類型:DDR4-2133、LPDDR3-1866、DDR3L-1600

系統資訊

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.
90 structures occupying 5605 bytes.
Table at 0x000E8C20.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: Dell Inc.
        Version: 1.14.0
        Release Date: 02/13/2020
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 16 MB
        Characteristics:
                PCI is supported
                PNP is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                EDD is supported
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 kB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                Print screen service is supported (int 5h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                Printer services are supported (int 17h)
                ACPI is supported
                USB legacy is supported
                Smart battery is supported
                BIOS boot specification is supported
                Function key-initiated network boot is supported
                Targeted content distribution is supported
                UEFI is supported
        BIOS Revision: 1.14

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Dell Inc.
        Product Name: XPS 15 9550
        Version: Not Specified
        Serial Number: GR1RD72
        UUID: 4c4c4544-0052-3110-8052-c7c04f443732
        Wake-up Type: Power Switch
        SKU Number: 06E4
        Family: XPS

核心

$ uname -a
Linux piotr-XPS-15-9550 5.11.0-22-generic #23~20.04.1-Ubuntu SMP Thu Jun 17 12:51:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

記憶體顯示為free

$ free -h
              total        used        free      shared  buff/cache   available
Mem:          7,0Gi       2,6Gi       1,1Gi       887Mi       3,4Gi       3,3Gi
Swap:         979Mi          0B       979Mi

記憶體顯示方式/proc/meminfo

$ cat /proc/meminfo 
MemTotal:        7382044 kB
MemFree:         1142512 kB
MemAvailable:    3467104 kB
Buffers:          201548 kB
Cached:          3183760 kB
SwapCached:            0 kB
Active:           823272 kB
Inactive:        4182420 kB
Active(anon):       1924 kB
Inactive(anon):  2520488 kB
Active(file):     821348 kB
Inactive(file):  1661932 kB
Unevictable:      831044 kB
Mlocked:              32 kB
SwapTotal:       1003516 kB
SwapFree:        1003516 kB
Dirty:               104 kB
Writeback:             0 kB
AnonPages:       2451456 kB
Mapped:           842608 kB
Shmem:            908320 kB
KReclaimable:     137292 kB
Slab:             238076 kB
SReclaimable:     137292 kB
SUnreclaim:       100784 kB
KernelStack:       19088 kB
PageTables:        36676 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     4694536 kB
Committed_AS:    9487844 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       76280 kB
VmallocChunk:          0 kB
Percpu:             6176 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      328276 kB
DirectMap2M:     6234112 kB
DirectMap1G:     2097152 kB

記憶體顯示為dmidecode

$ sudo dmidecode -t memory
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

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

Handle 0x0039, DMI type 17, 40 bytes
Memory Device
        Array Handle: 0x0038
        Error Information Handle: Not Provided
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 16384 MB
        Form Factor: SODIMM
        Set: None
        Locator: DIMM A
        Bank Locator: DIMM A
        Type: DDR4
        Type Detail: Synchronous
        Speed: 2133 MT/s
        Manufacturer: 0793
        Serial Number: 12161215
        Asset Tag: 16360000
        Part Number: GR2133S464L15/16G   
        Rank: 2
        Configured Memory Speed: 2133 MT/s
        Minimum Voltage: Unknown
        Maximum Voltage: Unknown
        Configured Voltage: 1.2 V

Handle 0x003A, DMI type 17, 40 bytes
Memory Device
        Array Handle: 0x0038
        Error Information Handle: Not Provided
        Total Width: Unknown
        Data Width: Unknown
        Size: No Module Installed
        Form Factor: DIMM
        Set: None
        Locator: DIMM B
        Bank Locator: DIMM B
        Type: Unknown
        Type Detail: None
        Speed: Unknown
        Manufacturer: Not Specified
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Rank: Unknown
        Configured Memory Speed: Unknown
        Minimum Voltage: Unknown
        Maximum Voltage: Unknown
        Configured Voltage: Unknown

輸出dmesg

$ dmesg | grep -i e820
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009dbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009dc00-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000032667fff] usable
[    0.000000] BIOS-e820: [mem 0x0000000032668000-0x0000000032668fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x0000000032669000-0x0000000036fcefff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000036fcf000-0x000000003700cfff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000003700d000-0x0000000037674fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x0000000037675000-0x000000003fffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fe000000-0x00000000fe010fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000029e22cfff] usable
[    0.000000] BIOS-e820: [mem 0x000000029e22d000-0x00000004bdffffff] reserved
[    0.000767] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000771] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.123701] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in E820
[    0.333546] e820: reserve RAM buffer [mem 0x0009dc00-0x0009ffff]
[    0.333548] e820: reserve RAM buffer [mem 0x32668000-0x33ffffff]
[    0.333549] e820: reserve RAM buffer [mem 0x29e22d000-0x29fffffff]

全部輸出dmesghttps://pastebin.com/B7qLzVvK

作業系統:Linux Mint 20 Ulyana

我在這裡發文之前做了什麼:

  1. BIOS更新至最新版本
  2. 使用memtest86和戴爾診斷工具-一切正常,BIOS顯示16G
  3. 升級核心至5.11
  4. 我已經從 USB 驅動器嘗試過 Ubuntu 20.04,它在系統監視器應用程式中顯示 16G RAM(不知何故,我無法在鍵盤中或從 USB 中以控制台形式輸入任何字元:/)

難道是因為我沒有使用UEFI啟動?

我可以做什麼來調試和修復這個問題?謝謝。

//編輯

$ decode-dimms                                                                                                                                              
# decode-dimms version $Revision$

Memory Serial Presence Detect Decoder
By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner,
Jean Delvare, Trent Piepho and others


Decoding EEPROM: /sys/bus/i2c/drivers/ee1004/0-0050
Guessing DIMM is in                              bank 1

---=== SPD EEPROM Information ===---
EEPROM CRC of bytes 0-125                        OK (0xEF1D)
# of bytes written to SDRAM EEPROM               384
Total number of bytes in EEPROM                  512
Fundamental Memory type                          DDR4 SDRAM
SPD Revision                                     1.0
Module Type                                      SO-DIMM
EEPROM CRC of bytes 128-253                      OK (0x2355)

---=== Memory Characteristics ===---
Maximum module speed                             2132 MHz (PC4-17000)
Size                                             16384 MB
Banks x Rows x Columns x Bits                    16 x 16 x 10 x 64
SDRAM Device Width                               8 bits
Ranks                                            2
Rank Mix                                         Symmetrical
AA-RCD-RP-RAS (cycles)                           15-15-15-36
Supported CAS Latencies                          16T, 15T, 14T, 13T, 12T, 11T, 10T

---=== Timings at Standard Speeds ===---
AA-RCD-RP-RAS (cycles) as DDR4-1866              13-13-13-31
AA-RCD-RP-RAS (cycles) as DDR4-1600              11-11-11-27

---=== Timing Parameters ===---
Minimum Cycle Time (tCKmin)                      0.938 ns
Maximum Cycle Time (tCKmax)                      1.500 ns
Minimum CAS Latency Time (tAA)                   13.750 ns
Minimum RAS to CAS Delay (tRCD)                  13.750 ns
Minimum Row Precharge Delay (tRP)                13.750 ns
Minimum Active to Precharge Delay (tRAS)         33.000 ns
Minimum Active to Auto-Refresh Delay (tRC)       46.750 ns
Minimum Recovery Delay (tRFC1)                   350.000 ns
Minimum Recovery Delay (tRFC2)                   260.000 ns
Minimum Recovery Delay (tRFC4)                   160.000 ns
Minimum Four Activate Window Delay (tFAW)        21.000 ns
Minimum Row Active to Row Active Delay (tRRD_S)  3.700 ns
Minimum Row Active to Row Active Delay (tRRD_L)  5.300 ns
Minimum CAS to CAS Delay (tCCD_L)                5.625 ns

---=== Other Information ===---
Package Type                                     Monolithic
Maximum Activate Count                           Unlimited
Post Package Repair                              One row per bank group
Soft PPR                                         Not Supported
Module Nominal Voltage                           1.2 V
Thermal Sensor                                   No

---=== Physical Characteristics ===---
Module Height                                    30 mm
Module Thickness                                 2 mm front, 2 mm back
Module Reference Card                            E revision 1

---=== Manufacturer Data ===---
Module Manufacturer                              Wilk Elektronik S.A.
Manufacturing Date                               2017-W06
Part Number                                      GR2133S464L15/16G   


Number of SDRAM DIMMs detected and decoded: 1

我再次運行 dmesg 並對已使用/保留的內存進行了一些計算。我希望他們是對的,但他們看起來更不正確:

$ dmesg | grep 'BIOS-e820: \[mem' | sed -r 's/.*mem (0x.*)-(0x.*)\] (.*)/\1|\2|\3/g' | awk -F '|' '{printf "%10s %15.2f MB\n", $3, (strtonum($2) - strtonum($1)) / 1024/1024 }'
    usable            0.62 MB
  reserved            0.01 MB
  reserved            0.12 MB
    usable          798.46 MB
  ACPI NVS            0.00 MB
  reserved           80.34 MB
 ACPI data            0.24 MB
  ACPI NVS            6.41 MB
  reserved          137.54 MB
  reserved          256.00 MB
  reserved            0.07 MB
  reserved            0.00 MB
  reserved            0.00 MB
  reserved           16.00 MB
    usable         6626.18 MB
  reserved         8701.82 MB

看起來大約9G被保留了,我不知道為什麼...

// 編輯2

現在它變得非常奇怪。我剛剛在筆記型電腦服務中,我們測試了他們擁有的其他一些記憶體晶片,BIOS 總是顯示正確的值,但不是 Linux:

  • 使用我的舊 1x16G 時 - 作業系統顯示 7G
  • 使用我的舊 2x16G 時 - 作業系統顯示 17G
  • 使用服務中的 1x8G 時 - 顯示 7G
  • 使用服務中的 1x16G 時 - 顯示 7G

這很奇怪。

// 編輯3

該死的。我想我找到了只顯示一半記憶體的原因。

我已經下載了 Kubuntu 21.04 USB 版本並啟動它:

  1. 在傳統模式下(無 UEFI)- 顯示一半內存
  2. 在 UEFI 模式下 - 顯示所有內存

我現在的問題是為什麼?

答案1

我會回答我自己的問題,因為我終於發現發生了什麼事。

太長了;

Linux 報告每個記憶體晶片的最大容量為 8 GB,因為我使用的是傳統引導。使用 UEFI 引導時,Linux 顯示每個晶片的完整記憶體。


完整的故事,也許對某人有用

我不久前買了這台戴爾筆記型電腦。它有很好的規格,如 32G RAM (2x16G)、4 核心 i7、512G SSD 等。當大量使用應用程式時,例如同時使用兩個具有多個選項卡的瀏覽器視窗、三個 IDE、Youtube、視訊通話等應用程序,每天會兌現一到兩次。症狀看起來像是圖形問題,因為崩潰時顯示“像電視一樣損壞”。只有硬重置才能使筆記型電腦起死回生。

在幾次崩潰之後,我決定監視一些溫度、CPU 使用情況、記憶體使用情況等。這表明存在一些嚴重的記憶問題。

有趣的東西dmidecode總是顯示出正確的價值觀。也dmesg表明內核知道完整的內存,但僅報告大約一半的可用內存。

我決定在這台筆記型電腦上進行一些測試,首先運行戴爾診斷工具和 memtest86。兩個工具都顯示 32G RAM,但在記憶體測試階段幾分鐘後都失敗了。症狀和以前一樣。我 99% 確定這是記憶體問題。

此後,我測試了不同的記憶體晶片配置,只有當兩個記憶體晶片都插入時,無論哪個插槽,它都會失敗。看起來它們都很好(每個晶片都通過了 memtest86),但與戴爾硬體一起使用時效果不佳。

因此,為了修復崩潰,我只需要使用一個記憶體插槽。

現在崩潰已經消失,但作業系統僅報告 8 GB RAM(已插入 16 GB)。這是一個問題,因為作業系統很快就開始使用交換並且非常無法使用。

決定檢查一些完全不同的記憶體晶片,只是為了看看報告是否正常。

  • 舊的兩個 16G 晶片 - 報告約為 17G RAM
  • 一顆 8G 晶片 - 報告 8G RAM
  • 16G 晶片(與以前的不同)-報告 8 GB(到底是什麼!?)

在所有配置中,memtest86 和 BIOS 顯示正確的 RAM。所以這是一個作業系統問題。但為什麼?

之後 @Linux安全怪胎建議,我嘗試啟動 Ubuntu live USB 來查看那裡顯示的內容。戴爾一次性開機顯示 USB、傳統和 UEFI 兩種可能的開機選項。我第一次嘗試 UEFI,RAM 大小是正確的,16 GB。然後我嘗試了傳統模式,然後繁榮!僅 8 GB。

所以我的問題是安裝的作業系統沒有 UEFI 啟動所引起的。我可能關閉了 UEFI,因為我在實時 USB 啟動時遇到了一些問題,但我不確定。

對我來說最大的謎團是為什麼它對作業系統核心很重要?

“使固定”

為了解決這一切,我剛剛安裝了 Kubuntu,並在 BIOS 中啟用了 UEFI。現在記憶體已正確報告...

相關內容