Karabiner-Elements: [12.9.0] Hang / panic at restart or shutdown - possibly due to kernel extension?

Been tracking a problem for a couple of months now, a hang at restart/shutdown on 2 different Macs of mine. Started with kbE 12.8 + macOS 10.15.2 but now I am on kbE 12.9 + 10.15.3 and still having this hang.

The symptom is that upon issuing the restart/shutdown command, all windows will close and the “spinner” will appear in the center of the screen, as if the OS is trying to close all threads, but something is hanging it. This will spin for approximately 3-5 minutes and eventually a kernel panic will occur and the machine will automatically reboot itself. It doesn’t happen 100% of the time, but I’d say pretty often (~75%). The longer I have used the computer without rebooting, the more likely it seems that it will hang. Not sure of a reliable way yet to reproduce this 100%.

Karabiner is the only 3rd party kext I have loaded:

$ kextstat | grep -v apple
Index Refs Address            Size       Wired      Name (Version) UUID <Linked Against>
  169    0 0xffffff7f83c4c000 0x5000     0x5000     org.pqrs.driver.Karabiner.VirtualHIDDevice.v061000 (6.10.0) 4D004D1A-ED2F-3780-AD53-A10F286EC759 <49 6 5 3 1>

Here’s the output from the most recent panic, if it helps. I note that org.pqrs.driver.Karabiner.VirtualHIDDevice.v061000 is listed as the only loaded kernel extension:

panic(cpu 2 caller 0xffffff7f8fd63aae): watchdog timeout: no checkins from watchdogd in 182 seconds (11 totalcheckins since monitoring last enabled), shutdown in progress
Backtrace (CPU 2), Frame : Return Address
0xffffff8110a7bc40 : 0xffffff800ed3bb2b 
0xffffff8110a7bc90 : 0xffffff800ee734d5 
0xffffff8110a7bcd0 : 0xffffff800ee64f4e 
0xffffff8110a7bd20 : 0xffffff800ece2a40 
0xffffff8110a7bd40 : 0xffffff800ed3b217 
0xffffff8110a7be40 : 0xffffff800ed3b5fb 
0xffffff8110a7be90 : 0xffffff800f4d2b25 
0xffffff8110a7bf00 : 0xffffff7f8fd63aae 
0xffffff8110a7bf10 : 0xffffff7f8fd63472 
0xffffff8110a7bf50 : 0xffffff7f8fd78e76 
0xffffff8110a7bfa0 : 0xffffff800ece213e 
      Kernel Extensions in backtrace:
         com.apple.driver.watchdog(1.0)[053A5D15-51D4-3E61-978B-EB435FA4BD0A]@0xffffff7f8fd62000->0xffffff7f8fd6afff
         com.apple.driver.AppleSMC(3.1.9)[8D698096-1F90-3679-8151-22A7665ED287]@0xffffff7f8fd6b000->0xffffff7f8fd89fff
            dependency: com.apple.iokit.IOACPIFamily(1.4)[3D78401B-5D2D-33BC-9E41-DD2164EA874D]@0xffffff7f8fd59000
            dependency: com.apple.driver.watchdog(1)[053A5D15-51D4-3E61-978B-EB435FA4BD0A]@0xffffff7f8fd62000
            dependency: com.apple.iokit.IOPCIFamily(2.9)[ADD485B5-3EF8-37C4-B3C5-F86326E497A4]@0xffffff7f8f72f000

BSD process name corresponding to current thread: kernel_task

Mac OS version:
19D76

Kernel version:
Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64
Kernel UUID: A8DDE75C-CD97-3C37-B35D-1070CC50D2CE
Kernel slide:     0x000000000ea00000
Kernel text base: 0xffffff800ec00000
__HIB  text base: 0xffffff800eb00000
System model name: MacBookAir7,2 (Mac-937CB26E2E02BB01)
System shutdown begun: YES
Panic diags file available: NO (0xe00002cd)

System uptime in nanoseconds: 83388824775475
last loaded kext at 83146092375810: >!AXsanScheme	3 (addr 0xffffff7f92671000, size 32768)
last unloaded kext at 66831708438248: >usb.!UHostCompositeDevice	1.2 (addr 0xffffff7f92663000, size 28672)
loaded kexts:
org.pqrs.driver.Karabiner.VirtualHIDDevice.v061000	6.10.0
@filesystems.smbfs	3.4.1
@fileutil	20.036.15
>AudioAUUC	1.70
>!APlatformEnabler	2.7.0d0
>AGPM	111.4.2
>X86PlatformShim	1.0.0
@filesystems.autofs	3.0
>!AUpstreamUserClient	3.6.8
>!AHDA	283.15
>!AGraphicsDevicePolicy	4.7.2
@AGDCPluginDisplayMetrics	4.7.2
>!AHV	1
|IOUserEthernet	1.0.1
|IO!BSerialManager	7.0.3f5
>pmtelemetry	1
>!A!IBDWGraphics	14.0.4
@Dont_Steal_Mac_OS_X	7.0.0
>!ABacklight	180.1
>!A!IBDWGraphicsFramebuffer	14.0.4
>!A!ISlowAdaptiveClocking	4.0.0
>!AMCCSControl	1.13
>!AThunderboltIP	3.1.3
>eficheck	1
>!ACameraInterface	7.6.0
>!ALPC	3.1
>!ASMCLMU	212
>!UCardReader	489.80.2
>!AVirtIO	1.0
@filesystems.hfs.kext	522.0.9
@!AFSCompression.!AFSCompressionTypeDataless	1.0.0d1
@BootCache	40
@!AFSCompression.!AFSCompressionTypeZlib	1.0.0
>!ATopCaseHIDEventDriver	3430.1
@filesystems.apfs	1412.81.1
>!AAHCIPort	341.0.2
>AirPort.BrcmNIC	1400.1.1
@private.KextAudit	1.0
>!ASmartBatteryManager	161.0.0
>!ARTC	2.0
>!AACPIButtons	6.1
>!AHPET	1.8
>!ASMBIOS	2.1
>!AACPIEC	6.1
>!AAPIC	1.7
$!AImage4	1
@nke.applicationfirewall	303
$TMSafetyNet	8
@!ASystemPolicy	2.0.0
|EndpointSecurity	1
>!AXsanScheme	3
>!UAudio	320.49
>usb.cdc	5.0.0
>usb.!UHostCompositeDevice	1.2
@plugin.IOAVBDiscoveryPlugin	800.17
@kext.triggers	1.0
>DspFuncLib	283.15
@kext.OSvKernDSPLib	529
>!AGraphicsControl	4.7.2
|IOAVB!F	800.17
>!ASSE	1.0
>!ABacklightExpert	1.1.0
|IONDRVSupport	569.4
@!AGPUWrangler	4.7.2
@!AGraphicsDeviceControl	4.7.2
|IOAccelerator!F2	438.3.1
|IOSlowAdaptiveClocking!F	1.0.0
>!ASMBus!C	1.0.18d1
>X86PlatformPlugin	1.0.0
>IOPlatformPlugin!F	6.0.0d8
>!AHDA!C	283.15
|IOGraphics!F	569.4
|IOHDA!F	283.15
@plugin.IOgPTPPlugin	810.1
|IOEthernetAVB!C	1.1.0
|Broadcom!BHost!CUSBTransport	7.0.3f5
|IO!BHost!CUSBTransport	7.0.3f5
|IO!BHost!CTransport	7.0.3f5
>usb.!UHub	1.2
>usb.networking	5.0.0
|IOAudio!F	300.2
@vecLib.kext	1.2.0
|IOSerial!F	11
|IOSurface	269.6
@filesystems.hfs.encodings.kext	1
>!AHS!BDriver	3430.1
>IO!BHIDDriver	7.0.3f5
|IO!B!F	7.0.3f5
|IO!BPacketLogger	7.0.3f5
>!AMultitouchDriver	3430.1
>!AInputDeviceSupport	3430.1
>!AHIDKeyboard	209
>!AHSSPIHIDDriver	59
|IOAHCIBlock!S	316.80.1
|IOAHCI!F	290.0.1
>!AThunderboltDPInAdapter	6.2.5
>!AThunderboltDPAdapter!F	6.2.5
>!AThunderboltPCIDownAdapter	2.5.4
>!AThunderboltNHI	5.8.6
|IOThunderbolt!F	7.6.0
|IO80211!F	1200.12.2b1
>mDNSOffloadUserClient	1.0.1b8
>corecapture	1.0.4
|IOSkywalk!F	1
>!AHSSPISupport	59
|IOUSB!F	900.4.2
>!A!ILpssSpi!C	3.0.60
>!A!ILpssDmac	3.0.60
>!A!ILpssGspi	3.0.60
>usb.!UXHCIPCI	1.2
>usb.!UXHCI	1.2
>!AEFINVRAM	2.1
>!AEFIRuntime	2.1
|IOSMBus!F	1.1
|IOHID!F	2.0.0
$quarantine	4
$sandbox	300.0
@kext.!AMatch	1.0.0d1
>DiskImages	493.0.0
>!AFDEKeyStore	28.30
>!AEffaceable!S	1.0
>!AKeyStore	2
>!UTDM	489.80.2
|IOSCSIBlockCommandsDevice	422.0.2
>!ACredentialManager	1.0
>KernelRelayHost	1
>!ASEPManager	1.0.1
>IOSlaveProcessor	1
|IOUSBMass!SDriver	157.40.7
|IOSCSIArchitectureModel!F	422.0.2
|IO!S!F	2.1
|IOUSBHost!F	1.2
>!UHostMergeProperties	1.2
>usb.!UCommon	1.0
>!ABusPower!C	1.0
|CoreAnalytics!F	1
>!AMobileFileIntegrity	1.0.5
@kext.CoreTrust	1
|IOReport!F	47
|IOTimeSync!F	810.1
|IONetworking!F	3.4
>!AACPIPlatform	6.1
>!ASMC	3.1.9
>watchdog	1
|IOPCI!F	2.9
|IOACPI!F	1.4
@kec.pthread	1
@kec.Libm	1
@kec.corecrypto	1.0

Anything else I can do to try to help track this down please let me know!

About this issue

Most upvoted comments

For others experiencing this issue, today I finally got confirmation from Apple Support that there is a known bug in macOS that has been causing kernel panics for 16" MacBook Pro users (and possibly others, not sure) when certain accessories are connected. They said a fix was coming, probably in the next macOS update.

For me, the panics only seem to happen while my Mac is asleep and connected to my Thunderbolt dock. I’ve been disconnecting it overnight and that seems to be avoiding the issue.

I tried uninstalling Karabiner for a few days, but nothing changed. I’m pretty sure Karabiner has nothing to do with the issue, at least for me.