OCJvanDijk / Brightness-Sync

Synchronize the brightness of your built-in display with your LG UltraFine display(s)
MIT License
152 stars 17 forks source link

Got a crash shortly after disconnecting my laptop.... #14

Closed rsaid99 closed 4 years ago

rsaid99 commented 4 years ago

I don't do this very often, so I'm not sure how often this issue occurs:

1) Was using laptop in open position attached to 27" Ultrafine. 2) Disconnected and used laptop for an hour. 3) Closed laptop and set down (still disconnected). 4) Several hours later I plugged it back in to the monitor and found that it had crashed in IOKit (which I believe this app uses):

panic(cpu 0 caller 0xffffff8018291b2c): Sleep transition timed out after 180 seconds while calling power state change callbacks. Suspected bundle: com.apple.driver.AppleIntelCFLGraphicsFramebuffer. Thread 0x1035d08. Backtracing specified thread Backtrace (CPU 0), Frame : Return Address 0xffffff922be53900 : 0xffffff8017c471e8 0xffffff922c52bbc0 : 0xffffff8017b433f1 0xffffff922c52bc30 : 0xffffff8017b41c2f 0xffffff922c52bc80 : 0xffffff8017b32800 0xffffff922c52bcc0 : 0xffffff801822d20c 0xffffff922c52bd00 : 0xffffff801822e6eb 0xffffff922c52bd30 : 0xffffff7f9b931d08 0xffffff922c52bdb0 : 0xffffff8018230048 0xffffff922c52be10 : 0xffffff7f9b9317a1 0xffffff922c52be30 : 0xffffff8018214e04 0xffffff922c52bea0 : 0xffffff8018214c0a 0xffffff922c52bec0 : 0xffffff8017b63545 0xffffff922c52bf40 : 0xffffff8017b63071 0xffffff922c52bfa0 : 0xffffff8017ac713e Kernel Extensions in backtrace: com.apple.driver.AppleIntelCFLGraphicsFramebuffer(14.0.5)[3A72441D-C2C5-3828-A5AB-B0EE077B7918]@0xffffff7f9b8c3000->0xffffff7f9baf5fff dependency: com.apple.iokit.IOPCIFamily(2.9)[1B1F3BBB-9212-3CF9-94F8-8FEF0D3ACEC4]@0xffffff7f98511000 dependency: com.apple.iokit.IOACPIFamily(1.4)[9D1FF279-C4A2-3344-902F-E0B22B508689]@0xffffff7f98508000 dependency: com.apple.iokit.IOAcceleratorFamily2(438.4.5)[33DA860E-90A6-3224-A944-93FA125B054E]@0xffffff7f9b7f5000 dependency: com.apple.iokit.IOReportFamily(47)[337B24B2-0261-3521-8D1B-23387FC1D657]@0xffffff7f98449000 dependency: com.apple.AppleGraphicsDeviceControl(5.1.16)[56FDE242-D4A6-3E8F-A81C-CE9BA61E3828]@0xffffff7f9b8b9000 dependency: com.apple.iokit.IOGraphicsFamily(575.1)[D47CA481-C5E5-3F03-9B04-6634DF5F3121]@0xffffff7f9b7a4000

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: 0x0000000017800000 Kernel text base: 0xffffff8017a00000 __HIB text base: 0xffffff8017900000 System model name: MacBookPro15,2 (Mac-827FB448E656EC26) System shutdown begun: NO

System uptime in nanoseconds: 1485012061024524 last loaded kext at 22838759459973: >usb.cdc.acm 5.0.0 (addr 0xffffff7f9bf25000, size 32768) loaded kexts: @filesystems.smbfs 3.4.2

!AGraphicsDevicePolicy 5.1.16 @fileutil 20.036.15 @AGDCPluginDisplayMetrics 5.1.16 !AHV 1 |IOUserEthernet 1.0.1 |IO!BSerialManager 7.0.4f6 AGPM 111.4.4 !APlatformEnabler 2.7.0d0 X86PlatformShim 1.0.0 pmtelemetry 1 !AUpstreamUserClient 3.6.8 AudioAUUC 1.70 AGDCBacklightControl 5.1.16 @Dont_Steal_Mac_OS_X 7.0.0 !A!IKBLGraphics 14.0.5 !ABacklight 180.3 ACPI_SMC_PlatformPlugin 1.0.0 !AThunderboltIP 3.1.4 BridgeAudioCommunication 6.70.3 !AGFXHDA 100.1.426 !AMCCSControl 1.11 !AFIVRDriver 4.1.0 !A!ISlowAdaptiveClocking 4.0.0 !ABridgeAudio!C 6.70.3 !ATopCaseHIDEventDriver 3430.1 !AHIDALSService 1 !A!ICFLGraphicsFramebuffer 14.0.5 !AAVEBridge 6.1 !A!IPCHPMC 2.0.1 @filesystems.autofs 3.0 @filesystems.apfs 1412.101.1 BCMWLANFirmware4355.Hashstore 1 BCMWLANFirmware4364.Hashstore 1 BCMWLANFirmware4377.Hashstore 1 !AFileSystemDriver 3.0.1 @filesystems.hfs.kext 522.100.5 @BootCache 40 @!AFSCompression.!AFSCompressionTypeDataless 1.0.0d1 @!AFSCompression.!AFSCompressionTypeZlib 1.0.0 !AVirtIO 1.0 !ABCMWLANBusInterfacePCIe 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.cdc.acm 5.0.0 usb.serial 6.0.0 !UMergeNub 900.4.2 !AGraphicsControl 5.1.16 |IOAVB!F 840.3 !ASSE 1.0 !ABacklightExpert 1.1.0 IOPlatformPluginLegacy 1.0.0 @!AGPUWrangler 5.1.16 !AHDA!C 283.15 |IOHDA!F 283.15 !UAudio 322.2 |IONDRVSupport 575.1 !ASMBus!C 1.0.18d1 X86PlatformPlugin 1.0.0 |IOSlowAdaptiveClocking!F 1.0.0 !AThunderboltEDMSink 4.2.3 !AHIDKeyboard 209 !AHS!BDriver 3430.1 IO!BHIDDriver 7.0.4f6 !AActuatorDriver 3440.1 !AMultitouchDriver 3440.1 !AInputDeviceSupport 3440.8 !ASMBusPCI 1.0.14d1 |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 @!AGraphicsDeviceControl 5.1.16 |IOAccelerator!F2 438.4.5 |IOGraphics!F 575.1 IOPlatformPlugin!F 6.0.0d8 @plugin.IOgPTPPlugin 840.3 |IOEthernetAVB!C 1.1.0 @kext.triggers 1.0 usb.IOUSBHostHIDDevice 1.2 usb.cdc.ecm 5.0.0 usb.cdc.ncm 5.0.0 usb.cdc 5.0.0 usb.networking 5.0.0 usb.!UHostCompositeDevice 1.2 !AThunderboltDPOutAdapter 6.2.6 !AThunderboltPCIUpAdapter 2.5.4 usb.!UHub 1.2 !AXsanScheme 3 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 |IOSurface 269.11 @filesystems.hfs.encodings.kext 1 |IOAudio!F 300.2 @vecLib.kext 1.2.0 !AThunderboltNHI 5.8.6 |IOThunderbolt!F 7.6.0 !ABCMWLANCore 1.0.0 mDNSOffloadUserClient 1.0.1b8 IOImageLoader 1.0.0 |IOSerial!F 11 |IO80211!FV2 1200.12.2b1 corecapture 1.0.4 |IOSkywalk!F 1 usb.!UHostPacketFilter 1.0 |IOUSB!F 900.4.2 !A!ILpssI2C 3.0.60 !A!ILpssGspi 3.0.60 usb.!UXHCIPCI 1.2 usb.!UXHCI 1.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

OCJvanDijk commented 4 years ago

Thank you for reporting, but to be honest this could be anything and it's very hard for me to do anything with it.

For what it's worth, similar kernel panics are quite widespread as far as I know, way beyond the small user base of this app. IOSomethingFamily is usually in the crash reports.

Also for what it's worth, this app doesn't really do much weird or intrusive things, it only calls these two functions of a private framework to read/write brightness, but the fact that it's private doesn't necessarily mean I'm hacking the system in any weird way. It's just like any other framework accept Apple doesn't want to release it to developers (yet) because it's subject to change or for other reasons.

I'm not saying it's impossible this app has anything to do with the crash, maybe it's a timing issue and the kernel just doesn't expect a certain function to be called at a certain time, but in the end if a user-space app is able to cause a kernel panic it's a bug in the kernel.

If the app does have anything to do with it I would want to find out of course so I can think about ways to fix it, but that's going to be hard. For now, see if you get this crash more often and if you do, try going without the app for a while and see if it changes.

If you keep having this problem with or without the app, I heard that disabling Power Nap often helps.

mustdobetter commented 4 years ago

Further to the @OCJvanDijk's comment above, I have experienced this issue constantly when using 2x UltraFine's and plugging/unplugging them, or just waking up the MBP from sleep. This is a known issue with these monitors in combination with the MBP, and I've experienced this both with and without the brightness sync app running - as initially I had the same thought, that it could be the app. @rsaid99, if you Google for this error you'll find multiple reports in relation to the UF screens and the MBP. The only way I've got round this is to prevent the MBP from sleeping when I have the screens connected - far from an ideal solution, but it works. For this I use the Amphetamine app from the App Store and create a trigger which will detect when I have 2 screens connected, and will allow the screens themselves to sleep, but will prevent the MBP from sleeping. This is the best "solution" I have come up with over 2 years of searching!

rsaid99 commented 4 years ago

Good info, thanks guys. Closing for now. This isn't a common workflow for me, and indeed there appears to be many citations of this issue outside the universe of this app. Will re-open if more specific pattern of crashing can be established.