# How to debug ACPI? My computer cannot restart/power off



## intron (Mar 14, 2017)

After I upgraded BIOS of my motherboard (Gigabyte GA-H170-HD3), I cannot restart or power off my computer from FreeBSD 11.0-R-p8. The kernel freezes after file system synchronization.

I haven't knowledge on internals of ACPI.
Can anyone tell me how to debug ACPI?


----------



## Phishfry (Mar 14, 2017)

If I was a betting man I would say it is probably an UEFI problem.
Have you dug through the bios and messed with different UEFI settings?
UEFI might have been updated when you updated the bios.

What makes you say ACPI?


intron said:


> freezes after file system synchronization.


This makes me think UEFI. Is this on bootup and it freezes here?


----------



## intron (Mar 15, 2017)

This phenomenon appears at the end of restarting or powering off.
Please have a look at the image in this post.
Besides enabling/disabling UEFI, I haven't found any other option about UEFI.









Phishfry said:


> If I was a betting man I would say it is probably an UEFI problem.
> Have you dug through the bios and messed with different UEFI settings?
> UEFI might have been updated when you updated the bios.
> 
> ...


----------



## Phishfry (Mar 15, 2017)

OK so my UEFI diagnosis is probably not valid if it starts fine but hangs on shutdown.

I still have to wonder with the bios update it must be related.

Does this happen when using the power button or `shutdown -r now`
Are you shutting down from an xorg desktop?
What about disks. Any ZFS or disk controllers. Is this a laptop?


----------



## Datapanic (Mar 15, 2017)

Look at the first line in the photo - "init: some processes would not die..."

I would investigate what those were and fix that first then see if you get a clean shutdown.


----------



## intron (Mar 16, 2017)

This happens when "shutdown -r now" or "shutdown -p now" is executed.



Phishfry said:


> OK so my UEFI diagnosis is probably not valid if it starts fine but hangs on shutdown.
> 
> I still have to wonder with the bios update it must be related.
> 
> ...


----------



## Phishfry (Mar 16, 2017)

Yes I agree with above comment about unclean shutdown. I would wait a long time because of disk checking(especially ZFS).
ACPI is a recurring thread when I research the problem.
Are you using ZFS?
Have you tried any of these:

From the mailing list:
4. Does "sysctl hw.usb.no_shutdown_wait=1" help you?

5. Does "sysctl hw.acpi.handle_reboot=1" help you?

6. Does "sysctl hw.acpi.disable_on_reboot=1" help you?

I would try each setting individually and set to =0 after failed attempt or remove the setting.
https://lists.freebsd.org/pipermail/freebsd-stable/2013-June/073875.html


----------



## SirDice (Mar 17, 2017)

Phishfry said:


> From the mailing list:
> 4. Does "sysctl hw.usb.no_shutdown_wait=1" help you?


From time to time my server refuses to shutdown. This one usually helps with that. Especially if you have one or more USB disks attached to the machine.


----------

