MSI X870E Carbon / 9950X / 2x48GB - RAM bizzare issues

Hi, is this issue on the same motherboard as OP? I’m collecting information to try and pin down this issue with MSI and collecting your data would help diagnose which specific motherboards are affected. Please also share RAM details, and if you still experience this bug, a screenshot or information about what the unexpected UEFI changes are.

This fixed it for me: AM5 Linux triggering suspected firmware bug with S3 sleep - #13 by mojoaj

Added usbcore.autosuspend=-1 to kernel parameters

2 Likes

DDR5 module detected as “2GB ghost DIMM” after S3 sleep on AM5: root cause found (SPD hub stuck in 2-byte addressing) and an in-band fix, no power cycle needed

Board: MSI MPG X870E Carbon WiFi (MS-7E49), BIOS 1.AA3 (2026-06-26, latest)
CPU: Ryzen 9 9950X3D
RAM: G.Skill F5-6400J3239G32GX2-TZ5RS (2x32GB DDR5-6400 CL32, SK Hynix A-die), XMP + manual 6000 MT/s, DIMMA2 + DIMMB2. Stable for months, Prime95-clean.
OS: dual boot, Ubuntu 26.04 (kernel 7.0.0-28) / Windows 11 25H2. The OS turns out to be irrelevant, see below.

This is the same failure discussed in [level1techs thread 229940] and
[MSI forum / “bizarre RAM issues” thread 222454]: after suspend-to-RAM,
one DIMM turns into an unknown 2GB module (“Devices Changed (CPU or Memory)
or CMOS have been Cleared” at POST), the system runs with 34GB instead of
64GB, warm reboots don’t help, and only a full power-off cures it. It hits
MSI, ASRock and Gigabyte AM5 boards, so it smells like AGESA rather than one
vendor’s UEFI code. I spent a few days instrumenting my machine and I believe
I can now say precisely what breaks, where, and how to fix it in-band. Long
post, but every claim below is reproducible with i2c-tools and I kept the
raw dumps.

TL;DR

  • The SPD hub (SPD5118, Montage silicon) of one DIMM gets its MR11 register
    (I2C legacy mode, address 0x0B) written to 0x08 = “2-byte addressing mode”.
    This is volatile state inside the hub, powered from the standby rail, so it
    survives warm reboots and S3, and only VDDSPD power loss resets it.

  • A hub in 2-byte mode ignores 1-byte page selects and serves EEPROM page 0
    for every read. All legacy SPD readers (BIOS SMBIOS code, CPU-Z, HWiNFO,
    Linux spd5118 driver) then decode page 0 as if it were the whole SPD: the
    result is a deterministic “2GB, 1 rank, serial 00206200, no part number”
    ghost. The EEPROM itself is intact; nothing to RMA.

  • The bit is written by firmware, not by the OS: I caught it being set during
    a POST with Linux completely idle (details below). The S3 resume path is
    just the most frequent trigger, matching everyone’s reports.

  • Disassembly of both the AMD ABL (PSP-side memory init) and MSI’s
    MsiOcMemSPDPei module shows the same defect pattern in two independent
    implementations: the SPD page number is computed as offset >> 7 with no
    “& 7” mask and (in 2 of 3 ABL write paths) no bounds check, and is then
    written to MR11. For any offset >= 0x400 the value written is exactly 0x08:
    bit 3 lands in the legacy-mode bit and latches the hub into 2-byte mode.

  • Fix without power cycle, from Linux (this is, as far as I know, the first
    documented in-band recovery):

    # find the stuck hub: 0x50-0x53 on the piix4 SMBus bus, one per DIMM
    sudo i2cget -y 1 0x53 0x0b b     # returns 0x08 -> stuck in 2-byte mode
    sudo i2cset -y 1 0x53 0x0b 0x0000 w
    sudo i2cget -y 1 0x53 0x0b b     # must now return 0x00
    # warm reboot; BIOS notices the "changed" DIMM, retrains, full capacity is back
    

    The write-word trick works because for a hub in 2-byte mode the SMBus
    sequence [0x0B, 0x00, 0x00] parses as “write 0x00 to MR 0x000B”. Do NOT
    enable PEC (no ‘p’ suffix on the mode): the extra PEC byte would be
    consumed as data and auto-increment into MR12.

Symptom and history

Trigger sequence on my machine: hours in S3 under Ubuntu, resume, then a warm
reboot within minutes. Sometimes the next POST is normal and fast; sometimes
it takes much longer, ends in the “Devices Changed” prompt, and from then on
BIOS Memory-Z shows 34816 MB with DIMMB2 as an unknown 2GB module. The state
survives any number of warm reboots and OS switches. This has been happening
since I built the machine in March 2025, through every BIOS MSI has released
since, up to and including the current 1.AA3 - so it is not a recent AGESA
regression but a long-standing defect. And it is not the modules: this same
kit previously spent about 16 months (late 2023 to March 2025) in an Intel
system (i9-14900K, ASUS Z790 Hero) without a single incident, same DIMMs,
same Montage SPD hubs. It is intermittent: the
journal shows an identical 19.5h-S3 + resume + reboot sequence on Jul 17 that
did NOT trigger it.

Notable: the broken system still trains both DIMMs at 6000 MT/s and runs
stable, because with Memory Context Restore the training data comes from
saved context. Capacity, SMBIOS and the SPD contents are what go wrong.

Diagnosis

In the broken state, Linux says:

spd5118 1-0053: Adapter does not support 16-bit register addresses

That driver message means: MR11 bit 3 (SPD5118_LEGACY_MODE_ADDR) reads as 1
and the SMBus controller (piix4) can’t do 2-byte addressing, so the driver
gives up. Reading the hub raw confirms it:

$ sudo i2cget -y 1 0x53 0x0b b
0x08                              # bit3=1: 2-byte mode, page bits = 0

MR0/MR1 still identify a healthy SPD5118 (0x51/0x18, vendor 0x06:0x32 =
Montage, same silicon as the twin module). A 1-byte i2cdump of the stuck hub
shows the mechanism directly: the lower half (0x00-0x7F) returns the MR
registers, the upper half returns EEPROM page 0 - and page 0 is what every
page-select-blind reader then decodes as the entire 1024-byte SPD. That
produces the famous ghost, byte for byte:

Ghost value reported Actual origin (SPD page 0)
Manufacturing location “18” byte 2 = 0x12
Date “year 2002, week 4” bytes 3-4 = 02 04
Serial 00206200 bytes 5-8 = 00 20 62 00
Part number empty bytes 9+ = 00 00 …
“2 GB”, 1 rank, x8 density/org bytes read from wrong page
DDR5-4800, JEDEC timings intact page 0 really does hold base JEDEC data

Same ghost in Windows (CPU-Z, HWiNFO, Task Manager) and Linux (dmidecode),
because everyone is reading the same stuck hub live at each POST.

Per the SPD5118 datasheet, MR11 has no in-band reset: Bus Clear and Bus Reset
preserve registers, and only VDDSPD < 0.3V for >= 1ms clears it. That is
exactly why only power-off cures it and why it survives S3 (DIMM standby
power stays up) and warm reboots.

Who writes the bit? Firmware, with the OS ruled out

First I audited the Linux spd5118 driver (the only OS-side MR11 writer, it
uses MR11 for page selects and rewrites it via regcache_sync on resume): all
its writes mask the page to bits [2:0] or preserve bit 3, so there is no code
path that can set the legacy-mode bit. But the decisive evidence came from an
accident while testing the fix:

  1. Jul 23, 20:44:11 - I cured hub 0x53 (write MR11=0), verified 0x00.
  2. 20:44:49 - clean shutdown for a warm reboot. 38 seconds, no suspend, the
    driver idle the whole time.
  3. The next POST was visibly long (BIOS saw the “changed” DIMM, invalidated
    the memory context, re-read the SPDs and retrained), and came up with…
    34GB again. But now with the roles swapped: 0x53 probed fine and 0x51 -
    the DIMM that had been healthy for months - was stuck with MR11=0x08.

So the bit was planted by firmware during a POST, with no S3 and no OS in the
loop. Linux is exonerated as the writer; S3 resume is just the most common
window where the vulnerable firmware path runs. (I then cured 0x51 the same
way, rebooted again, and got 64GB back, both hubs healthy - two in-band
recoveries, zero power cycles.)

Where in the firmware (disassembly of BIOS 1.AA3)

I extracted the AMD ABL from the PSP directory (entry type 0x30, zlib
streams) and MSI’s SPD-related UEFI modules from E7E49AMSI.1AA3.

ABL (ARM, runs DDR init incl. S3 resume): the SPD access routine at
offset 0x765f0 of the decompressed ABL computes the page as
ubfx(offset, 7, 8) - an 8-bit field, no “& 7” - and writes it to SPD hub
register 0x0B over its DesignWare-style I2C master. That page value reaches
the MR11 write through three paths; two of them (0x7667a-0x766b0, the first
one silent with no status check, and 0x766be-0x766d6) have no bounds check,
while the third (0x7672e) does have a cmp 0x400 / bls guard - so the authors
knew about the boundary and guarded only one of three sites. For an offset in
[0x400, 0x47F] the computed page is exactly 0x08. Related strings in the same
code: “Cannot write SPD Hub page registers for DIMM at 0x%x”,
“Mem CtxSaveRestore enabled, skip spd read”, “ABL General S3 Init”.

MsiOcMemSPDPei (x86 PEI, runs every POST to feed SMBIOS/Memory-Z): same
defect, independent implementation - shr ebx, 7 with no and bl, 7 (module
offset 0x698), feeding an EfiSmbusWriteByte helper with Command = 0x0B
(helper at 0x235e, several callers with the same pattern).

I have not traced the exact call chain that produces an offset >= 0x400 in
the field (that part remains a hypothesis), but the arithmetic is not in
question: two unrelated SPD drivers in this firmware compute an unmasked page
from a byte offset and write it into the one register where bit 3 flips the
hub into a different addressing mode. Nothing anywhere in the firmware
strings or code suggests 2-byte mode is ever used intentionally.

For what it’s worth, the Linux driver contains an independent observation of
the aftermath (drivers/hwmon/spd5118.c, commit a852162efbff): “some PC BIOS
versions will not change the addressing mode on a soft reboot”, written after
someone hit hubs left in 2-byte mode. And the driver’s own 16-bit support is
being removed upstream in 2026 (“testing was limited and there are no known
users”), so future kernels won’t even limp along with a stuck hub - one more
reason to get this fixed at the source.

How to check your own system (Linux, 30 seconds)

sudo apt install i2c-tools
dmesg | grep spd5118        # "Adapter does not support 16-bit register
                            # addresses" on 1-005X = that DIMM's hub is stuck
sudo i2cget -y 1 0x5X 0x0b b   # 0x08 = stuck; 0x00-0x07 = normal
# (the stuck hub is never bound to the driver, so i2cget just works;
#  for a healthy hub you'd need modprobe -r spd5118 first)

Then the two-command fix from the TL;DR, then reboot. Expect one long POST
with a possible “Devices Changed” prompt - that’s the BIOS retraining with
the real SPD data again.

What I’d ask MSI / AMD

  • Audit every SPD hub page-select write for the missing mask/bounds check
    (offsets above; happy to share the full analysis and dumps).
  • Defensively write MR11 = 0x00 for each DIMM early in POST before the
    SMBIOS/Memory-Z SPD reads. That single write would make the failure
    self-healing on the next boot instead of persisting for weeks.
  • If the unguarded paths are in the ABL, this needs to go to AMD - the
    multi-vendor reports (MSI/ASRock/Gigabyte) point that way.

This is the exact same issue I am having with an ASRock X870 Pro A WiFi. I am using a G.Skill kit (F5-6400J3239G32GX2-TZ5RK) running at 6000 30-39-39-102 @ 1.35V. The motherboard is currently running BIOS 4.43 / AGESA 1.3.0.1b Patch A (the latest BIOS as of 8-15-2026), but I have observed this issue on older BIOS versions as well.

I have been able to trigger the issue in Windows, openSUSE, and Debian 13, though it is much more likely to occur under Linux. I’ve also seen it persist across several Linux kernel versions ranging from 6.18.x to 7.1.5.

Using i2c-tools, I confirmed that i2cget -y 1 0x5X 0x0b b returns 0x08. Hardware-wise, everything seems fine—the RAM passes all memory diagnostics and stress tests thrown at it.

I contacted ASRock support and they did respond, but for now they’re just asking for basic troubleshooting steps. Right now, I’m running Windows 11 + JEDEC speeds to see if the issue occurs, after which I plan to test Linux + JEDEC.

Usually, the error occurs on SMBus address 0x51 (Reg 0x0B), but I have also seen it happen on 0x53 (Reg 0x0B).

1 Like

After running the system at JEDEC speeds I was able to replicate the issue still. I have reached out to ASRock support again with the updated info to see what they suggest next.

I have done some additional testing. I know it was mentioned that you do not believe the issue is with the spd5118 Linux driver, but I wonder if you have tested that any further?

I first blacklisted the spd5118 driver and attempted to replicate the issue. However, after countless attempts, I was unable to get Reg 0x0B to show 0x08. What was interesting is that with the spd5118 driver blacklisted, Reg 0x0B showed 0x04 after a cold boot. Then, when I loaded spd5118 manually, Reg 0x0B was set to 0x00. After manually enabling spd5118, I was able to replicate the issue again.

I then had AI write some modified spd5118 drivers to see if I could figure out what was going on. I am not great at C, so I quickly got lost, but when running my custom spd5118 driver builds, I was never able to replicate the issue. The AI modified spd5118_suspend and spd5118_resume by changing the ordering of the function calls inside them.

I could still be convinced that the issue lies elsewhere, but everything I have tested up to this point seems to point toward the spd5118 driver.

Nice write up.

Confirming this on a second board and a different hub vendor. Your in-band fix worked first time.

System: MSI MAG X870E EDGE TI WIFI, BIOS 1A93, Ryzen 7 9800X3D, Corsair Vengeance RGB CMH32GX5M2B6000C30 (2x16GB DDR5-6000 CL30) in DIMMA2 + DIMMB2, XMP on, Memory Context Restore left at default. kernel 7.2.9-1-cachyos.

Symptom: same as yours. After S3 resume and a reboot, one DIMM showed as a 2GB ghost and the system ran on ~18GB instead of 32GB. I’ve hit it several times since February. The first time I cleared it with a CMOS reset.

Diagnosis:

spd5118 11-0051: DDR5 temperature sensor: vendor 0x0b:0x10 revision 2.3
spd5118 11-0053: Adapter does not support 16-bit register addresses

i2cget -y 11 0x53 0x0b b returned 0x08. On my board the PIIX4 SMBus is bus 11, not 1, so check i2cdetect -l first.

Fix: i2cset -y 11 0x53 0x0b 0x0000 w → MR11 read back 0x00 → warm reboot → long POST → full 32Gi back. Both hubs now probe normally as temperature sensors. No power cycle needed.

Three data points that support your firmware theory:

  1. A different hub vendor. My hubs report vendor 0x0b:0x10, not Montage (0x06:0x32). So this isn’t specific to one SPD hub manufacturer, which points further toward the unmasked page write in firmware.

  2. An older BIOS on a different board. I’m on 1.A93 for the X870E Edge Ti, so it’s present on older firmware and other MSI X870E models, not just 1.AA3 on the Carbon.

  3. USB autosuspend looks like a red herring. Back in February I found that usbcore.autosuspend=-1 seemed to stop the issue across several sleep cycles, and I thought it was a USB/S3 race. Given you caught the bit being set during a plain POST with no suspend, and how intermittent it is, I now think that was coincidence or a shift in timing rather than a real fix. Worth knowing if anyone else suggests it.

Happy to provide dumps or test anything if it helps get this to MSI/AMD.

Second confirmation, with disassembly from a different board and BIOS: the same defect is in AMD’s ABL.

System: MSI MAG X870E EDGE TI WIFI (MS-7E59), BIOS 1.A93, Ryzen 7 9800X3D, Corsair CMH32GX5M2B6000C30 (2x16GB, XMP 6000), DIMMA2/DIMMB2. SPD hub vendor 0x0b:0x10 (not Montage). Kernel 7.2.9-1-cachyos.

Symptom and fix: identical to yours. The hub at 0x53 had MR11 = 0x08. i2cset -y 11 0x53 0x0b 0x0000 w cleared it, and after a warm reboot I had full capacity back without a power cycle. On this board the PIIX4 SMBus is bus 11.

Where it is in 1.A93

  • File E7E59AMSI.1A93, L2 PSP directory at 0x580000, entry 20 = ABL0 (type 0x30, subprogram 2, v68.13.0.10) at 0x6d4300.

  • The zlib stream at image offset 0x702ed0 decompresses to a 0xe2f0-byte Thumb-2 module. It contains all the SPD hub strings plus "Mem CtxSaveRestore enabled, skip spd read.".

  • All addresses below are offsets in that decompressed module.

1. SPD read routine at 0x7c7c (args: dimm, offset, length, buf)

7c8e  ubfx  r6, r5, #7, #8      ; page = offset >> 7, no & 7
7cda  mov   r2, r6
7ce2  blx   [ops+0x68]          ; write MR11 (0x0B) = page, no bounds check
...
7d36  cmp.w r9, r6, lsl #7      ; r9 = 0x400: rollover IS guarded
7d3a  bls   skip

2. SPD read routine at 0x7e4c (args: dimm, ?, offset, length, [sp]=buf)

7ea6  ubfx  r0, r5, #7, #8      ; same unmasked page
7ecc  lsls  r1, r0, #28 / bpl   ; tests MR11 bit 3 (2-byte mode)
7f00  blx   [ops+0x8c]          ; 2-byte-mode write {0x0B,0x00,page}, unmasked
7f24  blx   [ops+0x88]          ; 1-byte-mode MR11 write, unmasked
7f82  cmp.w r8, r0, lsl #7      ; rollover guarded against 0x400 again

So both routines check page*128 >= 0x400 when rolling over to the next page, but neither checks the page they compute from the caller’s starting offset. Any starting offset from 0x400 to 0x7FF writes 0x08–0x0F to MR11 and latches the hub into 2-byte mode. This matches your 1.AA3 findings (guarded and unguarded paths in the same code) on older firmware, a different board and a different hub vendor.

Routine 2 detects hubs already stuck in 2-byte mode and handles them, so AMD’s code is aware this state exists.

Callers. Offsets come from runtime tables in PSP SRAM (0x31710–0x31780) that this same module fills:

  • 0xa4b6: walks 3-byte {u16 offset, u8 len} descriptors from 0x3175d.

  • 0xb6f0: offset = (entry & 0x3FF) << 6, len 64. These are 64-byte DDR5 SPD blocks, and only blocks 0–15 are valid. The 10-bit field allows up to block 1023.

  • 0xb966 / 0xb97e: XMP header read at 0x280 (block 10) followed by a 128-byte read. The XMP profile area runs right up to the 0x400 boundary.

Which caller actually passes an offset ≥ 0x400 is still unproven. It depends on runtime table contents, and possibly on the module’s own SPD/XMP data.

Suggested fixes for AMD/MSI

  1. At entry to both routines, mask the page (& 7) and reject the read if offset + len > 0x400.

  2. Bounds-check block and offset values in the callers above, particularly the << 6 block path and the XMP profile indexing.

  3. Defensively write MR11 = 0 for every DIMM early in POST, including when Memory Context Restore skips the SPD read. Routine 2 already contains the 2-byte-mode detect-and-rewrite logic; it just never runs on the context-restore path, so a stuck hub persists indefinitely.

Workaround until it’s fixed: a systemd service plus a system-sleep hook that check each SPD5118 hub (MR0 = 0x51) after boot and after resume, and clear MR11 if bit 3 is set. That heals the hub before the next POST reads it. I’m also running usbcore.autosuspend=-1, which noticeably cuts how often it happens. I can post the script if anyone wants it.

Thanks for this analysis, it matches what I see on a different board. Some additional data:

Additional data point: MR11 = 0x08 caught live on an X870 Tomahawk under Linux, with logging before and after every S3 cycle

System: MSI MAG X870 Tomahawk WIFI, BIOS 7E51v1A93 (AGESA PI 1.3.0.1d), Ryzen 9 9900X, 2x32 GB Kingston FURY Beast KF560C36BBEK2-64 (Hynix, EXPO 6000), Linux Mint 22.3, Ubuntu HWE kernel 7.0 (7.0.0-34, -38, -42), mem_sleep = deep (S3). SPD hubs on i2c-1 at 0x51 and 0x53, reported by the kernel as spd5118 ... vendor 0x08:0x0e revision 1.8.

1. Caught before any reboot. On a system that had been up for a week with 7 S3 cycles, a routine read showed MR11 = 0x08 on one hub while the other was 0x00. RAM was still reported in full, since SMBIOS is built at POST. The kernel driver confirmed it independently: on reload, spd5118 1-0053: Adapter does not support 16-bit register addresses, which is the branch taken when bit 3 of MR11 is set and PIIX4 has no I2C_FUNC_I2C.

2. The in-band fix works with no PSU drain.

sudo modprobe -r spd5118
sudo i2cset -y 1 0x53 0x0b 0x0000 w
sudo i2cget -y 1 0x53 0x0b b    # 0x00
sudo modprobe spd5118           # driver binds again

The warm reboot afterwards was clean, with full RAM. I have now done this successfully 7 times, on both hubs. Use at your own risk and check your own bus and addresses first.

3. Where it happens. I wrote a small systemd-based logger that reads MR11 on both hubs right before every suspend, right after every resume, every 10 minutes while running, and at boot and shutdown, and clears bit 3 when it finds it set. After about a month:

  • 7 occurrences in total, both DIMMs affected at different times;
  • every occurrence logged by the tool sits between a clean pre-suspend read and a post-resume read at 0x08;
  • hundreds of runtime reads (every 10 minutes for a month), all clean, never any other value, never a read error.

On this system the corruption happens across the S3 suspend/resume path, not at POST and not at runtime. Standby length does not seem to matter: events happened after 14 minutes and after 20 hours, while many multi-day cycles stayed clean.

4. The rate changes in steps. On kernel 7.0.0-38 I saw 2 events in 45 S3 cycles. After rebooting into 7.0.0-42 (a reboot that also triggered a full memory retrain, about 35 s on POST code 15), I saw 3 events in the next 5 cycles. spd5118 and i2c-piix4 have identical srcversion in both kernels, and the Ubuntu changelog between them has nothing on SMBus, SPD or regmap. So I cannot yet tell whether the kernel or the new training data is responsible. Booting 7.0.0-38 again with nothing else changed would separate the two; I have not done that yet.

5. A related comment in the kernel source. drivers/hwmon/spd5118.c (v7.0) contains this note: “at least some PC BIOS versions will not change the addressing mode on a soft reboot and end up in setup […] This will happen again after a power cycle, which does reset the addressing mode.”

Questions for others affected:

  • Has anyone seen the frequency change with a kernel update, or after a full memory retrain?
  • Has anyone run with spd5118 blacklisted over a large number of S3 cycles (50 or more)?

Happy to share the logger if it is useful.