Open luckman212 opened 4 years ago
I've also been encountering this problem, and I'd love to help if possible. The most recent panic I had showed org.pqrs.driver.Karabiner.VirtualHIDDevice.v061000
as the only kext, as well.
@rileytwo This may seem like an odd question but, by any chance do you have xq
installed on your system? It's part of python-yq
and used to parse XML into JSON. I had this installed on my system via Homebrew and through some trial and error I found that for some reason, running this binary was a way to guarantee that my system would hang upon restart. I haven't figured out why yet but this could be a clue.
I don't. How were you able to test whether xq
would cause your system to hang when shutting down?
It was just through a lot of trial and error. I have a few bash scripts that used it, and I noticed when I didn't run those scripts during my session, I was able to reboot cleanly. Hunting and pecking and about 100 reboots later, I narrowed it down to xq
. It's crazy because it's just a userspace tool, so not sure how it could be causing this. But I am quite sure about it. Maybe whatever edge case it's hitting is also present in something else on your system.
Huh, that's interesting--especially since it's only in the userspace. Would you mind sharing what you use the tools for/what they interact with? I'm wondering if anything I'm doing happens to share any similarities with what your scripts do.
At this point, I've accepted anything is possible - I can't for the life of me figure out what's causing these hangs when rebooting or shutting down!
Sure. The scripts are for keeping a handful of apps updated on my systems. Something like my own version of brew cask
. They basically check whatever API or XML feed that the app uses for auto-updating and compares the locally installed version, installing when needed. I have scripts for 20 different apps now, as well as a "wrapper" script that allows multiple selections and loops through them as a batch (ala brew cask upgrade
).
Here's a relevant snippet from one that used to use xq
for example, which was for Typora:
xml=$(curl -L -s -o- https://www.typora.io/download/dev_update.xml)
if [ -z "$xml" ]; then
echo "error fetching XML version feed from typora.io"
exit 1
fi
json=$(xq '.[] | .channel.item.enclosure?' <<<"$xml")
if [ -z "$json" ]; then
json=$(xq '.[] | .channel.item[0].enclosure?' <<<"$xml")
fi
if [ -z "$json" ]; then
echo "error extracting enclosure data from XML/json"
exit 1
fi
eval "$(jq -r '@sh "url=\(."@url") ver=\(."@sparkle:shortVersionString")"' <<<"$json")"
if [ -z "$url" ] || [ -z "$ver" ]; then
echo "error fetching version / url metadata from typora.io"
exit 1
fi
echo "latest version is ${ver}"
I have rewritten it to use xmlstarlet instead, which works fine and doesn't cause this strange hang.
Had the hang again today. So whatever is causing this, there must be some other process aside from xq
that triggers it.
I've been experiencing the issues above, still @luckman212. Any luck on your end?
After uninstalling Karabiner-Elements this morning, my macbook shuts down and restarts without any trouble.
Looking through system.log
and karabiner's observer log, the observer appears to be scanning devices while the computer is shutting down. Should KE be scanning devices during a shutdown or reboot?
I've tried messing with the KeepAlive
property in KE's agents and daemons plist files, but I can't seem to find a way to disable KE staying active while the system shuts down or reboots.
Any ideas, @tekezo? Let me know if you need any logs or anything else to help.
@rileytwo Nothing new on my end. Still getting the hangs from time to time. It seems that eventually the system watchdog daemon will time out and force a restart (sometimes 10 minutes+) so I usually opt for that rather than a hard reboot to avoid disk corruption.
I don't know where to go to help debug this, it's beyond my abilities - and with Apple deprecating kexts in 10.15.4 it seems that this whole thing will need some overhauling if kbE is to continue to function, so I'm waiting to see what's going to happen there.
Do we have any update on the kernel panic issue? I had to remove Karabiner because it crashed my machine every 5-10 minutes.
I am wondering, is this project abandoned or we should use something else not the issues here? This issue is open for more than 2 months without any reaction from the project.
I had same issue in my 16 inch MBP. Does anyone has solutions? I only need thirdparty keyboard Fn function mapping
panic(cpu 2 caller 0xffffff800f216487): "AppleIntelFramebuffer::setPowerState(0xffffff81be35b000 : 0xffffff7f927a8d88, 1 -> 0) timed out after 45950 ms"@/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-6153.101.6/iokit/Kernel/IOServicePM.cpp:5296 Backtrace (CPU 2), Frame : Return Address 0xffffff820e113b40 : 0xffffff800eb215cd 0xffffff820e113b90 : 0xffffff800ec5a3c5 0xffffff820e113bd0 : 0xffffff800ec4bf7e 0xffffff820e113c20 : 0xffffff800eac7a40 0xffffff820e113c40 : 0xffffff800eb20c97 0xffffff820e113d40 : 0xffffff800eb21087 0xffffff820e113d90 : 0xffffff800f2c2c7c 0xffffff820e113e00 : 0xffffff800f216487 0xffffff820e113e50 : 0xffffff800f215d69 0xffffff820e113e60 : 0xffffff800f22d2fe 0xffffff820e113ea0 : 0xffffff800f214b18 0xffffff820e113ec0 : 0xffffff800eb63545 0xffffff820e113f40 : 0xffffff800eb63071 0xffffff820e113fa0 : 0xffffff800eac713e
BSD process name corresponding to current thread: kernel_task Boot args: chunklist-security-epoch=0 -chunklist-no-rev2-dev
Mac OS version: 19E287
Kernel version: Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 Kernel UUID: AB0AA7EE-3D03-3C21-91AD-5719D79D7AF6 Kernel slide: 0x000000000e800000 Kernel text base: 0xffffff800ea00000 __HIB text base: 0xffffff800e900000 System model name: MacBookPro16,1 System shutdown begun: NO
System uptime in nanoseconds: 12744975851793 last loaded kext at 12271717156896: >usb.IOUSBHostHIDDevice 1.2 (addr 0xffffff7f927ff000, size 45056) last unloaded kext at 12085337858407: >!UAudio 322.2 (addr 0xffffff7f95e32000, size 434176) loaded kexts: org.pqrs.driver.Karabiner.VirtualHIDDevice.v061000 6.10.0
AudioAUUC 1.70 usb.!UHostBillboardDevice 1.0 @kext.AMDRadeonX6000 3.0.8 @kext.AMDRadeonServiceManager 3.0.8 !AGraphicsDevicePolicy 5.1.16 @fileutil 20.036.15 @AGDCPluginDisplayMetrics 5.1.16 !AHV 1 |IOUserEthernet 1.0.1 |IO!BSerialManager 7.0.4f6 pmtelemetry 1 !AUpstreamUserClient 3.6.8 AGPM 111.4.4 !APlatformEnabler 2.7.0d0 X86PlatformShim 1.0.0 @Dont_Steal_Mac_OS_X 7.0.0 !A!IKBLGraphics 14.0.5 AGDCBacklightControl 5.1.16 BridgeAudioCommunication 6.70.3 !AThunderboltIP 3.1.4 !A!ISlowAdaptiveClocking 4.0.0 !AMuxControl2 5.1.16 !AHIDALSService 1 !ATopCaseHIDEventDriver 3430.1 !ABridgeAudio!C 6.70.3 !AGFXHDA 100.1.426 !A!IPCHPMC 2.0.1 !A!ICFLGraphicsFramebuffer 14.0.5 !AAVEBridge 6.1 !AMCCSControl 1.11 @filesystems.autofs 3.0 BCMWLANFirmware4355.Hashstore 1 BCMWLANFirmware4364.Hashstore 1 BCMWLANFirmware4377.Hashstore 1 !ABCMWLANBusInterfacePCIe 1 @filesystems.hfs.kext 522.100.5 @BootCache 40 @!AFSCompression.!AFSCompressionTypeDataless 1.0.0d1 @!AFSCompression.!AFSCompressionTypeZlib 1.0.0 !AVirtIO 1.0 @filesystems.apfs 1412.101.1 @private.KextAudit 1.0 !ASmartBatteryManager 161.0.0 !AACPIButtons 6.1 !ASMBIOS 2.1 !AACPIEC 6.1 !AAPIC 1.7 $!AImage4 1 @nke.applicationfirewall 303 $TMSafetyNet 8 @!ASystemPolicy 2.0.0 |EndpointSecurity 1 usb.IOUSBHostHIDDevice 1.2 !UAudio 322.2 usb.!UHub 1.2 @kext.AMDRadeonX6100HWLibs 1.0 @kext.AMDRadeonX6000HWServices 3.0.8 |IOAVB!F 840.3 !ASSE 1.0 @!AGPUWrangler 5.1.16 @kext.AMDRadeonX6000Framebuffer 3.0.8 !ABacklightExpert 1.1.0 |IOSlowAdaptiveClocking!F 1.0.0 !AActuatorDriver 3440.1 X86PlatformPlugin 1.0.0 !AGraphicsControl 5.1.16 !AHS!BDriver 3430.1 IO!BHIDDriver 7.0.4f6 !AMultitouchDriver 3440.1 !AInputDeviceSupport 3440.8 !AHIDKeyboard 209 |IONDRVSupport 575.1 IOPlatformPlugin!F 6.0.0d8 |IO!BHost!CUARTTransport 7.0.4f6 |IO!BHost!CTransport 7.0.4f6 !A!ILpssUARTv1 3.0.60 !A!ILpssUARTCommon 3.0.60 !AOnboardSerial 1.0 @kext.AMDSupport 3.0.8 @!AGraphicsDeviceControl 5.1.16 |IOAccelerator!F2 438.4.5 !ASMBus!C 1.0.18d1 |IOGraphics!F 575.1 @plugin.IOgPTPPlugin 840.3 |IOEthernetAVB!C 1.1.0 @kext.triggers 1.0 usb.cdc.ncm 5.0.0 usb.cdc 5.0.0 usb.networking 5.0.0 usb.!UHostCompositeDevice 1.2 !ABCMWLANCore 1.0.0 mDNSOffloadUserClient 1.0.1b8 IOImageLoader 1.0.0 |IO80211!FV2 1200.12.2b1 corecapture 1.0.4 |IOSkywalk!F 1 |IOSurface 269.11 @filesystems.hfs.encodings.kext 1 |IOAudio!F 300.2 @vecLib.kext 1.2.0 |IOSerial!F 11 usb.!UVHCIBCE 1.2 usb.!UVHCI 1.2 usb.!UVHCICommonBCE 1.0 usb.!UVHCICommon 1.0 !AEffaceableNOR 1.0 |IOBufferCopy!C 1.1.0 |IOBufferCopyEngine!F 1 |IONVMe!F 2.1.0 !AThunderboltPCIDownAdapter 2.5.4 !AThunderboltDPInAdapter 6.2.6 !AThunderboltDPAdapter!F 6.2.6 !AHPM 3.4.4 !A!ILpssI2C!C 3.0.60 !A!ILpssDmac 3.0.60 !A!ILpssI2C 3.0.60 !AThunderboltNHI 5.8.6 |IOThunderbolt!F 7.6.0 usb.!UXHCIPCI 1.2 usb.!UXHCI 1.2 |IOUSB!F 900.4.2 !AEFINVRAM 2.1 !AEFIRuntime 2.1 !ASMCRTC 1.0 |IOSMBus!F 1.1 |IOHID!F 2.0.0 $quarantine 4 $sandbox 300.0 @kext.!AMatch 1.0.0d1 !AKeyStore 2 !UTDM 489.101.1 |IOSCSIBlockCommandsDevice 422.101.1 !ACredentialManager 1.0 KernelRelayHost 1 !ASEPManager 1.0.1 IOSlaveProcessor 1 !AFDEKeyStore 28.30 !AEffaceable!S 1.0 !AMobileFileIntegrity 1.0.5 @kext.CoreTrust 1 |CoreAnalytics!F 1 |IOTimeSync!F 840.3 |IONetworking!F 3.4 DiskImages 493.0.0 |IO!B!F 7.0.4f6 |IO!BPacketLogger 7.0.4f6 |IOUSBMass!SDriver 157.101.3 |IOSCSIArchitectureModel!F 422.101.1 |IO!S!F 2.1 |IOUSBHost!F 1.2 usb.!UCommon 1.0 !UHostMergeProperties 1.2 !ABusPower!C 1.0 |IOReport!F 47 !AACPIPlatform 6.1 !ASMC 3.1.9 watchdog 1 |IOPCI!F 2.9 |IOACPI!F 1.4 @kec.pthread 1 @kec.corecrypto 1.0 @kec.Libm 1
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.
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.
I think it also concerns 13" 2016+ MBP. It's happening with mine too. Apparently we have to w8 for an update.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please fix this. Karabiner right now is useless. It crashes the machine every 5 minutes.
Using KB with the driverkit dext seems to have fixed this issue for me
edit: the issue still persists, although, at this point, I'm less certain Karabiner is actually the issue. Honestly, whether my mac actually shuts down or hangs when attempting to seems to just happen at random, and pinning the issue to any one app has been difficult, to say the least.
Adding on to what @carlbennettnz and @fbrzozowski have said, I've had this issue with three MacBooks now: an early 2017 13" MacBook Pro (no T2 or Touch Bar), a late 2019 15" MacBook Pro, and a 2019 16" MacBook Pro. Hopefully the "update" will come soon?
I'm not quite sure if the information can be helpful, but I've faced a similar kernel panic once with MacBook Pro (15-inch, 2018):
last loaded kext at 4750921560329: >!AXsanScheme 3 (addr 0xffffff7fa2e27000, size 32768)
last unloaded kext at 848490181018: >usb.IOUSBHostHIDDevice 1.2 (addr 0xffffff7fa2d60000, size 45056)
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:
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:Anything else I can do to try to help track this down please let me know!