freebsd / drm-kmod

drm driver for FreeBSD
148 stars 68 forks source link

Kernel panic when unloading i915drm #265

Open khorben opened 7 months ago

khorben commented 7 months ago

Describe the bug When unloading the i915drm kernel module on a machine with supported Intel-based graphics, the system crashes and instantly reboots. (Black screen and then POST)

FreeBSD version

# uname -aKU
FreeBSD. 14.0-RC4 FreeBSD 14.0-RC4 #0 releng/14.0-n265374-d59533eaf942: Fri Nov  3 05:51:43 UTC 2023    root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 1400097 1400097

PCI Info

Intel HD Graphics 610 on an ASRock H110M-ITX

DRM KMOD version Paste the output of pkg query -x '%n %v' 'drm.*kmod'

To Reproduce Steps to reproduce the behavior:

# pkg install drm-kmod
[...]
# kldload i915drm
# kldunload i915drm
thesunexpress commented 7 months ago

errrmm....

For Intel: kld_list="i915kms"

khorben commented 7 months ago

kld_list=... in rc.conf(5) is picked up by /etc/rc.d/kld, which calls load_kld() from rc.subr(8), which ultimately calls kldload(8). The instructions I gave here represent the most concise yet efficient way I could find to reliably reproduce the issue, unambiguously, without having to modify any local files.

evadot commented 6 months ago

Yes this is known, drm unloading never really worked reliably for us and yes we should fix that one day (tm).

huanghwh commented 3 weeks ago

so suspend/resume should be work?

evadot commented 3 weeks ago

so suspend/resume should be work?

Yes, suspend/resume have nothing to do with unloading.

wulf7 commented 3 weeks ago

so suspend/resume should be work?

Suspend/resume generally does not work on modern hardware due to missing S0ix support

huanghwh commented 3 weeks ago

I have macbookpro 2017, supend/resume works on drm-5.15, I try to make MateBook X Pro works under drm-6.1, but it is not, when suspend, the Caps LED is always on, never resume:(