Kernel panic/crash every boot after a shutdown - OPNsense (based on FreeBSD 13) reddit / freebsd ---------------------------------------------------------------------- sinayion · 2022-07-11 15:19 EDIT: It's the HD Audio Device causing this. Disabling it in the bios stops this issue. Many thanks to u/xPliZit_xs below for figuring this out. **FYI, I'm having this issue on my new OPNsense machine, and since it's based on FreeBSD 13, i'm hoping someone here knows what's going on.** Hi all, I have a Lenovo ThinkCentre M75s Small Form Factor Gen 2 Desktop ([https://www.lenovo.com/us/en/p/desktops/thinkcentre/m-series-sff/thi nkcentre-m75s-gen- 2/11tc1mdm75s](https://www.lenovo.com/us/en/p/desktops/thinkcentre/m- series-sff/thinkcentre-m75s-gen-2/11tc1mdm75s)). After installing opnsense 22.1.2, I'm noticing kernel panics/crashes that happen as follows:- I boot the system- Log in- Choose the prompt to shutdown (5)- Turn system back on- Notice the system has hung as a kernel panic/crash and never auto-reboots. Keyboard is also unresponsive at this time. Here is a picture taken via my phone of the last screen: [https://imgur.com/a/0UGkRta](https://imgur.com/a/0UGkRta). Reboots never cause this issue (option 6). Even after updating the OS, the issue still happens. For the sake of testing purposes, I installed FreeBSD 13.1 on the same machine, and noticed that a similar weird issue happens. After I invoke "shutdown -p now", when I turn the system back on the OS boots up, then auto-reboots before showing me the login prompt; after this reboot I see the login prompt. This never happens if I invoke the reboot command. There are never any crash logs in the FreeBSD OS location /var/crash. Any ideas? Let me know if you need more info, and how I can get it for you. Thanks (I also posted on the official opnsense forums: [https://forum.opnsens e.org/index.php?topic=29276.msg141378#msg141378](https://forum.opnsens e.org/index.php?topic=29276.msg141378#msg141378)) ---------------------------------------------------------------------- rhavenn · 2022-07-11 18:07 what does a `shutdown -r now` do? Does that reboot the machine cleanly? It is a slight different behavior than `reboot`. how about a `shutdown -h now` ? It "should" halt and tell you it's ready to be turned off. However, it also might give you insight into what's causing a panic if it's in that area of steps. Does the `-p` actually power off? My guess is your BIOS / UEFI has some problem with the "poweroff" bit and never cleanly actually powers off and causes a kernel panic. If you can "halt" the system and push the power button to turn it off and it comes back cleanly then that narrows it down a bit. ​ I think at this point in the shutdown all your drives are unmounted, so you'll probably not see anything captured. ---------------------------------------------------------------------- grahamperrin · 2022-07-12 04:39 `uname -aKU` ---------------------------------------------------------------------- xPliZit_xs · 2022-07-27 01:27 Go into your BIOS and find the HDA Audio and disable it. ---------------------------------------------------------------------- sinayion · 2022-08-03 11:23 Thanks, someone else in the opnsense subreddit mentioned the same. This fixed my issue! ---------------------------------------------------------------------- grahamperrin · 2023-08-29 06:24 /u/xPliZit_xs thanks. /u/sinayion If you like, mark your post: [answered](https://i.imgur.com/pTA9UeG.png) Also: - FreeBSD bug [268393 – system always reboots once from a powered off state](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268393) – your post here is linked from [comment 47](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268393#c47) there. ---------------------------------------------------------------------- grahamperrin · 2023-08-29 06:28 > … if I invoke the reboot command … /u/sinayion would that have been, specifically, what's below? `reboot -r` Or, simply `reboot` (with no option)? [reboot\(8\)](https://www.freebsd.org/cgi/man.cgi?query=reboot&sektion =8&manpath=freebsd-release) ---------------------------------------------------------------------- sinayion · 2023-08-29 06:33 Done! Thanks for the info. Also, this seems fixed now with the latest OPNsense, so I'll add that info too, ---------------------------------------------------------------------- sinayion · 2023-08-29 06:37 Hmm, I don't remember; I think it was reboot without an option. But this also happened even when rebooting via the OPNsense Web GUI. Thankfully, this appears fixed, so no longer an issue. :)