Bug 291214 - 9562994a7aac: drm-66-kmod fails to load following this commit
Summary: 9562994a7aac: drm-66-kmod fails to load following this commit
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 207898
  Show dependency tree / graph
 
Reported: 2025-11-25 16:50 UTC by Cy Schubert
Modified: 2025-12-15 18:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cy Schubert freebsd_committer freebsd_triage 2025-11-25 16:50:03 UTC
As of 9562994a7aac drm-66-kmod fails to load -- X fails to start -- on HP 840 G5 with the messages:

link_elf_obj: symbol intel_gtt_read_pte undefined
linker_load_file: /boot/modules/i915kms.ko - unsupported file type
link_elf_obj: symbol intel_gtt_read_pte undefined
linker_load_file: /boot/modules/i915kms.ko - unsupported file type

Setting debug.link_elf_leak_locals and debug.link_elf_obj_leak_locals circumvents the issue.

I also have a Framework 13 with AMD GPU. No issues there after rebuilding the drm-66-kmod port.
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2025-11-25 17:40:35 UTC
9562994a7aac has been reverted. We can reopen this PR if needed.
Comment 2 Ed Maste freebsd_committer freebsd_triage 2025-11-25 18:03:32 UTC
I plan to recommit 9562994a7aac next week (after stabweek), so we should fix these issues before then.

Can you check whether these symbols appear in your kernel -- i.e. readelf -s /boot/kernel/kernel | egrep '^Symbol|intel_gtt_read_pte'
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2025-11-25 18:17:55 UTC
(In reply to Ed Maste from comment #2)

It's actually on agp.ko.

slippy$ readelf -s /boot/kernel/agp.ko | egrep '^Symbol|intel_gtt_read_pte' 
Symbol table '.symtab' contains 340 entries:
   217: 00000000000040f0    52 FUNC    LOCAL  DEFAULT     1 intel_gtt_read_pte_paddr
   218: 0000000000004130    52 FUNC    LOCAL  DEFAULT     1 intel_gtt_read_pte
slippy$
Comment 4 Cy Schubert freebsd_committer freebsd_triage 2025-11-25 18:24:20 UTC
OK, here's the problem.

My default kernel contains nodevice agp. I don't need it for the servers in my basement. I use the same kernel on my laptops. X loads whatever modules it needs on the laptops when it starts. This could have been averted by agp_load="YES" in my laptops loader.conf.
Comment 5 Ed Maste freebsd_committer freebsd_triage 2025-11-25 18:42:22 UTC
Can you test if https://reviews.freebsd.org/D53906?
Comment 6 Cy Schubert freebsd_committer freebsd_triage 2025-11-25 20:01:55 UTC
This is fixed by D53906. We can close this now.
Comment 7 commit-hook freebsd_committer freebsd_triage 2025-11-25 20:14:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a87c1e2dd8fc997d6ee603c252c543afe8a4d2a4

commit a87c1e2dd8fc997d6ee603c252c543afe8a4d2a4
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-11-25 18:40:35 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-11-25 20:14:19 +0000

    agp: Export intel_gtt_read_pte, required by i915kms

    This isn't used by modern cards, but is needed for i915kms to load
    on a system that has agp as a module not compiled into the kernel.

    PR:             291214
    Reviewed by:    cy
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D53906

 sys/modules/agp/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 8 commit-hook freebsd_committer freebsd_triage 2025-12-09 16:33:26 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=8befd2d2b6a0c5d54fa53246a89ae09009007799

commit 8befd2d2b6a0c5d54fa53246a89ae09009007799
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-11-25 18:40:35 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-12-09 16:32:08 +0000

    agp: Export intel_gtt_read_pte, required by i915kms

    This isn't used by modern cards, but is needed for i915kms to load
    on a system that has agp as a module not compiled into the kernel.

    PR:             291214
    Reviewed by:    cy
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D53906

    (cherry picked from commit a87c1e2dd8fc997d6ee603c252c543afe8a4d2a4)

 sys/modules/agp/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 9 commit-hook freebsd_committer freebsd_triage 2025-12-15 16:40:40 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=ae1f6fd47c4584d1abe5ecf26f291d282e6f6a67

commit ae1f6fd47c4584d1abe5ecf26f291d282e6f6a67
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-11-25 18:40:35 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-12-15 16:39:56 +0000

    agp: Export intel_gtt_read_pte, required by i915kms

    This isn't used by modern cards, but is needed for i915kms to load
    on a system that has agp as a module not compiled into the kernel.

    PR:             291214
    Reviewed by:    cy
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D53906

    (cherry picked from commit a87c1e2dd8fc997d6ee603c252c543afe8a4d2a4)
    (cherry picked from commit 8befd2d2b6a0c5d54fa53246a89ae09009007799)

 sys/modules/agp/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 10 commit-hook freebsd_committer freebsd_triage 2025-12-15 18:40:17 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=daedb9122a1812d0e9c9baef01afbe115a4edfcc

commit daedb9122a1812d0e9c9baef01afbe115a4edfcc
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-11-25 18:40:35 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-12-15 18:39:11 +0000

    agp: Export intel_gtt_read_pte, required by i915kms

    This isn't used by modern cards, but is needed for i915kms to load
    on a system that has agp as a module not compiled into the kernel.

    PR:             291214
    Reviewed by:    cy
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D53906

    (cherry picked from commit a87c1e2dd8fc997d6ee603c252c543afe8a4d2a4)
    (cherry picked from commit 8befd2d2b6a0c5d54fa53246a89ae09009007799)
    (cherry picked from commit ae1f6fd47c4584d1abe5ecf26f291d282e6f6a67)

 sys/modules/agp/Makefile | 1 +
 1 file changed, 1 insertion(+)