waydabber / BetterDisplay

Unlock your displays on your Mac! Flexible HiDPI scaling, XDR/HDR extra brightness, virtual screens, DDC control, extra dimming, PIP/streaming, EDID override and lots more!
https://betterdisplay.pro
19.14k stars 339 forks source link

BetterDisplay causes "Your computer restarts due to a problem" when my Mac Mini is sleeping #2915

Closed rokcso closed 5 months ago

rokcso commented 5 months ago

The version of BetterDisplay I am using is v2.3.1. The device I am using is an Apple M2 Mac mini, with the macOS version being Sonoma 14.4.1.

After my testing, I am certain that when BetterDisplay is running, once my Mac goes into sleep mode, my Mac will display the message "Your computer has restarted because of a problem", and this happens every time, it is inevitable.

The process of my testing is roughly that I reinstalled my macOS system, then installed BetterDisplay and some other software. When I shut down BetterDisplay and start any other software (including starting all other software at the same time), my Mac does not abnormally restart upon sleep. However, as long as I turn on BetterDisplay (including only turning on BetterDisplay and turning on BetterDisplay along with any other software), my Mac will abnormally restart when it goes into sleep mode.

If necessary, I can cooperate for another round of testing.

image

rokcso commented 5 months ago

Below is my device log information:

panic(cpu 1 caller 0xfffffe0014f8ece0): "AppleT8112DPTXPort(dptx-phy)::deactivateTimeoutOccurred(0x100000389): deactivate() incomplete 10 seconds after displayRelease()! (check DCPEXT)\n" @AppleT8112DPTXPort.cpp:574
Debugger message: panic
Memory ID: 0x6
OS release type: User
OS version: 23E224
Kernel version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:19:22 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8112
Fileset Kernelcache UUID: 0EF3501FC5C005DB77834F7930DFCA7E
Kernel UUID: 5371B5F2-2776-3A8C-A53E-1C1E188B935E
Boot session UUID: 78A1E393-BD19-47A4-A366-0CBD8A7C1288
iBoot version: iBoot-10151.101.3
secure boot?: YES
roots installed: 0
Paniclog version: 14
KernelCache slide: 0x000000000b96c000
KernelCache base:  0xfffffe0012970000
Kernel slide:      0x000000000b974000
Kernel text base:  0xfffffe0012978000
Kernel text exec slide: 0x000000000cee4000
Kernel text exec base:  0xfffffe0013ee8000
mach_absolute_time: 0x1b7d34c42e
Epoch Time:        sec       usec
  Boot    : 0x6628fe71 0x000d2148
  Sleep   : 0x00000000 0x00000000
  Wake    : 0x00000000 0x00000000
  Calendar: 0x662911a4 0x00027ed5

Zone info:
  Zone map: 0xfffffe1a35758000 - 0xfffffe3a35758000
  . VM    : 0xfffffe1a35758000 - 0xfffffe1f02424000
  . RO    : 0xfffffe1f02424000 - 0xfffffe209bdbc000
  . GEN0  : 0xfffffe209bdbc000 - 0xfffffe2568a88000
  . GEN1  : 0xfffffe2568a88000 - 0xfffffe2a35754000
  . GEN2  : 0xfffffe2a35754000 - 0xfffffe2f02420000
  . GEN3  : 0xfffffe2f02420000 - 0xfffffe33cf0ec000
  . DATA  : 0xfffffe33cf0ec000 - 0xfffffe3a35758000
  Metadata: 0xfffffe1a2748c000 - 0xfffffe1a2f48c000
  Bitmaps : 0xfffffe1a2f48c000 - 0xfffffe1a30a9c000
  Extra   : 0 - 0

CORE 0 recently retired instr at 0xfffffe001408faf0
CORE 1 recently retired instr at 0xfffffe001408e3bc
CORE 2 recently retired instr at 0xfffffe001408faf0
CORE 3 recently retired instr at 0xfffffe001408faf0
CORE 4 recently retired instr at 0xfffffe001408faf0
CORE 5 recently retired instr at 0xfffffe001408faf0
CORE 6 recently retired instr at 0xfffffe001408faf0
CORE 7 recently retired instr at 0xfffffe001408faf0
TPIDRx_ELy = {1: 0xfffffe2a36a297d8  0: 0x0000000000000001  0ro: 0x0000000000000000 }
CORE 0 PVH locks held: None
CORE 1 PVH locks held: None
CORE 2 PVH locks held: None
CORE 3 PVH locks held: None
CORE 4 PVH locks held: None
CORE 5 PVH locks held: None
CORE 6 PVH locks held: None
CORE 7 PVH locks held: None
CORE 0: PC=0xfffffe0013f78e48, LR=0xfffffe0013f78e48, FP=0xfffffe4e6c957ef0
CORE 1 is the one that panicked. Check the full backtrace for details.
CORE 2: PC=0xfffffe0013f78e48, LR=0xfffffe0013f78e48, FP=0xfffffe4e6c383ef0
CORE 3: PC=0xfffffe0013f78e48, LR=0xfffffe0013f78e48, FP=0xfffffe4e6c75bef0
CORE 4: PC=0xfffffe0013f78e48, LR=0xfffffe0013f78e48, FP=0xfffffe4e6c6bbef0
CORE 5: PC=0xfffffe0013f78e4c, LR=0xfffffe0013f78e48, FP=0xfffffe4e6c84fef0
CORE 6: PC=0xfffffe0013f78e48, LR=0xfffffe0013f78e48, FP=0xfffffe4e6cb13ef0
CORE 7: PC=0xfffffe0013f78e48, LR=0xfffffe0013f78e48, FP=0xfffffe4e6c08fef0
Compressor Info: 8% of compressed pages limit (OK) and 5% of segments limit (OK) with 0 swapfiles and OK swap space
Panicked task 0xfffffe33cefe39a8: 0 pages, 480 threads: pid 0: kernel_task
Panicked thread: 0xfffffe2a36a297d8, backtrace: 0xfffffe4e6c90f7a0, tid: 80497
          lr: 0xfffffe0013f3f1b8  fp: 0xfffffe4e6c90f830
          lr: 0xfffffe0014086a94  fp: 0xfffffe4e6c90f8a0
          lr: 0xfffffe0014084e20  fp: 0xfffffe4e6c90f960
          lr: 0xfffffe0013eef8cc  fp: 0xfffffe4e6c90f970
          lr: 0xfffffe0013f3eaac  fp: 0xfffffe4e6c90fd20
          lr: 0xfffffe0014740570  fp: 0xfffffe4e6c90fd40
          lr: 0xfffffe0014f8ece0  fp: 0xfffffe4e6c90fd90
          lr: 0xfffffe0014f679a0  fp: 0xfffffe4e6c90fdb0
          lr: 0xfffffe00146495a8  fp: 0xfffffe4e6c90fdf0
          lr: 0xfffffe0013f9e248  fp: 0xfffffe4e6c90fe30
          lr: 0xfffffe0013f9f27c  fp: 0xfffffe4e6c90ff20
          lr: 0xfffffe0013ef8be4  fp: 0x0000000000000000
      Kernel Extensions in backtrace:
         com.apple.driver.AppleDisplayCrossbar(1.0)[B1076271-6CA7-3690-9DAF-C2260BBC3B00]@0xfffffe0014f5d1e0->0xfffffe0014f8f68b
            dependency: com.apple.driver.AppleARMPlatform(1.0.2)[77007C6A-68DD-3EA2-A25E-B47ACC1DAFE2]@0xfffffe00148d0b00->0xfffffe00149240fb
            dependency: com.apple.driver.AppleTypeCPhy(1)[0AF34138-286B-3CA8-8809-03DEA7DC57B7]@0xfffffe00159e1e20->0xfffffe00159f558b
            dependency: com.apple.iokit.IOAVFamily(1.0.0)[2C001C0D-A9A2-35C0-8F80-67F42D2B5A8F]@0xfffffe001608f0b0->0xfffffe0016118f1f
            dependency: com.apple.iokit.IOAccessoryManager(1.0.0)[6115E9E4-5EDE-3783-AC11-42663B7CC8A2]@0xfffffe0016118f20->0xfffffe00162240ff
            dependency: com.apple.iokit.IODisplayPortFamily(1.0.0)[145956EE-4BD4-3F79-8CEF-7052B8ECEF01]@0xfffffe00162e48b0->0xfffffe001633a7f7
            dependency: com.apple.iokit.IOPortFamily(1.0)[8D098028-5FF6-3A15-85F0-047140663315]@0xfffffe001669e7a0->0xfffffe001669e823
            dependency: com.apple.iokit.IOThunderboltFamily(9.3.3)[A7065992-B1FF-37B2-84A0-46E8226759E1]@0xfffffe00167a1890->0xfffffe00168ec4f3

last started kext at 44159472879: com.apple.macos.driver.AppleUSBEthernetHost   8.1.1 (addr 0xfffffe0012f8b510, size 4660)
loaded kexts:
com.apple.macos.driver.AppleUSBEthernetHost 8.1.1
com.apple.driver.AppleTopCaseHIDEventDriver 7440.8
com.apple.filesystems.autofs    3.0
com.apple.driver.AppleBiometricServices 1
com.apple.driver.CoreKDL    1
com.apple.driver.BCMWLANFirmware4388.Hashstore  1
com.apple.driver.BCMWLANFirmware4387.Hashstore  1
com.apple.driver.BCMWLANFirmware4378.Hashstore  1
com.apple.iokit.AppleBCM5701Ethernet    11.0.0
com.apple.driver.DiskImages.ReadWriteDiskImage  493.0.0
com.apple.driver.DiskImages.UDIFDiskImage   493.0.0
com.apple.driver.DiskImages.RAMBackingStore 493.0.0
com.apple.driver.DiskImages.FileBackingStore    493.0.0
com.apple.driver.SEPHibernation 1
com.apple.driver.AppleSmartBatteryManager   161.0.0
com.apple.driver.AppleThunderboltIP 4.0.3
com.apple.driver.AppleUSBDeviceNCM  5.0.0
com.apple.driver.AppleCS42L84Audio  740.41
com.apple.driver.AppleSN012776Amp   740.41
com.apple.driver.AppleSmartIO2  1
com.apple.driver.ApplePMP   1
com.apple.driver.AppleTypeCRetimer  1.0.0
com.apple.AppleEmbeddedSimpleSPINORFlasher  1
com.apple.driver.AppleAOPVoiceTrigger   340.42
com.apple.driver.AppleT8020SOCTuner 1
com.apple.driver.AppleT8112CLPC 1
com.apple.driver.AppleT8112PMGR 1
com.apple.driver.AppleEventLogHandler   1
com.apple.driver.AppleS5L8960XNCO   1
com.apple.driver.ApplePMPFirmware   1
com.apple.driver.AppleSamsungSerial 1.0.0d1
com.apple.driver.AppleSerialShim    1
com.apple.driver.AppleFileSystemDriver  3.0.1
com.apple.nke.l2tp  1.9
com.apple.filesystems.tmpfs 1
com.apple.filesystems.nfs   1
com.apple.filesystems.lifs  1
com.apple.filesystems.apfs  2236.101.1
com.apple.IOTextEncryptionFamily    1.0.0
com.apple.filesystems.hfs.kext  650.0.2
com.apple.security.BootPolicy   1
com.apple.BootCache 40
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
com.apple.driver.AppleSPIMC 1
com.apple.driver.AppleS5L8920XPWM   1.0.0d1
com.apple.driver.AppleS8000AES  1
com.apple.driver.AudioDMAController-T8112   340.58
com.apple.driver.usb.AppleSynopsysUSB40XHCI 1
com.apple.driver.AppleAVD   740
com.apple.driver.AppleMobileDispH14G-DCP    140.0
com.apple.driver.AppleInterruptControllerV2 1.0.0d1
com.apple.driver.AppleS8000DWI  1.0.0d1
com.apple.AGXG14G   280.3.9
com.apple.driver.AppleAVE2  760.23.1
com.apple.driver.AppleJPEGDriver    6.6.2
com.apple.driver.AppleProResHW  350.47.0
com.apple.driver.AppleBluetoothModule   1
com.apple.driver.AppleBCMWLANBusInterfacePCIe   1
com.apple.driver.AppleT8110DART 1
com.apple.driver.AppleS5L8940XI2C   1.0.0d2
com.apple.driver.AppleT8110 1
com.apple.driver.AppleM68Buttons    1.0.0d1
com.apple.iokit.IOUserEthernet  1.0.1
com.apple.driver.usb.AppleUSBUserHCI    1
com.apple.iokit.IOKitRegistryCompatibility  1
com.apple.iokit.EndpointSecurity    1
com.apple.driver.AppleUIO   1
com.apple.driver.AppleDiskImages2   276.100.16
com.apple.AppleSystemPolicy 2.0.0
com.apple.nke.applicationfirewall   404
com.apple.kec.InvalidateHmac    1
com.apple.kec.AppleEncryptedArchive 1
com.apple.driver.usb.cdc.ncm    5.0.0
com.apple.driver.usb.cdc.ecm    5.0.0
com.apple.driver.usb.cdc.acm    5.0.0
com.apple.driver.usb.serial 6.0.0
com.apple.driver.usb.cdc    5.0.0
com.apple.driver.AppleUSBAudio  640.12
com.apple.iokit.IOAudioFamily   540.3
com.apple.vecLib.kext   1.2.0
com.apple.driver.AppleActuatorDriver    7440.9
com.apple.driver.AppleMultitouchDriver  7440.9
com.apple.driver.AppleInputDeviceSupport    7440.1
com.apple.driver.AppleHSBluetoothDriver 7440.8
com.apple.driver.IOBluetoothHIDDriver   9.0.0
com.apple.driver.driverkit.serial   6.0.0
com.apple.driver.AppleMesaSEPDriver 100.99
com.apple.iokit.IOBiometricFamily   1
com.apple.driver.usb.AppleEmbeddedUSBXHCIPCI    1
com.apple.driver.usb.AppleUSBXHCIPCI    1.2
com.apple.driver.AppleConvergedIPCOLYBTControl  1
com.apple.driver.AppleConvergedPCI  1
com.apple.driver.AppleBluetoothDebug    1
com.apple.driver.DiskImages.KernelBacked    493.0.0
com.apple.driver.AppleSEPHDCPManager    1.0.1
com.apple.driver.AppleTrustedAccessory  1
com.apple.iokit.AppleSEPGenericTransfer 1
com.apple.driver.AppleBTM   1.0.1
com.apple.driver.usb.networking 5.0.0
com.apple.driver.AppleThunderboltUSBDownAdapter 1.0.4
com.apple.driver.AppleXsanScheme    3
com.apple.driver.AppleThunderboltPCIDownAdapter 4.1.1
com.apple.driver.AppleThunderboltDPInAdapter    8.5.1
com.apple.driver.AppleThunderboltDPAdapterFamily    8.5.1
com.apple.driver.AppleDCPDPTXProxy  1.0.0
com.apple.driver.DCPDPFamilyProxy   1
com.apple.driver.AppleCSEmbeddedAudio   740.41
com.apple.driver.AppleDiagnosticDataAccessReadOnly  1.0.0
com.apple.driver.AppleEmbeddedAudio 740.41
com.apple.iokit.AppleARMIISAudio    340.16
com.apple.driver.IISAudioIsolatedStreamECProxy  340.16
com.apple.driver.ExclavesAudioKext  1
com.apple.driver.AppleAOPAudio  340.4
com.apple.driver.ApplePassthroughPPM    3.0
com.apple.driver.ApplePMGR  1
com.apple.iokit.IONVMeFamily    2.1.0
com.apple.driver.AppleNANDConfigAccess  1.0.0
com.apple.driver.AppleSART  1
com.apple.driver.AppleStockholmControl  1.0.0
com.apple.driver.AppleHPM   3.4.4
com.apple.nke.ppp   1.9
com.apple.driver.AppleBSDKextStarter    3
com.apple.kext.triggers 1.0
com.apple.driver.IOHIDPowerSource   1
com.apple.driver.AppleCallbackPowerSource   1
com.apple.filesystems.hfs.encodings.kext    1
com.apple.driver.AppleSyntheticGameController   11.4.11
com.apple.driver.AppleSPU   1
com.apple.driver.AppleUSBXDCIARM    1.0
com.apple.driver.AppleUSBXDCI   1.0
com.apple.iokit.IOUSBDeviceFamily   2.0.0
com.apple.driver.usb.AppleSynopsysUSBXHCI   1
com.apple.driver.usb.AppleUSBXHCI   1.2
com.apple.driver.AppleEmbeddedUSBHost   1
com.apple.driver.usb.AppleUSBHub    1.2
com.apple.driver.usb.AppleUSBHostCompositeDevice    1.2
com.apple.driver.AppleT8112TypeCPhy 1
com.apple.driver.AppleT8103TypeCPhy 1
com.apple.driver.AppleSPMIPMU   1.0.1
com.apple.driver.AppleDialogPMU 1.0.1
com.apple.driver.AppleSPMI  1.0.1
com.apple.iokit.IOMobileGraphicsFamily-DCP  343.0.0
com.apple.iokit.IOMobileGraphicsFamily  343.0.0
com.apple.driver.AppleM2ScalerCSCDriver 265.0.0
com.apple.driver.DCPAVFamilyProxy   1
com.apple.driver.AppleDCP   1
com.apple.driver.AppleFirmwareKit   1
com.apple.AGXFirmwareKextG14GRTBuddy    1
com.apple.AGXFirmwareKextRTBuddy64  280.3.9
com.apple.driver.AppleDisplayCrossbar   1.0.0
com.apple.iokit.IODisplayPortFamily 1.0.0
com.apple.driver.AppleTypeCPhy  1
com.apple.driver.AppleH11ANEInterface   7.400.0
com.apple.driver.AppleARMWatchdogTimer  1
com.apple.iokit.IOGPUFamily 93.40.3
com.apple.driver.AppleMCA2-T8112    840.3
com.apple.driver.AppleEmbeddedAudioLibs 340.8
com.apple.driver.AppleFirmwareUpdateKext    1
com.apple.driver.AppleA7IOP-ASCWrap-v4  1.0.2
com.apple.driver.AppleA7IOP-MXWrap-v1   1.0.2
com.apple.driver.AppleThunderboltNHI    7.2.81
com.apple.driver.AppleT8103PCIeC    1
com.apple.iokit.IOThunderboltFamily 9.3.3
com.apple.iokit.IOPortFamily    1.0
com.apple.driver.ApplePIODMA    1
com.apple.driver.AppleMultiFunctionManager  1
com.apple.driver.AppleT8112PCIe 1
com.apple.driver.AppleBluetoothDebugService 1
com.apple.driver.AppleBCMWLANCore   1.0.0
com.apple.iokit.IO80211Family   1200.13.0
com.apple.driver.IOImageLoader  1.0.0
com.apple.driver.AppleOLYHAL    1
com.apple.driver.corecapture    1.0.4
com.apple.driver.AppleEmbeddedPCIE  1
com.apple.iokit.IOAVBFamily 1220.1
com.apple.plugin.IOgPTPPlugin   1240.15
com.apple.driver.AppleGPIOICController  1.0.2
com.apple.driver.AppleFireStormErrorHandler 1
com.apple.driver.AppleMobileApNonce 1
com.apple.driver.usb.AppleUSBHostPacketFilter   1.0
com.apple.iokit.IOTimeSyncFamily    1240.15
com.apple.driver.DiskImages 493.0.0
com.apple.iokit.IOGraphicsFamily    598
com.apple.iokit.IOBluetoothFamily   9.0.0
com.apple.driver.AppleSSE   1.0
com.apple.driver.AppleSEPKeyStore   2
com.apple.driver.AppleUSBTDM    556
com.apple.iokit.IOUSBMassStorageDriver  245
com.apple.iokit.IOPCIFamily 2.9
com.apple.iokit.IOUSBHostFamily 1.2
com.apple.driver.AppleUSBHostMergeProperties    1.2
com.apple.driver.usb.AppleUSBCommon 1.0
com.apple.driver.AppleSMC   3.1.9
com.apple.driver.RTBuddy    1.0.0
com.apple.driver.AppleEmbeddedTempSensor    1.0.0
com.apple.driver.AppleARMPMU    1.0
com.apple.iokit.IOAccessoryManager  1.0.0
com.apple.driver.AppleOnboardSerial 1.0
com.apple.iokit.IOSerialFamily  11
com.apple.iokit.IOSCSIBlockCommandsDevice   495
com.apple.iokit.IOSCSIArchitectureModelFamily   495
com.apple.driver.AppleRSMChannel    1
com.apple.iokit.IORSMFamily 1
com.apple.driver.AppleLockdownMode  1
com.apple.driver.AppleIPAppender    1.0
com.apple.iokit.IOSkywalkFamily 1.0
com.apple.driver.mDNSOffloadUserClient  1.0.1b8
com.apple.iokit.IONetworkingFamily  3.4
com.apple.driver.AppleFDEKeyStore   28.30
com.apple.driver.AppleEffaceableStorage 1.0
com.apple.driver.AppleCredentialManager 1.0
com.apple.driver.AppleSEPManager    1.0.1
com.apple.driver.IODARTFamily   1
com.apple.driver.AppleA7IOP 1.0.2
com.apple.driver.IOSlaveProcessor   1
com.apple.driver.AppleBiometricSensor   2
com.apple.iokit.IOHIDFamily 2.0.0
com.apple.AUC   1.0
com.apple.iokit.IOSurface   352.41.7
com.apple.iokit.IOAVFamily  1.0.0
com.apple.iokit.IOHDCPFamily    1.0.0
com.apple.iokit.IOCECFamily 1
com.apple.iokit.IOAudio2Family  1.0
com.apple.driver.AppleIISController 340.1
com.apple.driver.AppleAudioClockLibs    340.8
com.apple.driver.FairPlayIOKit  71.10.0
com.apple.driver.AppleARMPlatform   1.0.2
com.apple.iokit.IOSlowAdaptiveClockingFamily    1.0.0
com.apple.iokit.IOReportFamily  47
com.apple.security.quarantine   4
com.apple.security.sandbox  300.0
com.apple.iokit.IOStorageFamily 2.1
com.apple.kext.AppleMatch   1.0.0d1
com.apple.driver.AppleMobileFileIntegrity   1.0.5
com.apple.iokit.CoreAnalyticsFamily 1
com.apple.security.AppleImage4  6.3.0
com.apple.kext.CoreTrust    1
com.apple.iokit.IOCryptoAcceleratorFamily   1.0.1
com.apple.kec.pthread   1
com.apple.kec.Libm  1
com.apple.kec.Compression   1.0
com.apple.kec.corecrypto    14.0

** Stackshot Succeeded ** Bytes Traced 504093 (Uncompressed 1255280) **
rokcso commented 5 months ago

During my testing, I observed that when I turned on BetterDisplay and actively clicked to enter hibernation mode, my Mac seemed to be stuck. The device did not immediately enter hibernation, the screen did not immediately go off, and the mouse couldn't move. It most likely got stuck. After a few seconds, the screen went off, and the sound of the device restarting followed. The fan would suddenly run at high speed, and then I couldn't activate the Mac immediately to turn off hibernation mode. Because the device is restarting.

But when I didn't turn on BetterDisplay, when I took the initiative to enter hibernation mode, my Mac immediately responded to my action, the screen immediately went out, and then randomly started to wake up my Mac. It also responded immediately, indicating that it was just hibernation, not shutting down or restarting.

waydabber commented 5 months ago

Hi there - unfortunately DCP related issues cannot be effectively debugged as these are related to the generally problematic part of the Apple Silicon chip. More info: https://github.com/waydabber/BetterDisplay/discussions/2622

I assume (although it's not clear from the description) that you might be using virtual screen mirroring (make sure you actually need this - there are better ways to achieve flexible HiDPI resolutions). The second description looks similar to this known issue https://github.com/waydabber/BetterDisplay/issues/143 which plagues Apple Silicon Macs from early on (also a generic macOS bug when virtual screens of any kind - not only BetterDisplay, but Sidecar etc - are being mirrored to an external display).

Here is how to set up HiDPI scaling without virtual screen mirroring: https://github.com/waydabber/BetterDisplay/wiki/Fully-scalable-HiDPI-desktop

As an alternative you might want to try streaming the virtual screen instead of mirroring it.

waydabber commented 5 months ago

(I'll close this issue as duplicate of #143 but let me know if this is not right! Thank you!)