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

2024-06-12 23:36

本文主要是介绍黑苹果睡眠总是自动唤醒(RTC),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

黑苹果睡眠总是自动唤醒【RTC】

  • 1. 问题
  • 2. 解决方案
    • 2.1. 查看重启日志
    • 2.2. 配置Disable RTC wake scheduling补丁
  • 3. 后续
  • 4. 参考

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/

这篇关于黑苹果睡眠总是自动唤醒(RTC)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1055658

相关文章

Go Mongox轻松实现MongoDB的时间字段自动填充

《GoMongox轻松实现MongoDB的时间字段自动填充》这篇文章主要为大家详细介绍了Go语言如何使用mongox库,在插入和更新数据时自动填充时间字段,从而提升开发效率并减少重复代码,需要的可以... 目录前言时间字段填充规则Mongox 的安装使用 Mongox 进行插入操作使用 Mongox 进行更

C语言中自动与强制转换全解析

《C语言中自动与强制转换全解析》在编写C程序时,类型转换是确保数据正确性和一致性的关键环节,无论是隐式转换还是显式转换,都各有特点和应用场景,本文将详细探讨C语言中的类型转换机制,帮助您更好地理解并在... 目录类型转换的重要性自动类型转换(隐式转换)强制类型转换(显式转换)常见错误与注意事项总结与建议类型

IDEA如何让控制台自动换行

《IDEA如何让控制台自动换行》本文介绍了如何在IDEA中设置控制台自动换行,具体步骤为:File-Settings-Editor-General-Console,然后勾选Usesoftwrapsin... 目录IDEA如何让控制台自http://www.chinasem.cn动换行操作流http://www

vscode保存代码时自动eslint格式化图文教程

《vscode保存代码时自动eslint格式化图文教程》:本文主要介绍vscode保存代码时自动eslint格式化的相关资料,包括打开设置文件并复制特定内容,文中通过代码介绍的非常详细,需要的朋友... 目录1、点击设置2、选择远程--->点击右上角打开设置3、会弹出settings.json文件,将以下内

Python脚本实现自动删除C盘临时文件夹

《Python脚本实现自动删除C盘临时文件夹》在日常使用电脑的过程中,临时文件夹往往会积累大量的无用数据,占用宝贵的磁盘空间,下面我们就来看看Python如何通过脚本实现自动删除C盘临时文件夹吧... 目录一、准备工作二、python脚本编写三、脚本解析四、运行脚本五、案例演示六、注意事项七、总结在日常使用

SpringBoot项目启动后自动加载系统配置的多种实现方式

《SpringBoot项目启动后自动加载系统配置的多种实现方式》:本文主要介绍SpringBoot项目启动后自动加载系统配置的多种实现方式,并通过代码示例讲解的非常详细,对大家的学习或工作有一定的... 目录1. 使用 CommandLineRunner实现方式:2. 使用 ApplicationRunne

python写个唤醒睡眠电脑的脚本

《python写个唤醒睡眠电脑的脚本》这篇文章主要为大家详细介绍了如何使用python写个唤醒睡眠电脑的脚本,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 环境:win10python3.12问题描述:怎么用python写个唤醒睡眠电脑的脚本?解决方案:1.唤醒处于睡眠状

Springboot的ThreadPoolTaskScheduler线程池轻松搞定15分钟不操作自动取消订单

《Springboot的ThreadPoolTaskScheduler线程池轻松搞定15分钟不操作自动取消订单》:本文主要介绍Springboot的ThreadPoolTaskScheduler线... 目录ThreadPoolTaskScheduler线程池实现15分钟不操作自动取消订单概要1,创建订单后

python实现自动登录12306自动抢票功能

《python实现自动登录12306自动抢票功能》随着互联网技术的发展,越来越多的人选择通过网络平台购票,特别是在中国,12306作为官方火车票预订平台,承担了巨大的访问量,对于热门线路或者节假日出行... 目录一、遇到的问题?二、改进三、进阶–展望总结一、遇到的问题?1.url-正确的表头:就是首先ur

Spring使用@Retryable实现自动重试机制

《Spring使用@Retryable实现自动重试机制》在微服务架构中,服务之间的调用可能会因为一些暂时性的错误而失败,例如网络波动、数据库连接超时或第三方服务不可用等,在本文中,我们将介绍如何在Sp... 目录引言1. 什么是 @Retryable?2. 如何在 Spring 中使用 @Retryable