I’ve just had a job where a customer’s laptop was shutting down out of the blue and when I looked in the logs I was seeing kernel power errors 41 and 142 as a pair after every shutdown.
I tested for a while trying to characterise the shutdown problem, and I couldn’t make it happen. All hardware tests passed and no matter what I did I couldn’t reproduce it, including getting the customer to keep logs of exactly what he was doing to repeatably cause the shutdown, and then following those logs precisely. He would see shutdowns consistently, and I was seeing none.
I had spent time researching the problem online, and while a number of people were reporting it, (on threads like this one https://answers.microsoft.com/en-us/windows/forum/all/kernel-power-142-41-random-shutdown/8d541cab-57c5-45ed-b79f-722bc5487571#:~:text=Description%3A,crashed%2C%20or%20lost%20power%20unexpectedly. ) the closest to a solution was that it was a hardware fault of some kind.
I found various other problems and fixed them, but it wasn’t until I started to test without the power adapter connected that I saw the shutdown happen.
From this point it was a simple matter of swapping in a known good battery and the problem was solved.
So if you see this combination of errors in the log on a laptop and you’re getting unexpected shutdowns, consider that the battery might be faulty, it could save you a lot of diagnosis time! I thought it was worth posting about in case I can save someone else some frustration.