黑苹果睡眠总是自动唤醒(RTC)

发布于:2024-06-14 ⋅ 阅读:(165) ⋅ 点赞:(0)

1. 问题

黑苹果EFI 更换后,总是在手动 睡眠后,间歇性重启,然后再次睡眠,然后再重启。原因归结为: RTC (Alarm) 导致的重启。

昨天查看了重启日志:

 $ log show --last 1d | grep "Wake reason"                                                                        

2024-06-10 22:11:56.210575+0800 0xa4d      Default     0x0                  0      0    kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason **Wake reason**: Host (0x01)

^[[A2024-06-11 00:09:09.338214+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 00:09:09.338215+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 01:05:48.411265+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 01:05:48.411382+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 01:11:19.571070+0800 0x2448c    Default     0x0                  0      0    kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason **Wake reason**: Host (0x01)

2024-06-11 01:12:13.142668+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 01:12:13.142669+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 02:54:34.413465+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 02:54:34.413465+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 04:42:36.814304+0800 0x249e5    Default     0x0                  0      0    kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason **Wake reason**: Host (0x01)

2024-06-11 04:43:28.999777+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 04:43:28.999778+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 06:25:26.645049+0800 0x24d53    Default     0x0                  0      0    kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason **Wake reason**: Host (0x01)

2024-06-11 06:26:20.006974+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 06:26:20.006975+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 07:00:04.705977+0800 0x251e6    Default     0x0                  0      0    kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason **Wake reason**: Host (0x01)

2024-06-11 07:00:57.574484+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 07:00:57.574485+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 07:02:06.175407+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 07:02:06.175408+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 08:17:11.543698+0800 0x25c9b    Default     0x0                  0      0    kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason **Wake reason**: Host (0x01)

2024-06-11 08:18:04.557374+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

2024-06-11 08:18:04.557375+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: RTC (Alarm)

这个日志我只取了部分,重启次数太多了

2. 解决方案

2.1. 查看重启日志

执行如下命令可以查看最近一天内的重启原因:
log show --last 1d | grep "Wake reason"

如果是RTC 导致重启就可以继续用下面方案

2.2. 配置Disable RTC wake scheduling补丁

image.png
image.png

用opencore添加补丁即可。

1. Base: __ZN8AppleRTC18setupDateTimeAlarmEPK11RTCDateTime
2. Comment: Disable RTC wake scheduling
3. Count: 1
4. Enabled: True
5. Identifier: com.apple.driver.AppleRTC
6. Replace: C3
7. MinKernel: 19.0.0
8. count: 1

注意最后开启enable开关,保存后,重启,观察即可

3. 后续

观察第一天,显然 RTC 导致的自动唤醒问题木有啦!!!

 $ log show --last 1d | grep "Wake reason"

2024-06-11 23:21:12.834085+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: ?

2024-06-11 23:21:12.834088+0800 0x77       Default     0x0                  0      0    kernel: (AppleACPIPlatform) AppleACPIPlatformPower **Wake reason**: ?

2024-06-12 21:51:22.745014+0800 0x24a4b    Default     0x0                  0      0    kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason **Wake reason**: Host (0x01)

我的黑苹果还会

  1. 睡眠两天后会睡死,然后需要电源键启动,然后会自己再重启一次 – 观察中
  2. 睡死启动后,系统设置不能打开,会奔溃。 – 观察中
  3. 睡眠唤醒后,显示器上的耳机检测不到。-- 其他解决方案

4. 参考

https://osx.cx/sleep-wake-up-solution.html

https://www.bilibili.com/read/cv23475360/


网站公告

今日签到

点亮在社区的每一天
去签到