Skip to content

[Regression 7.3.4-zen2] PCI BAR 1 shrinks to 256 MiB (RmInitAdapter failed) with external monitor attached + early page faults on Lenovo 82RF #427

Open

Description

@panadaxx

Summary

After upgrading from linux-zen 7.2.14.zen1-1 to 7.3.4.zen2-2 (7.3.4-zen2-2-zen) on Arch Linux, booting with an external display attached repeatedly fails on both warm reboots and cold boots because the NVIDIA dGPU (0000:01:00.0) PCI BAR 1 is sized as 256 MiB instead of 8 GiB (resource1_resize supports ReBAR up to 8 GiB), causing kbusVerifyBar2_GM107 / RmInitAdapter failed!.

In addition, 7.3.4-zen2-2-zen exhibited kernel page-fault / page-table corruption bugs (apply_relocate_add #PF in modprobe, and BUG: Bad page map / Oops: Bad pagetable in polkitd/gdbus) that were never seen across 200+ boots on 7.2.14-zen1-1-zen.

(Note: This is on 7.3.4-zen2, so it is separate from the 7.3.4-zen1 xhci_pci NULL dereference panic fixed in #425 / #426.)

Kernel Matrix

Kernel Driver (nvidia-open-dkms) External Monitor at Boot 0000:01:00.0 BAR 1 Result
7.2.14-zen1-1-zen 615.78.08-1 Attached & Unplugged 8 GiB (0x00000000-0x1ffffffff) Works (200+ boots before upgrade & after downgrade)
7.3.1-1-lily 615.78.08-1 Attached 8 GiB (0x00000000-0x1ffffffff) Works (nvidia-drm initializes normally)
7.3.4-zen2-2-zen 620.70.06-1 Attached 256 MiB (0x00000000-0x0fffffff) Fails (RmInitAdapter failed!)
7.3.4-zen2-2-zen 615.78.08-1 Attached 256 MiB (0x00000000-0x0fffffff) Fails (RmInitAdapter failed!)
7.3.4-zen2-2-zen 620.70.06-1 / 615.78.08-1 Unplugged before boot 8 GiB (0x00000000-0x1ffffffff) Boots (BAR 1 enumerates as 8 GiB)

Downgrading nvidia-open-dkms from 620.70.06-1 to 615.78.08-1 while staying on 7.3.4-zen2-2-zen did not resolve the issue. Rolling back linux-zen to 7.2.14.zen1-1 immediately restored normal booting with the external monitor attached.

Hardware & Software Environment

  • Machine: LENOVO 82RF/LNVNB161216, BIOS J2CN40WW 04/15/2022
  • CPU / RAM: 12th Gen Intel(R) Core(TM) i7-12700H, 15Gi RAM
  • iGPU: 00:02.0 Intel Alder Lake-P [8086:46a6] (i915)
  • dGPU: 0000:01:00.0 NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] [10de:2560] (resource1_resize: 0000000000003fc0)
  • External display: 1024x768 HDMI monitor attached via Intel i915 (DP-3)
  • OS: Arch Linux (x86_64), nvidia-open-dkms (615.78.08-1 and 620.70.06-1)

1. PCI BAR 1 Regression (256 MiB instead of 8 GiB)

Working (7.2.14-zen1-1-zen and 7.3.1-1-lily with external monitor attached):

pci 0000:01:00.0: BAR 1 [mem 0x00000000-0x1ffffffff 64bit pref]
pci 0000:01:00.0: BAR 1 [mem 0x6000000000-0x61ffffffff 64bit pref]: assigned

Broken (7.3.4-zen2-2-zen with external monitor attached — identical on both 620.70.06-1 and 615.78.08-1):

pci 0000:01:00.0: BAR 0 [mem 0x00000000-0x00ffffff]
pci 0000:01:00.0: BAR 1 [mem 0x00000000-0x0fffffff 64bit pref]
pci 0000:01:00.0: BAR 3 [mem 0x00000000-0x01ffffff 64bit pref]
pci 0000:01:00.0: BAR 5 [io  0x0000-0x007f]
pci 0000:01:00.0: BAR 1 [mem 0x6000000000-0x600fffffff 64bit pref]: assigned
pci 0000:01:00.0: BAR 3 [mem 0x6010000000-0x6011ffffff 64bit pref]: assigned
pci 0000:01:00.0: BAR 0 [mem 0x60000000-0x60ffffff]: assigned
pci 0000:01:00.0: BAR 5 [io  0x5000-0x507f]: assigned
NVRM: GPU0 kbusVerifyBar2_GM107: MMUTest BAR0 window offset 0x70e000 returned garbage 0x0
NVRM: GPU0 nvAssertOkFailedNoLog: Assertion failed: Generic memory error [NV_ERR_MEMORY_ERROR] (0x00000072) returned from kbusVerifyBar2_HAL(pGpu, pKernelBus, NULL, NULL, 0, 0) @ kern_bus_gm107.c:363
NVRM: GPU0 nvAssertOkFailedNoLog: Assertion failed: Generic memory error [NV_ERR_MEMORY_ERROR] (0x00000072) returned from kbusStateInitLockedKernel_HAL(pGpu, pKernelBus) @ kern_bus_gm107.c:481
NVRM: GPU0 RmInitNvDevice: *** Cannot initialize the device
NVRM: GPU0 RmInitAdapter: RmInitNvDevice failed, bailing out of RmInitAdapter

(Error code on 620.70.06-1 was RmInitAdapter failed! (0x24:0x72:1357), and on 615.78.08-1 was (0x24:0x72:1298).)

Comparing early boot logs on 7.3.4-zen2-2-zen, EFI memory map entries shifted slightly between failing and passing boots (mem86..89 vs mem88..91), and only unplugging the external display before power-on / reboot allowed BAR 1 to probe at 8 GiB.

2. Additional Kernel Faults Observed Only on 7.3.4-zen2-2-zen

(a) Early module relocation #PF during modprobe

BUG: unable to handle page fault for address: 0000001145b61ff8
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0 
Oops: Oops: 0000 [#1] SMP NOPTI
CPU: 6 UID: 0 PID: 235 Comm: modprobe Tainted: G           OE       7.3.4-zen2-2-zen #1 PREEMPT(full)  9cd4e4ee1f637afe75058bc48f044441408c1130
Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
Hardware name: LENOVO 82RF/LNVNB161216, BIOS J2CN40WW 04/15/2022
RIP: 0010:apply_relocate_add+0x18d/0x290
Code: 4c 8b 7a 08 48 8b 3a 48 c1 e0 06 48 8b 72 10 49 03 7c 04 10 4c 89 f8 44 89 fa 48 c1 e8 20 48 8d 04 40 48 c1 e0 03 48 03 41 10 <48> 03 70 08 48 89 74 24 28 48 83 fa 04 74 4c 0f 87 27 ff ff ff 48
RSP: 0018:ffffd3b100993998 EFLAGS: 00010217
RAX: 0000001145b61ff0 RBX: 0000000000000004 RCX: ffffd3b10361b6a0
RDX: 00000000badfffff RSI: badfffffbadfffff RDI: badfffff7b61dfff
CR2: 0000001145b61ff8 CR3: 0000000118610001 CR4: 0000000000f70ef0
Call Trace:
 <TASK>
 ? __bhi_args+0x20/0x20
 load_module+0x26ec/0x2e90
 ? free_pages_bulk+0x110/0x160
 init_module_from_file+0xc8/0x180
 idempotent_init_module+0x23e/0x360
 __x64_sys_finit_module+0x7f/0x110
 do_syscall_64+0xce/0x560

(b) BUG: Bad page map / Oops: Bad pagetable in polkitd & gdbus

BUG: Bad page map in process polkitd  pte:000fffffff9870a5
pgd:00000001373c8067 p4d:00000001373c8067 pud:0000000137269067 pmd:000000010cb97067
addr:00007fbd7cc65000 vm_flags:08000075 anon_vma:0000000000000000 mapping:ffff89a013b443d0 index:64 (file) 7fbd7cc65 (anon)
file:libglib-2.0.so.0.9000.1 fault:filemap_fault mmap:0x0 mmap_prepare: ext4_file_mmap_prepare read_folio:ext4_read_folio
CPU: 13 UID: 102 PID: 878 Comm: polkitd Tainted: G           OE       7.3.4-zen2-2-zen #1 PREEMPT(full)  9cd4e4ee1f637afe75058bc48f044441408c1130
Hardware name: LENOVO 82RF/LNVNB161216, BIOS J2CN40WW 04/15/2022
Call Trace:
 <TASK>
 dump_stack_lvl+0x5d/0x80
 print_bad_page_map.constprop.0.cold+0x172/0x21d
 vm_normal_page+0x111/0x120
 __handle_mm_fault+0xb85/0x1190
 handle_mm_fault+0xe0/0x2d0
 do_user_addr_fault+0x351/0xc20
 exc_page_fault+0x90/0x1c0
 asm_exc_page_fault+0x26/0x30
 </TASK>
polkitd: Corrupted page table at address 7fbd7cc65ef0
PGD 1373c8067 P4D 1373c8067 PUD 137269067 PMD 10cb97067 PTE fffffff9870a5
Oops: Bad pagetable: 001d [#1] SMP NOPTI

(Followed by BUG: Bad page map in process gdbus pte:000fffffff9870a5 and get_swap_device: Bad swap offset entry 3ffffffffcadc.)

(Historical check across 2026-10-03 .. 2026-11-15 10:00:00 on 7.2.14: 0 occurrences of BAR 1 [mem 0x00000000-0x0fffffff, RmInitAdapter failed, Bad page map, Bad pagetable, Oops:, or unable to handle page fault across 201 boots.)

Activity

  1. heftig commented on Nov 16, 2026

    @heftig

    Please check against linux 7.3.4-arch1-2 to verify this is a regression of the ZEN patchset and not upstream 7.3.4.

  2. panadaxx commented on Nov 20, 2026

    @panadaxx
    Author

    @heftig Tested stock linux 7.3.4-arch1-2 (Linux x 7.3.4-arch1-2 #1 SMP PREEMPT_DYNAMIC Thu, 12 Nov 2026 20:11:37 +0000) via warm reboot with the exact same hardware, external monitor attached, nvidia-open-dkms 620.70.06-1, and MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) initramfs configuration.

    Result on 7.3.4-arch1-2: Boots cleanly into the desktop with no issues.

    • BAR 1 enumerates properly at 8 GiB:
      pci 0000:01:00.0: BAR 1 [mem 0x00000000-0x1ffffffff 64bit pref]
      pci 0000:01:00.0: BAR 1 [mem 0x6000000000-0x61ffffffff 64bit pref]: assigned
      NVRM: loading NVIDIA UNIX Open Kernel Module for x86_64  620.70.06  Release Build
      [drm] Initialized nvidia-drm 0.0.0 for 0000:01:00.0 on minor 1
      [drm] Initialized i915 1.6.0 for 0000:00:02.0 on minor 2
      
    • Zero RmInitAdapter failed!, zero apply_relocate_add #PF / Bad page map / Bad pagetable errors, and no early resctrl WRMSR to 0xd10 warning trace (which did appear on 7.3.4-zen2-2-zen).

    (Note: This is from a warm reboot test of 7.3.4-arch1-2, whereas 7.3.4-zen2-2-zen failed consistently on warm reboots with the external display attached; happy to run additional boots/traces if helpful.)

    So upstream 7.3.4 (7.3.4-arch1-2) appears unaffected — this looks specific to the 7.3.4-zen2 patchset.

  3. heftig commented on Nov 21, 2026

    @heftig

    @damentz I guess this might be the mglru-fg patchset?

  4. damentz commented on Nov 21, 2026

    @damentz
    Member

    @damentz I guess this might be the mglru-fg patchset?

    Maybe, but I think something else might be going on here.

    @panadaxx can you get us your full kernel boot logs of stock arch and zen? The output of sudo journalctl -k -b for both boots attached here will be helpful. Also the output of sudo lspci -vvv for both boots so we can confirm how your GPU is initialized.

  5. damentz commented on Nov 21, 2026

    @damentz
    Member

    In the meantime I ported the changes between v4 and v5 of the MGLRU-FG patch set in 71e652e. It's unlikely to help but it includes optimizations that might have some impact on the problem here.

  6. panadaxx commented on Nov 22, 2026

    @panadaxx
    Author

    @damentz Here are the full kernel boot logs (journalctl -k -b, MAC/UUID redacted) for both 7.3.4-arch1-2 and 7.3.4-zen2-2-zen, plus lspci -vvv:

    https://gist.github.com/panadaxx/60606a823bff58efa1710c57a29fa3de

    Files included in the gist:

    1. journal-k-7.3.4-arch1-2.log — working stock 7.3.4-arch1-2 boot (with nvidia-open-dkms 620.70.06-1, MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) early loading, external monitor attached).
    2. journal-k-7.3.4-zen2-2-zen.log — failing 7.3.4-zen2-2-zen boot (also with nvidia-open-dkms 620.70.06-1 and MODULES=(nvidia ...) early loading, external monitor attached; reproduces BAR 1 [mem 0x00000000-0x0fffffff], RmInitAdapter failed!, and the apply_relocate_add #PF).
    3. lspci-vvv-7.2.14-zen1-1-zen.txt — note: I am currently booted back into 7.2.14-zen1-1-zen for daily use, so this lspci -vvv is from the working 7.2.14-zen1-1-zen state (showing the PCIe topology and 01:00.0 Resizable BAR 8 GiB layout). Let me know if you specifically still need lspci -vvv captured under 7.3.4-arch1-2 (still installed as a secondary boot entry) or if I should test once the 7.3.5 + MGLRU-FG v5 (71e652efb) package reaches Arch.
  7. damentz commented on Nov 22, 2026

    @damentz
    Member

    lspci-vvv-7.2.14-zen1-1-zen.txt — note: I am currently booted back into 7.2.14-zen1-1-zen for daily use, so this lspci -vvv is from the working 7.2.14-zen1-1-zen state (showing the PCIe topology and 01:00.0 Resizable BAR 8 GiB layout). Let me know if you specifically still need lspci -vvv captured under 7.3.4-arch1-2 (still installed as a secondary boot entry) or if I should test once the 7.3.5 + MGLRU-FG v5 (71e652e) package reaches Arch.

    Can you also get us the sudo lspci -vvv output of the Zen Kernel too?

  8. panadaxx commented on Nov 25, 2026

    @panadaxx
    Author

    @damentz Update with the requested sudo lspci -vvv outputs from 7.3.4-zen2-2-zen (both failing and passing boots), plus a major correction regarding stock Arch 7.3.4-arch1-2:

    New Gist (all MACs, UUIDs, and PCI Device Serial Numbers redacted):
    https://gist.github.com/panadaxx/a8fc9fffe0aef562ca6fcca48c9b3076

    Key findings from additional reboots

    1. Stock 7.3.4-arch1-2 is ALSO affected intermittently (sorry for the earlier false negative — my previous single warm reboot happened to pass):
      • In journal-k-7.3.4-arch1-2-FAIL.log, stock 7.3.4-arch1-2 reproduced the exact same failure:
        • pci 0000:01:00.0: BAR 1 [mem 0x00000000-0x0fffffff 64bit pref] (256 MiB instead of 8 GiB)
        • NVRM: GPU0 kbusVerifyBar2_GM107: MMUTest BAR0 window offset 0x70e000 returned garbage 0x0 -> RmInitAdapter failed! (0x24:0x72:1357)
        • Followed during initramfs ((udev-worker)/259) by WARNING: mm/swapfile.c:2130 at swap_put_entries_direct+0xae/0xf0 and BUG: Bad page map in process (udev-worker) (causing ~7.5 min hang before failing into tty/recovery).
    2. 7.3.4-zen2-2-zen also passes intermittently and fails intermittently, and comparing PASS vs FAIL sudo lspci -vvv on the exact same 7.3.4-zen2-2-zen kernel reveals a clear mismatch on 0000:01:00.0:
      • Upstream bridge 00:01.0 still has the full Prefetchable memory behind bridge: 6000000000-6201ffffff [size=8224M] window on failing boots.
      • 01:00.0's PCIe Capabilities: [bb0 v1] Physical Resizable BAR capability ALSO still reports BAR 1: current size: 8GB, supported: 64MB 128MB 256MB 512MB 1GB 2GB 4GB 8GB on failing boots.
      • Yet Linux probes/assigns Region 1 at 6000000000 [size=256M] and Region 3 at 6010000000 [size=32M] (instead of Region 1 [size=8G] + Region 3 at 6200000000 [size=32M] on passing boots), with CESta: AdvNonFatalErr+ and MSI: Enable- (Interrupts: pin B routed to IRQ 16).
      • Two consecutive failing 7.3.4-zen2-2-zen captures (lspci-vvv-7.3.4-zen2-2-zen-FAIL.txt and FAIL2.txt) produced identical BAR/bridge config-space layouts; the first one (journal-k-7.3.4-zen2-2-zen-FAIL.log) also triggered swap_put_entries_direct+0xae/0xf0 + BUG: Bad page map in process lspci + mntput_no_expire_slowpath, while the second one (FAIL2) hit only the BAR/NVRM failure.

    Files in the new Gist

    1. journal-k-7.3.4-zen2-2-zen-FAIL.log + lspci-vvv-7.3.4-zen2-2-zen-FAIL.txt — failing 7.3.4-zen2-2-zen boot Add LZ4 compression method to btrfs, see git://repo.or.cz/linux-2.6/btr... #1 (BAR 1 = 256M + swap_put_entries_direct / Bad page map on lspci)
    2. journal-k-7.3.4-zen2-2-zen-FAIL2.log + lspci-vvv-7.3.4-zen2-2-zen-FAIL2.txt — failing 7.3.4-zen2-2-zen boot UKSM-0.1.2.2 for linux-3.7 #2 (clean BAR 1 = 256M / RmInitAdapter failed! reproduction without memory warnings)
    3. journal-k-7.3.4-zen2-2-zen-PASS.log + lspci-vvv-7.3.4-zen2-2-zen-PASS.txt — passing 7.3.4-zen2-2-zen boot (BAR 1 = 8G)
    4. journal-k-7.3.4-arch1-2-FAIL.log — failing stock 7.3.4-arch1-2 boot (BAR 1 = 256M + swap_put_entries_direct / Bad page map)
    5. journal-k-7.3.4-arch1-2-PASS.log + lspci-vvv-7.3.4-arch1-2-PASS.txt — passing stock 7.3.4-arch1-2 boot (BAR 1 = 8G)

    So this looks like an intermittent upstream Linux 7.3 regression (hitting PCI BAR / memory mapping during early boot) rather than a Zen-specific patch issue. Happy to close this issue or keep it open if you'd like further testing — thank you for looking into it!

  9. panadaxx commented on Nov 25, 2026

    @panadaxx
    Author

    In my previous tests, I used 7.3.4-arch1-2 as the fallback kernel, and it worked flawlessly throughout testing. However, I encountered one failure today, with the same cause as the failures on 7.3.4-zen2-2-zen. It seems that 7.3.4-zen2-2-zen has a higher failure rate.

    Also, this time, the Zen kernel failed to the point where I couldn't even access the TTY, which has never happened with the upstream Arch kernel. This is quite strange.

  10. haxxordan commented on Nov 28, 2026

    @haxxordan

    Same failure on a third Legion 5 Pro Gen 7 variant. It also reproduces on stock Arch linux, and the bad state survives a warm reboot into an older kernel.

    Hardware: Lenovo Legion 5 Pro 16IAH7 (82S0), same BIOS J2CN61WW, Alder Lake-P hybrid. GA107BM RTX 3050 Ti [10de:25e0] at 01:00.0 (4 GB ReBAR on good boots) behind the same root port 00:01.0 [8086:460d]. nvidia-open-dkms, with the nvidia modules in the initramfs, NVreg_DynamicPowerManagement=0x03. The cmdline has pcie_aspm=off pcie_port_pm=off, so ASPM / port runtime PM don't seem to be the trigger.

    So far: 82RF with GA104 (this issue, plus the Fedora report in RH 2577519) and 82S0 with GA107. That makes it look specific to the platform or root port, not to a GPU model.

    Per-boot record from my journal (all on 2026-11-15 unless noted; "warm" means a reboot with no power-off):

    Boot Kernel Driver BAR1 at enumeration GPU Notes
    Nov 13 7.3.4-zen2-1 620.70.06 4 GB OK first 7.3 boot, ran ~2.5 days
    1 7.3.4-arch1-2 620.70.06 256 MB RmInitAdapter failed
    2 7.3.4-zen2-2 620.70.06 256 MB fail Bad rss-counter state
    3 7.3.4-arch1-2 620.70.06 256 MB fail Bad page map / Bad page state, swap_put_entries_direct WARNING, btrfs csum failures
    4–5 6.18.63 LTS 620.70.06 4 GB OK first one after power-off with AC unplugged
    6 7.3.4-zen2-1 620.70.06 256 MB fail warm reboot from the good LTS boot 5; Bad page map, swap_put_entries_direct WARNING
    7 6.18.63 LTS 620.70.06 256 MB fail warm reboot from boot 6; btrfs bad tree block, fs went read-only
    8 6.18.63 LTS 620.70.06 4 GB OK after power-off with AC unplugged
    9 7.3.4-zen2-2 615.78.08 256 MB fail no corruption seen (~2 min uptime)
    since 7.2.15-zen1 615 / 620.70.06 / 620.73.04 4 GB OK 7 boots plus ~12 days uptime, 0 failures

    (One more 7.3.4-zen boot dropped to the emergency shell because the root NVMe never appeared, so it isn't in the journal.)

    What may help narrow it down:

    • Stock 7.3.4-arch1-2 failed on 2 of 2 boots here, which matches your correction that it isn't zen-specific. On this machine 7.3 failed on 5 of 6 boots overall. Only the very first 7.3 boot passed.
    • Boot 7: after a failed 7.3 boot, 6.18 LTS also enumerates BAR1 at 256 MB and fails the same way. Only a full power-off with AC unplugged clears it (boots 4 and 8). So whatever 7.3 does leaves state in the device or firmware that an older kernel then reads too. It's not only a sizing mistake within one 7.3 boot. This fits your lspci finding that the ReBAR capability still says 8 GB while Linux assigned 256 MB.
    • Boot 6: 7.3 failed on a warm reboot straight from a clean LTS boot, so it doesn't need a prior bad state to fail.
    • Memory corruption has the same signature as yours: WARNING: mm/swapfile.c:2130 at swap_put_entries_direct+0xae/0xf0 in (udev-worker), then Bad rss-counter state / Bad page map / Bad page state, only on the boots where BAR1 came up at 256 MB.
    • Every boot, good or bad, logs this on the GPU's root port right before enumeration: pci 0000:00:01.0: broken device, retraining non-functional downstream link at 2.5GT/s, then removing 2.5GT/s downstream link speed restriction. Do your 82RF logs show it too? A link that has only just been retrained when BAR1 is sized seems like a plausible place for a 7.3 timing change to bite.

    On 7.3.6: the Fedora 82RF reporter closed RH 2577519 after one good 7.3.6 boot (7.3.5 + 620.73.04 still failed for them). I went through the 7.3.6 stable changelog and found nothing touching x86 BAR sizing, ReBAR, link retraining or resource assignment. Given how intermittent this is, that single boot may have been luck. I'm holding at 7.2.15. I can boot 7.3.6 for a few test boots, or test a patch or debug build, and collect journalctl -k / lspci -vvv for good and bad boots if that helps.

    Earlier write-up with full NVRM logs: NVIDIA/open-gpu-kernel-modules#1507 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions