I have a desktop system with a Radeon RX 240 graphics card and an Intel i7-3770S CPU which has Intel HD 4000 integrated graphics. I did a fresh install of 13.2-RELEASE yesterday with the intention of using OBS studio for content creation. I use the Radeon graphics card to drive my primary display, and I have a second display connected to the integrated graphics port. I also use the integrated GPU for hardware video encoding. As such, I need to use the amdgpu kernel module to provided accelerated graphics on my primary display and i915kms to enable hardware video encoding on the integrated GPU. That's what led me to try loading both kernel modules and to discover that the system crashes, does a kernel dump, and reboots. It would be really nice to get these two modules playing well together for my intended use case.
can you please attach the crashdump to this bug report?
(In reply to Mina Galić from comment #1) I tried to upload it as an attachment, but I got an error PR_CONNECT_RESET_ERROR when trying to do so. Maybe because it exceeds the attachment file size limit? It says 1000KB is the maximum attachment size, and the dump is 554M in size. Is there another way I can send it to you?
(In reply to Patrick McMunn from comment #2) all we want, as a start, is backtrace https://docs.freebsd.org/en/books/developers-handbook/kerneldebug/
Created attachment 242696 [details] Kernel panic/page fault backtrace
Assuming drm-510-kmod.
I apologize. I wasn't thinking about the drm package. I still think of drm as part of the base system. I can confirm that the current drm-510-kmod on my system is 5.10.163_7.
I face the same issue. I have installed drm-kmod, not sure if its drm-510-kmod. But in my case, setting kld_list="i915kms amdgpu" causes the system to not boot/panic/crash. Is there anything I should add to help solve the issue?
First, trivial check on version of port installed: > pkg info drm-\* drm-515-kmod-5.15.25_3 I'm running head (14), so I'm unsure how or if 5.15 runs on 13.2. I believe I saw the lkpi stuff committed, but no promises. More important, the drm=510-kmod package will crash on 13.2 a packages for 13.2 ar still built on 13.1 and will be until 13.1 goes EOL. You MUST build the port on a system with full 13.2 kernel sources available. The kernel sources are available on the install media for 13.2.
(In reply to sozuba from comment #7) > … setting kld_list="i915kms amdgpu" causes the system to > not boot/panic/crash. Causes the problem, or does not cause the problem?
(In reply to rkoberman from comment #8) > … how or if 5.15 runs on 13.2. … <https://www.freshports.org/graphics/drm-515-kmod/> >> This version is for FreeBSD 14.0 and above.
I spent ~5 hours after work this evening troubleshooting at the prompting of rkoberman's comments. First of all, under 13.2-RELEASE, I found that the order in which the modules appear in kld_list does make a difference. If kld_list="amdgpu i915kms", the the kernel panics, dumps core, and reboots. If kld_list="i916kms amdgpu", the the system reboots without dumping core. I tried building drm-515-kmod under 13.2-RELEASE, but it faild to compile. So I downloaded and installed FreeBSD-14.0-CURRENT-amd64-20230608-653738e895ba-263444. Under 14.0-CURRENT, both modules can appear in kld_list, and the system will continue to boot successfully without panicking. So that's good. But it is still exhibiting undesirable as well as baffling behavior. Under 14.0-CURRENT, if i915ms either appears first or alone, the system will boot, but SDDM will error with "Failed to read display number from pipe" and "Could not start Display server on vt 9". But if kld_list="amdgpu i915kms", then SDDM will start successfully, and I can log into Plasma 5. But, only my secondary display connected to the integrated Intel graphics will have a graphical display. The boot messages appear on my primary display connected to my Radeon RX 240 until the drm kernel modules load. Then the text on the primary display freezes and continues on my secondary display. So once the drm kernel modules load, only my secondary display is functional. At least with 13.2-RELEASE, I could load amdgpu alone and my primary display alone would be functional. But under 14.0-CURRENT, amdgpu alone results in a black screen on my primary display as soon as the drm kernel module loads. All I can do at that point is press CTRL-ALT-DEL to reboot. All tests on 14.0-CURRENT were with drm-515-kmod-5.15.25_3. I have not yet tried drm-510-kmod on 14.0-CURRENT.
It turns out the black screen with amdgpu was due to the GPU firmware not being installed. Once the firmware was installed, that issue was resolved. But, for some reason, I can currently only get SDDM and X to start if neither i915kms nor amdgpu is loaded (in which case X will use the scfb driver). I'm not sure what changed. In any case, it's not even clear how relevant that is.
(In reply to rkoberman from comment #8) > … drm=510-kmod package will crash on 13.2 … built on 13.1 … Maybe true for your hardware, not true here: root@fuji:~ # uname -KU 1302001 1302001 root@fuji:~ # pkg info drm-510-kmod | grep FreeBSD_version FreeBSD_version: 1301000 root@fuji:~ # kldstat | grep i915 5 1 0xffffffff82b18000 1858b8 i915kms.ko root@fuji:~ #
(In reply to Patrick McMunn from comment 11 and comment 12) Please, let's keep this bug report focused on kernel panics. Thanks. ---- Questions relating to other symptoms can be asked elsewhere. Re: <https://www.freebsd.org/community/>, I'm most often in /r/freebsd
Created attachment 242754 [details] core dump analysis (In reply to Mina Galić from comment #3) Kernel panic resulting from: kldload amdgpu Dump header from device: /dev/ada0p2 Architecture: amd64 Architecture Version: 2 Dump Length: 371363840 Blocksize: 512 Compression: none Dumptime: 2023-06-13 07:05:45 +0100 Hostname: fuji Magic: FreeBSD Kernel Dump Version String: FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC Panic String: page fault Dump Parity: 1984728343 Bounds: 0 Dump Status: good <https://bsd-hardware.info/?probe=f6540a4d85> – whilst this hardware does not include AMD graphics, I assume that we should be able to load the module without the kernel panicking.
(In reply to Graham Perrin from comment #9) Causes the problem.
Also: Kernel panic with attempted load of i915kms after amdgpu · Issue #289 · freebsd/drm-kmod <https://github.com/freebsd/drm-kmod/issues/289>