Crash on resume from suspend

Hi, I have been using Asahi for about 3 weeks now as a daily driver and it has been a really solid experience over all. Today I put my laptop in my backpack when I left my office and when I opened it on getting home the lock screen seemed frozen. After a few seconds I could enter my password and saw that my status bar was showing battery at 0% which was a big surprise since I had left office at 80% and the system seemed frozen again. Eventually it rebooted and to my relief battery was fine.

I went fishing in journalctl and found this which looks relevant,

Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: SMC crashed! Your system will reboot in a few seconds...
Jan 12 20:53:11 asahi kernel: PM: resume devices took 16.532 seconds
Jan 12 20:53:11 asahi kernel: ------------[ cut here ]------------
Jan 12 20:53:11 asahi kernel: Component: resume devices, time: 16532
Jan 12 20:53:11 asahi kernel: WARNING: CPU: 0 PID: 20279 at kernel/power/suspend_test.c:53 suspend_test_finish+0x94/0xb0
Jan 12 20:53:11 asahi kernel: Modules linked in: r8153_ecm cdc_ether usbnet r8152 mii xhci_plat_hcd rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet uinput nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 bnep des_generic libdes ip_set md4 nf_tables nfnetlink brcmfmac_wcc hci_bcm4377 brcmfmac bluetooth brcmutil cfg80211 rfkill snd_soc_macaudio macsmc_hid snd_soc_cs42l83_i2c snd_soc_cs42l42 snd_soc_apple_mca snd_soc_tas2770 snd_soc_core apple_isp ofpart videobuf2_dma_sg videobuf2_memops spi_nor videobuf2_v4l2 mtd apple_z2 videobuf2_common snd_compress panel_summit ac97_bus videodev snd_pcm_dmaengine mc apple_soc_cpufreq leds_pwm joydev pkcs8_key_parser fuse loop zram hid_apple spi_hid_apple_of nvmem_spmi_mfd tps6598x spi_hid_apple rtc_macsmc gpio_macsmc macsmc_power macsmc_reboot simple_mfd_spmi crct10dif_ce polyval_ce polyval_generic ghash_ce dwc3 appledrm phy_apple_atc udc_core typec sha3_ce sha512_ce
Jan 12 20:53:11 asahi kernel:  ulpi apple_dcp sha512_arm64 macsmc_rtkit macsmc asahi snd_pcm snd_timer apple_wdt pinctrl_apple_gpio clk_apple_nco pwm_apple snd spi_apple spmi_apple_controller apple_admac nvmem_apple_efuses soundcore i2c_apple adpdrm mux_core apple_dart drm_dma_helper sunrpc vfat fat nvme_apple apple_sart nvme_core nvme_common scsi_dh_rdac scsi_dh_emc scsi_dh_alua dm_multipath
Jan 12 20:53:11 asahi kernel: CPU: 0 PID: 20279 Comm: systemd-sleep Tainted: G S                 6.6.3-411.asahi.fc39.aarch64+16k #1
Jan 12 20:53:11 asahi kernel: Hardware name: Apple MacBook Pro (13-inch, M1, 2020) (DT)
Jan 12 20:53:11 asahi kernel: pstate: 61400009 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
Jan 12 20:53:11 asahi kernel: pc : suspend_test_finish+0x94/0xb0
Jan 12 20:53:11 asahi kernel: lr : suspend_test_finish+0x94/0xb0
Jan 12 20:53:11 asahi kernel: sp : ffff8000903eba10
Jan 12 20:53:11 asahi kernel: x29: ffff8000903eba10 x28: ffff0b5993764400 x27: 0000000000000000
Jan 12 20:53:11 asahi kernel: x26: 0000000000000000 x25: 0000000000000000 x24: ffff0b5c05031be0
Jan 12 20:53:11 asahi kernel: x23: ffff8000903ebb88 x22: ffffc75e5344c380 x21: ffffc75e538bf2d8
Jan 12 20:53:11 asahi kernel: x20: ffffc75e520b0898 x19: 0000000000004094 x18: ffffffffffffffff
Jan 12 20:53:11 asahi kernel: x17: 0000000000000000 x16: ffffc75e515ad3c8 x15: ffff8000903eb5a0
Jan 12 20:53:11 asahi kernel: x14: 0000000000000000 x13: ffffc75e538e2a11 x12: 2d2d2d2d5d206572
Jan 12 20:53:11 asahi kernel: x11: 656820747563205b x10: 000000000000000a x9 : ffffc75e508f35fc
Jan 12 20:53:11 asahi kernel: x8 : 000000000000000a x7 : 0000000000000005 x6 : 000000000000000d
Jan 12 20:53:11 asahi kernel: x5 : ffff0b5d5db8f988 x4 : ffffc75e52c039c0 x3 : ffff43ff0af8c000
Jan 12 20:53:11 asahi kernel: x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0b5993764400
Jan 12 20:53:11 asahi kernel: Call trace:
Jan 12 20:53:11 asahi kernel:  suspend_test_finish+0x94/0xb0
Jan 12 20:53:11 asahi kernel:  suspend_devices_and_enter+0x1c4/0x320
Jan 12 20:53:11 asahi kernel:  enter_state+0x248/0x5f0
Jan 12 20:53:11 asahi kernel:  pm_suspend+0x48/0xf8
Jan 12 20:53:11 asahi kernel:  state_store+0x40/0x88
Jan 12 20:53:11 asahi kernel:  kobj_attr_store+0x18/0x30
Jan 12 20:53:11 asahi kernel:  sysfs_kf_write+0x4c/0x68
Jan 12 20:53:11 asahi kernel:  kernfs_fop_write_iter+0x13c/0x1d8
Jan 12 20:53:11 asahi kernel:  vfs_write+0x1c8/0x318
Jan 12 20:53:11 asahi kernel:  ksys_write+0x7c/0x120
Jan 12 20:53:11 asahi kernel:  __arm64_sys_write+0x24/0x38
Jan 12 20:53:11 asahi kernel:  invoke_syscall+0x78/0x100
Jan 12 20:53:11 asahi kernel:  el0_svc_common.constprop.0+0x48/0xf0
Jan 12 20:53:11 asahi kernel:  do_el0_svc+0x24/0x38
Jan 12 20:53:11 asahi kernel:  el0_svc+0x3c/0x110
Jan 12 20:53:11 asahi kernel:  el0t_64_sync_handler+0x120/0x130
Jan 12 20:53:11 asahi kernel:  el0t_64_sync+0x194/0x198
Jan 12 20:53:11 asahi kernel: ---[ end trace 0000000000000000 ]---

I have no idea how to diagnose this myself so I am asking here.

As that says, SMC crashed… unfortunately, unless you can reliably reproduce this somehow, there’s very little we can do with just that information. Please do let us know if you see it happen again or figure out what sequence of events causes it.

SMC is in charge of battery/fan management, which is why all that would stop working when it crashes (and why the machine reboots shortly thereafter, since it is obviously unsafe to run in such a state for long).

Is there anything interesting before the SMC crash line? It sounds like it crashed on resume, which could point to an SMC request hitting hardware that was not powered up yet, but we’re not supposed to even be powering down anything SMC might use…

It didn’t occur again when I resumed after suspend this morning, my only guess is that there was some weird interaction with the Dell dock I use to charge it at office. But I have been using that dock for a week and this is the first time that happened so it is not easily reproducible. I will report if it happens again.

My ability to judge what is important is limited but I see these,

Jan 12 20:53:11 asahi kernel: phy-apple-atc 503000000.phy: pipehandler lock not acked, this type-c port is probably dead until the next reboot.
Jan 12 20:53:11 asahi kernel: xhci-hcd xhci-hcd.0.auto: xHC error in resume, USBSTS 0x401, Reinit
Jan 12 20:53:11 asahi kernel: usb usb1: root hub lost power or was reset
Jan 12 20:53:11 asahi kernel: usb usb2: root hub lost power or was reset
Jan 12 20:53:11 asahi kernel: watchdog: Watchdog detected hard LOCKUP on cpu 0
Jan 12 20:53:11 asahi kernel: Modules linked in: r8153_ecm cdc_ether usbnet r8152 mii xhci_plat_hcd rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet uinput nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 bnep des_generic libdes ip_set md4 nf_tables nfnetlink brcmfmac_wcc hci_bcm4377 brcmfmac bluetooth brcmutil cfg80211 rfkill snd_soc_macaudio macsmc_hid snd_soc_cs42l83_i2c snd_soc_cs42l42 snd_soc_apple_mca snd_soc_tas2770 snd_soc_core apple_isp ofpart videobuf2_dma_sg videobuf2_memops spi_nor videobuf2_v4l2 mtd apple_z2 videobuf2_common snd_compress panel_summit ac97_bus videodev snd_pcm_dmaengine mc apple_soc_cpufreq leds_pwm joydev pkcs8_key_parser fuse loop zram hid_apple spi_hid_apple_of nvmem_spmi_mfd tps6598x spi_hid_apple rtc_macsmc gpio_macsmc macsmc_power macsmc_reboot simple_mfd_spmi crct10dif_ce polyval_ce polyval_generic ghash_ce dwc3 appledrm phy_apple_atc udc_core typec sha3_ce sha512_ce
Jan 12 20:53:11 asahi kernel:  ulpi apple_dcp sha512_arm64 macsmc_rtkit macsmc asahi snd_pcm snd_timer apple_wdt pinctrl_apple_gpio clk_apple_nco pwm_apple snd spi_apple spmi_apple_controller apple_admac nvmem_apple_efuses soundcore i2c_apple adpdrm mux_core apple_dart drm_dma_helper sunrpc vfat fat nvme_apple apple_sart nvme_core nvme_common scsi_dh_rdac scsi_dh_emc scsi_dh_alua dm_multipath
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: co-processor has crashed
Jan 12 20:53:11 asahi kernel: xhci-hcd xhci-hcd.0.auto: PM: dpm_run_callback(): platform_pm_resume+0x0/0x78 returns -110
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Message (id=1): systask heartbeat time-out after 500 ms
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Version: RTKit: RTKit-2413.60.9.release - Client: AppleSMCFirmware-4257.61.1.j293.REL
Jan 12 20:53:11 asahi kernel: xhci-hcd xhci-hcd.0.auto: PM: failed to resume async: error -110
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Crash time: 1003151847843
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Unknown crashlog section: 43637374
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Unknown crashlog section: 43617343
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Mailbox history (type = 0, index = 0)
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #000@dc7f4c7c: 0000000000000020 0000ea6000044000
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #001@dc7f5a71: 0000000000000020 4348304300015010

Then there a lot of lines similar to the last two and afterwards,

Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Unknown crashlog section: 4372746b
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Unknown crashlog section: 43636470
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Unknown crashlog section: 43736d62
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Unknown crashlog section: 43736d62
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Unknown crashlog section: 43736d62
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Unknown crashlog section: 43736d62
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Unknown crashlog section: 43736d62
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Message (id=0): 
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Message (id=0): CrashlogData_t ptr = 0x00074a38
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Message (id=0): 
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Unknown crashlog section: 43737461
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Mailbox history (type = 4, index = 1)
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #000@dd1996f8: 0000000000000021 040b000000000000
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #001@8b26fb31: 0000000000000021 0401000000000000
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #002@8b26ff64: 0000000000000021 0403000000000007
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #003@8b2700b4: 0000000000000021 0205000000000000
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #004@8b27025d: 0000000000000021 0305000000000001
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #005@8b2706ec: 0000000000000021 0206000000000000
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #006@8b2709bd: 0000000000000021 0306000000000001
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #007@8c954174: 0000000000000021 040d000280800f0f
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Mailbox history (type = 2, index = 2)
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #000@dcf2d8b5: 0000000000000020 6750306100040011
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #001@dcf2ef88: 0000000000000020 0000000000000000
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #002@8b257c05: 0000000000000020 6750306100040011
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #003@8b25f634: 0000000000000020 0000000000000000
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #004@8b780045: 0000000000000020 4443414c00400010
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #005@8b781088: 0000000000000020 00000000004000d8
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #006@8b87e225: 0000000000000020 6750313200040011
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit:  #007@8b87f8b0: 0000000000000020 0000000000000000
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Unknown crashlog section: 43737461
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: RTKit: Unknown crashlog section: 43737461
Jan 12 20:53:11 asahi kernel: macsmc-rtkit 23e400000.smc: SMC crashed! Your system will reboot in a few seconds...

Please let me know if I can look for more information elsewhere.

Okay so SMC crashed with an actual assertion (not just a SError or something), and on top of that the kernel watchdog detected a lockup on the main CPU… Honestly, I think too many things went wrong there to seriously figure anything out from a single log, it sounds like a big explosion that somehow affected multiple parts of the system :frowning:

Please do watch out for any repeats though, if this is reproducible in any way then we want to get to the bottom of it.

If it doesn’t happen again though, there are going to be changes to sleep power management as well as fixes for the USB issues and whatnot… so it’s probably not worth spending time trying to dig up what caused this to go so wrong, since we might fix it by accident with all those changes.

That said, if you can paste the full log (everything around the crash including the full mailbox log, from the beginning of the resume cycle to the reboot message) somewhere I’ll take a look in case anything obvious stands out.

Thanks a lot. I agree that this is probably a random cosmic ray hitting somewhere and hopefully incoming changes will help. Looking forward to those since a more efficient sleep will be a big deal! I will definitely report back if anything happens again. In any case here is the complete log (or what I could find by running journalctl. Should I look somewhere else too?) Asahi Crash · GitHub

I am at my office again and I tried to see how much that Dell dock is part of the problem. If I suspend the laptop and then unplugg the usb-c cable, I get the message about lokcup on a cpu and resume takes a long time (16.5 seconds) but no crashing this time. From journalctl

Jan 15 16:47:34 asahi kernel: phy-apple-atc 503000000.phy: pipehandler lock not acked, this type-c port is probably dead until the next reboot.
Jan 15 16:47:34 asahi kernel: xhci-hcd xhci-hcd.0.auto: xHC error in resume, USBSTS 0x401, Reinit
Jan 15 16:47:34 asahi kernel: usb usb1: root hub lost power or was reset
Jan 15 16:47:34 asahi kernel: usb usb2: root hub lost power or was reset
Jan 15 16:47:34 asahi kernel: watchdog: Watchdog detected hard LOCKUP on cpu 3
Jan 15 16:47:34 asahi kernel: Modules linked in: apple_mfi_fastcharge r8153_ecm cdc_ether usbnet r8152 mii xhci_plat_hcd rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device uinput nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bnep nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set des_generic libdes brcmfmac_wcc md4 nf_tables nfnetlink brcmfmac brcmutil hci_bcm4377 cfg80211 bluetooth rfkill snd_soc_macaudio snd_soc_cs42l83_i2c macsmc_hid snd_soc_apple_mca snd_soc_cs42l42 apple_isp snd_soc_tas2770 snd_soc_core ofpart videobuf2_dma_sg videobuf2_memops videobuf2_v4l2 videobuf2_common spi_nor videodev snd_compress mtd apple_z2 ac97_bus panel_summit snd_pcm_dmaengine mc leds_pwm apple_soc_cpufreq joydev pkcs8_key_parser fuse loop zram hid_apple nvmem_spmi_mfd crct10dif_ce macsmc_power macsmc_reboot tps6598x rtc_macsmc polyval_ce spi_hid_apple_of polyval_generic spi_hid_apple gpio_macsmc simple_mfd_spmi ghash_ce appledrm sha3_ce dwc3 apple_dcp sha512_ce
Jan 15 16:47:34 asahi kernel:  sha512_arm64 phy_apple_atc typec udc_core macsmc_rtkit spmi_apple_controller apple_wdt nvmem_apple_efuses macsmc ulpi asahi snd_pcm pwm_apple snd_timer pinctrl_apple_gpio apple_admac snd adpdrm clk_apple_nco soundcore spi_apple drm_dma_helper mux_core apple_dart i2c_apple sunrpc vfat fat nvme_apple apple_sart nvme_core nvme_common scsi_dh_rdac scsi_dh_emc scsi_dh_alua dm_multipath
Jan 15 16:47:34 asahi kernel: xhci-hcd xhci-hcd.0.auto: PM: dpm_run_callback(): platform_pm_resume+0x0/0x78 returns -110
Jan 15 16:47:34 asahi kernel: xhci-hcd xhci-hcd.0.auto: PM: failed to resume async: error -110
Jan 15 16:47:34 asahi kernel: PM: resume devices took 16.572 seconds
Jan 15 16:47:34 asahi kernel: ------------[ cut here ]------------
Jan 15 16:47:34 asahi kernel: Component: resume devices, time: 16572
Jan 15 16:47:34 asahi kernel: WARNING: CPU: 1 PID: 65723 at kernel/power/suspend_test.c:53 suspend_test_finish+0x94/0xb0
Jan 15 16:47:34 asahi kernel: Modules linked in: apple_mfi_fastcharge r8153_ecm cdc_ether usbnet r8152 mii xhci_plat_hcd rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device uinput nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bnep nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set des_generic libdes brcmfmac_wcc md4 nf_tables nfnetlink brcmfmac brcmutil hci_bcm4377 cfg80211 bluetooth rfkill snd_soc_macaudio snd_soc_cs42l83_i2c macsmc_hid snd_soc_apple_mca snd_soc_cs42l42 apple_isp snd_soc_tas2770 snd_soc_core ofpart videobuf2_dma_sg videobuf2_memops videobuf2_v4l2 videobuf2_common spi_nor videodev snd_compress mtd apple_z2 ac97_bus panel_summit snd_pcm_dmaengine mc leds_pwm apple_soc_cpufreq joydev pkcs8_key_parser fuse loop zram hid_apple nvmem_spmi_mfd crct10dif_ce macsmc_power macsmc_reboot tps6598x rtc_macsmc polyval_ce spi_hid_apple_of polyval_generic spi_hid_apple gpio_macsmc simple_mfd_spmi ghash_ce appledrm sha3_ce dwc3 apple_dcp sha512_ce
Jan 15 16:47:34 asahi kernel:  sha512_arm64 phy_apple_atc typec udc_core macsmc_rtkit spmi_apple_controller apple_wdt nvmem_apple_efuses macsmc ulpi asahi snd_pcm pwm_apple snd_timer pinctrl_apple_gpio apple_admac snd adpdrm clk_apple_nco soundcore spi_apple drm_dma_helper mux_core apple_dart i2c_apple sunrpc vfat fat nvme_apple apple_sart nvme_core nvme_common scsi_dh_rdac scsi_dh_emc scsi_dh_alua dm_multipath
Jan 15 16:47:34 asahi kernel: CPU: 1 PID: 65723 Comm: systemd-sleep Tainted: G S                 6.6.3-411.asahi.fc39.aarch64+16k #1
Jan 15 16:47:34 asahi kernel: Hardware name: Apple MacBook Pro (13-inch, M1, 2020) (DT)
Jan 15 16:47:34 asahi kernel: pstate: 61400009 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
Jan 15 16:47:34 asahi kernel: pc : suspend_test_finish+0x94/0xb0
Jan 15 16:47:34 asahi kernel: lr : suspend_test_finish+0x94/0xb0
Jan 15 16:47:34 asahi kernel: sp : ffff800080d4bb60
Jan 15 16:47:34 asahi kernel: x29: ffff800080d4bb60 x28: ffff66f48b820000 x27: 0000000000000000
Jan 15 16:47:34 asahi kernel: x26: 0000000000000000 x25: 0000000000000000 x24: ffff66f365e54860
Jan 15 16:47:34 asahi kernel: x23: ffff800080d4bcd8 x22: ffffdb82b9e4c380 x21: ffffdb82ba2bf2d8
Jan 15 16:47:34 asahi kernel: x20: ffffdb82b8ab0898 x19: 00000000000040bc x18: ffffffffffffffff
Jan 15 16:47:34 asahi kernel: x17: 0000000000000000 x16: ffffdb82b7fad3c8 x15: ffff800080d4b6f0
Jan 15 16:47:34 asahi kernel: x14: 0000000000000000 x13: ffffdb82ba2c6f31 x12: 2d2d2d2d5d206572
Jan 15 16:47:34 asahi kernel: x11: 00000000ffffe182 x10: 000000000000000a x9 : ffffdb82b72f35fc
Jan 15 16:47:34 asahi kernel: x8 : 000000000000000a x7 : 0000000000000005 x6 : 000000000000000d
Jan 15 16:47:34 asahi kernel: x5 : ffff66f5ddbcf988 x4 : ffffdb82b96039c0 x3 : ffff8b73245cc000
Jan 15 16:47:34 asahi kernel: x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff66f48b820000
Jan 15 16:47:34 asahi kernel: Call trace:
Jan 15 16:47:34 asahi kernel:  suspend_test_finish+0x94/0xb0
Jan 15 16:47:34 asahi kernel:  suspend_devices_and_enter+0x1c4/0x320
Jan 15 16:47:34 asahi kernel:  enter_state+0x248/0x5f0
Jan 15 16:47:34 asahi kernel:  pm_suspend+0x48/0xf8
Jan 15 16:47:34 asahi kernel:  state_store+0x40/0x88
Jan 15 16:47:34 asahi kernel:  kobj_attr_store+0x18/0x30
Jan 15 16:47:34 asahi kernel:  sysfs_kf_write+0x4c/0x68
Jan 15 16:47:34 asahi kernel:  kernfs_fop_write_iter+0x13c/0x1d8
Jan 15 16:47:34 asahi kernel:  vfs_write+0x1c8/0x318
Jan 15 16:47:34 asahi kernel:  ksys_write+0x7c/0x120
Jan 15 16:47:34 asahi kernel:  __arm64_sys_write+0x24/0x38
Jan 15 16:47:34 asahi kernel:  invoke_syscall+0x78/0x100
Jan 15 16:47:34 asahi kernel:  el0_svc_common.constprop.0+0x48/0xf0
Jan 15 16:47:34 asahi kernel:  do_el0_svc+0x24/0x38
Jan 15 16:47:34 asahi kernel:  el0_svc+0x3c/0x110
Jan 15 16:47:34 asahi kernel:  el0t_64_sync_handler+0x120/0x130
Jan 15 16:47:34 asahi kernel:  el0t_64_sync+0x194/0x198
Jan 15 16:47:34 asahi kernel: ---[ end trace 0000000000000000 ]---

The crash has happened again. Just to test it, before leaving office I plugged in the dock, suspended the laptop and the unplugged the usb cable. When I opened the lid again about 3 hours later the crash happened again. I have added the logs to the github gist above. They are a bit different this time (maybe only superficially).

Oooooh fun. So the trigger is plugging in the dock, suspending, unplugging it, then resuming? Interesting. Does it always happen, or often? That sounds like a very likely bug yeah. It’s very interesting that SMC blows up here. I wonder if part of it is that one of the USB-PD port controllers borks, since SMC interacts with those via a back channel.

Filed here: Issue #5: USB hotplug across resume fireworks - remix-bugs - Pagure.io

Yes

I have five instances of this in my logs. Three of them lead to SMC crashing, the other two didn’t. The three that crashed always had hard lockup on CPU 0. While for the other two ocassion when there was no crash lokcup for one was on CPU 2 and CPU 3 respectively.

On all five occasions, resume for devices took over 16 seconds while the normally it is under 0.5 seconds.

How the crash unfolds was different on all three occasions

  1. After sometime lock screen became responsive and I was able to get past it but then the system froze again.
  2. After sometimes lock screen became responsive and I was able to get past it and interact with it normally till reboot.
  3. The screen didn’t turn on (but the touchbar did) and remained blank till reboot.

If you want me to experiment in someway to figure out what is happening please let me know.

I think that should be enough for now :). If we can’t repro we might ask you for more details about exactly what devices the dock has.