I'm on Linux 4.2.0, the Ubuntu Wily HWE kernel for Ubuntu 14.04 (which is what I'm running).
There's a nasty bug on MacBook 11,4 and 11,5 models where the laptops won't actually ever shut off, they seem to reach the
Power down kernel message and then just hang without ever shutting off. This bug is likely preventing suspend and resume as well. Interestingly enough, it doesn't manifest when
reboot is called, only when trying to just halt the machine.
The details aren't so relevant, but what is relevant is how I could debug this. Is there a way to
strace or debug the kernel while it's shutting down and observe the output somehow? I'm fairly certain that the power off logic is making a syscall that is just hanging forever and not returning for some strange reason. If I can figure out which syscall isn't working, I could then continue onward to figure out why it isn't working and what specifically about the hardware is causing the shutdown to fail.
Is there a standard practice for debugging a kernel shut down? Do I need special hardware? I'm fine writing patches for the kernel, but I don't even know where to begin looking for this issue unless I can find the syscall that isn't working.