Contribute
Register

[solved] Kernel Panic when switching from battery to A/C power

Status
Not open for further replies.
Joined
Sep 22, 2011
Messages
1,520
Motherboard
HP EliteDesk 800 G5 Mini
CPU
i9-9900
Graphics
UHD 630
Mac
  1. Mac mini
Mobile Phone
  1. iOS
My Thinkpad T61 runs both Sierra and High Sierra almost perfectly. The only problem I have in both OSes is an occasional kernel panic when I switch from battery to A/C power. If I'm doing anything important, I'll shutdown on battery power, plug in A/C and reboot. I'd like to fix this problem if I can but don't know where to start. A screen shot of the kernel panic is attached along with my debug files (debug files from the Sierra build - the behavior is the same with Sierra and High Sierra). Any help to solve or even to get started down the solution path would be greatly appreciated. Note that my laptop also boots Win7x64 and has no problems with battery and A/C power switching in Windows.

I have attempted to play with a few config items in the ACPI config and Kernel patch sections of my config.plist, but the behavior doesn't change. Things I have tried include
  • SSDT Drop OEM - no change with this enabled and disabled
  • SSDT Drop Tables - no change with and without selected dropped tables
  • Kernel patches Kernel CPU, Kernel LAPIC, AppleIntelCPUPM, Kernel PM - no change with and without these enabled/disabled

My laptop configuration is as follows:

  • Laptop: Thinkpad T61
  • Bootloader: CLOVER (Legacy) 4586
  • OSX Sierra 10.12.6
  • CPU: Penryn T9300
  • Video: NVidia NVS 140m (NVidia Web Driver)
  • Memory: 8GB DDR2
  • HD: SSD (Trim Enabled)

Thank you for any help.
 

Attachments

  • IMG_0443.JPG
    IMG_0443.JPG
    535.4 KB · Views: 132
  • Archive.zip
    943.9 KB · Views: 68
My Thinkpad T61 runs both Sierra and High Sierra almost perfectly. The only problem I have in both OSes is an occasional kernel panic when I switch from battery to A/C power. If I'm doing anything important, I'll shutdown on battery power, plug in A/C and reboot. I'd like to fix this problem if I can but don't know where to start. A screen shot of the kernel panic is attached along with my debug files (debug files from the Sierra build - the behavior is the same with Sierra and High Sierra). Any help to solve or even to get started down the solution path would be greatly appreciated. Note that my laptop also boots Win7x64 and has no problems with battery and A/C power switching in Windows.

I have attempted to play with a few config items in the ACPI config and Kernel patch sections of my config.plist, but the behavior doesn't change. Things I have tried include
  • SSDT Drop OEM - no change with this enabled and disabled
  • SSDT Drop Tables - no change with and without selected dropped tables
  • Kernel patches Kernel CPU, Kernel LAPIC, AppleIntelCPUPM, Kernel PM - no change with and without these enabled/disabled

My laptop configuration is as follows:

  • Laptop: Thinkpad T61
  • Bootloader: CLOVER (Legacy) 4586
  • OSX Sierra 10.12.6
  • CPU: Penryn T9300
  • Video: NVidia NVS 140m (NVidia Web Driver)
  • Memory: 8GB DDR2
  • HD: SSD (Trim Enabled)

Thank you for any help.

Try not dropping the CPU related SSDTs. (then turn off Generate/CStates PStates).
 
@RehabMan

Thank you! Your suggestion appears to have set me in the right direction. I have plugged/unplugged A/C power after making the changes below and have not seen the kernel panic. I stopped dropping SSDTs and Tables and I unset Generate C States and P States, but my CPU was stuck on the highest multiplier. I then disabled/unset the following and the CPU multiplier is changing (with 1 more multiplier state than I had previously):


ACPI (No longer enabled the following):
  • Patch APIC
  • Halt Enabler
  • C2, C4, C6
  • C3 Latency (no longer setting this)

Kernel Patches (No longer enabled the following):
  • Kernel CPU
  • Kernel LAPIC
  • AppleIntelCPUPM
  • KernelPM


CPU (no longer setting the following)
  • Frequency
  • Bus Speed
  • Latency
  • Type
  • C2 / C4 / C6

I have plugged/unplugged A/C power multiple times and can't reproduce the kernel panic. My new config.plist is attached.
 

Attachments

  • config.plist
    5.7 KB · Views: 166
Last edited:
UPDATE: After updating to CLOVER 4644 (Legacy), I am unable to reproduce the original issue first posted in this thread. Enabling both C-States and P-States in CLOVER ACPI config no longer results in a kernel panic when switching between A/C power and battery. I'm not going to revert to a previous CLOVER version to re-test, so at this time, I'm still not sure what fixed the problem. My current config.plist is attached.

Note that I am no longer setting the following config params which I was doing when I observed the kernel panic. It is possible that one of these CLOVER settings was the culprit:

ACPI (No longer enabling/setting the following):
  • Patch APIC
  • C3 Latency
Kernel Patches (No longer enabled the following):
  • Kernel CPU
  • Kernel LAPIC
  • AppleIntelCPUPM
  • KernelPM
CPU (no longer setting the following)
  • Latency
  • Type
 

Attachments

  • config 3.plist
    5.8 KB · Views: 129
UPDATE: After updating to CLOVER 4644 (Legacy), I am unable to reproduce the original issue first posted in this thread. Enabling both C-States and P-States in CLOVER ACPI config no longer results in a kernel panic when switching between A/C power and battery. I'm not going to revert to a previous CLOVER version to re-test, so at this time, I'm still not sure what fixed the problem. My current config.plist is attached.

Note that I am no longer setting the following config params which I was doing when I observed the kernel panic. It is possible that one of these CLOVER settings was the culprit:

ACPI (No longer enabling/setting the following):
  • Patch APIC
  • C3 Latency
Kernel Patches (No longer enabled the following):
  • Kernel CPU
  • Kernel LAPIC
  • AppleIntelCPUPM
  • KernelPM
CPU (no longer setting the following)
  • Latency
  • Type

No need for config.plist/ACPI/SSDT/Generate/PStates and Generate/CStates in your scenario.
Those options will simply generate duplicate _PSS/_CST that are already present in your native ACPI SSDTs (therefore the Clover generated ones get ignored).
 
No need for config.plist/ACPI/SSDT/Generate/PStates and Generate/CStates in your scenario.
Those options will simply generate duplicate _PSS/_CST that are already present in your native ACPI SSDTs (therefore the Clover generated ones get ignored).
The CPU multiplier states (reported by Hardware Monitor) are different depending on whether I enable P and C States in CLOVER config. Even if Hardware Monitor is incorrectly reporting these (which I do suspect at times), the fact that they are different suggests that config.plist/ACPI/SSDT/Generate/PStates and Generate/CStates is not ignored.
 
The CPU multiplier states (reported by Hardware Monitor) are different depending on whether I enable P and C States in CLOVER config. Even if Hardware Monitor is incorrectly reporting these (which I do suspect at times), the fact that they are different suggests that config.plist/ACPI/SSDT/Generate/PStates and Generate/CStates is not ignored.

You will find they are ignored if you attempt to disassemble your patchmatic output (iasl -da -dl *.aml).
You will see iasl calls out duplicate symbols, and since Clover SSDTs are injected after native SSDTs, and the fact that SSDTs are processed in order, means that SSDTs with duplicate symbols will simply be rejected by the ACPI platform runtime.

If you need further confirmation, attach PR files as per FAQ.
 
Status
Not open for further replies.
Back
Top