黑苹果睡眠总是自动唤醒(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

相关文章

苹果macOS 26 Tahoe主题功能大升级:可定制图标/高亮文本/文件夹颜色

《苹果macOS26Tahoe主题功能大升级:可定制图标/高亮文本/文件夹颜色》在整体系统设计方面,macOS26采用了全新的玻璃质感视觉风格,应用于Dock栏、应用图标以及桌面小部件等多个界面... 科技媒体 MACRumors 昨日(6 月 13 日)发布博文,报道称在 macOS 26 Tahoe 中

MyBatis Plus 中 update_time 字段自动填充失效的原因分析及解决方案(最新整理)

《MyBatisPlus中update_time字段自动填充失效的原因分析及解决方案(最新整理)》在使用MyBatisPlus时,通常我们会在数据库表中设置create_time和update... 目录前言一、问题现象二、原因分析三、总结:常见原因与解决方法对照表四、推荐写法前言在使用 MyBATis

Python使用smtplib库开发一个邮件自动发送工具

《Python使用smtplib库开发一个邮件自动发送工具》在现代软件开发中,自动化邮件发送是一个非常实用的功能,无论是系统通知、营销邮件、还是日常工作报告,Python的smtplib库都能帮助我们... 目录代码实现与知识点解析1. 导入必要的库2. 配置邮件服务器参数3. 创建邮件发送类4. 实现邮件

Python使用pynput模拟实现键盘自动输入工具

《Python使用pynput模拟实现键盘自动输入工具》在日常办公和软件开发中,我们经常需要处理大量重复的文本输入工作,所以本文就来和大家介绍一款使用Python的PyQt5库结合pynput键盘控制... 目录概述:当自动化遇上可视化功能全景图核心功能矩阵技术栈深度效果展示使用教程四步操作指南核心代码解析

SpringBoot实现文件记录日志及日志文件自动归档和压缩

《SpringBoot实现文件记录日志及日志文件自动归档和压缩》Logback是Java日志框架,通过Logger收集日志并经Appender输出至控制台、文件等,SpringBoot配置logbac... 目录1、什么是Logback2、SpringBoot实现文件记录日志,日志文件自动归档和压缩2.1、

SpringCloud使用Nacos 配置中心实现配置自动刷新功能使用

《SpringCloud使用Nacos配置中心实现配置自动刷新功能使用》SpringCloud项目中使用Nacos作为配置中心可以方便开发及运维人员随时查看配置信息,及配置共享,并且Nacos支持配... 目录前言一、Nacos中集中配置方式?二、使用步骤1.使用$Value 注解2.使用@Configur

Golang实现Redis分布式锁(Lua脚本+可重入+自动续期)

《Golang实现Redis分布式锁(Lua脚本+可重入+自动续期)》本文主要介绍了Golang分布式锁实现,采用Redis+Lua脚本确保原子性,持可重入和自动续期,用于防止超卖及重复下单,具有一定... 目录1 概念应用场景分布式锁必备特性2 思路分析宕机与过期防止误删keyLua保证原子性可重入锁自动

python利用backoff实现异常自动重试详解

《python利用backoff实现异常自动重试详解》backoff是一个用于实现重试机制的Python库,通过指数退避或其他策略自动重试失败的操作,下面小编就来和大家详细讲讲如何利用backoff实... 目录1. backoff 库简介2. on_exception 装饰器的原理2.1 核心逻辑2.2

Java如何根据文件名前缀自动分组图片文件

《Java如何根据文件名前缀自动分组图片文件》一大堆文件(比如图片)堆在一个目录下,它们的命名规则遵循一定的格式,混在一起很难管理,所以本文小编就和大家介绍一下如何使用Java根据文件名前缀自动分组图... 目录需求背景分析思路实现代码输出结果知识扩展需求一大堆文件(比如图片)堆在一个目录下,它们的命名规

使用Python实现实时金价监控并自动提醒功能

《使用Python实现实时金价监控并自动提醒功能》在日常投资中,很多朋友喜欢在一些平台买点黄金,低买高卖赚点小差价,但黄金价格实时波动频繁,总是盯着手机太累了,于是我用Python写了一个实时金价监控... 目录工具能干啥?手把手教你用1、先装好这些"食材"2、代码实现讲解1. 用户输入参数2. 设置无头浏