You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2026/07/20 20:46:58 WindowServer 8.5% Mos 0.0%
2026/07/20 20:46:59 WindowServer 10.6% Mos 0.1%
2026/07/20 20:47:00 WindowServer 73.2% Mos 0.1%
2026/07/20 20:47:01 WindowServer 99.7% Mos 0.0%
2026/07/20 20:47:02 WindowServer 95.4% Mos 0.0%
2026/07/20 20:47:03 WindowServer 100.7% Mos 0.0%
2026/07/20 20:47:04 WindowServer 97.6% Mos 0.0%
2026/07/20 20:47:05 WindowServer 94.3% Mos 0.0%
2026/07/20 20:47:06 WindowServer 86.0% Mos 0.0%
2026/07/20 20:47:07 WindowServer 100.4% Mos 0.0%
2026/07/20 20:47:08 WindowServer 96.3% Mos 0.0%
2026/07/20 20:47:09 WindowServer 95.8% Mos 0.0%
2026/07/20 20:47:10 WindowServer 98.2% Mos 0.0%
2026/07/20 20:47:11 WindowServer 99.6% Mos 0.0%
Mos Console 日志摘录
2026-07-20 20:39:28.068 CVDisplayLinkCreateWithCGDisplays error -6661 due to invalid display count (0)
2026-07-20 20:39:28.068 CVDisplayLinkCreateWithCGDisplays error -6661 due to CVDisplayLinkCreateWithCGDisplays failure
2026-07-20 20:39:28.073 CGSDisplayNotifyProc: got notification kCGSDisplayDidWake
2026-07-20 20:39:38.042 CGSDisplayNotifyProc: got notification kCGSDisplayWillSleep
2026-07-20 20:40:16.599 CVDisplayLinkCreateWithCGDisplays error -6661 due to invalid display count (0)
2026-07-20 20:40:16.599 CVDisplayLinkCreateWithCGDisplays error -6661 due to CVDisplayLinkCreateWithCGDisplays failure
2026-07-20 20:40:16.600 CGSDisplayNotifyProc: got notification kCGSDisplayDidWake
2026-07-20 20:40:26.549 CGSDisplayNotifyProc: got notification kCGSDisplayWillSleep
2026-07-20 20:40:51.411 CVDisplayLinkCreateWithCGDisplays error -6661 due to invalid display count (0)
2026-07-20 20:40:51.411 CVDisplayLinkCreateWithCGDisplays error -6661 due to CVDisplayLinkCreateWithCGDisplays failure
2026-07-20 20:40:51.412 CGSDisplayNotifyProc: got notification kCGSDisplayDidWake
对应的电源日志中,20:38–20:40 连续记录了 Entering Sleep state due to 'Clamshell Sleep'、USB2_wake,最后在 20:40:51 DarkWake to FullWake ... due to UserActivity,时间与上面的 Mos 日志一致。
Mos 5 秒 sample 摘要
Mos 主线程绝大多数时间正常阻塞在事件循环,而不是自身 CPU 忙循环;少量采样落在 Mos 的 event tap / 定时检查路径:
Activity
freerpa commentedon Jun 25, 2026
请看VCR : https://github.com/user-attachments/assets/1ac5b4d0-69a5-4508-9208-5f2cfb6a2479 @Caldis
stqfdyr commentedon Jul 18, 2026
我也遇到了,让 codex 定位是 Mos 与当前 macOS 图形/输入合成冲突,导致 WindowServer 在拖动窗口时单核跑满,不是偶然现象,退出 mos 后瞬间不卡顿了!
Caldis commentedon Jul 18, 2026
感谢反馈, 请问每次休眠唤醒都会触发吗? 另外, 如果不盒盖单纯锁定后重新进入系统也会触发吗? 以及, 如果放着不管, 卡顿是持续发生还是过一阵子会消失?
我的设备上没有办法复现这个问题, 可能需要你提供一下相关的日志, 可以在 [控制台] app 中搜索 mos 看看是否可以导出一些相关的运行信息
stqfdyr commentedon Jul 18, 2026
@Caldis
我目前正在尝试让 codex 写一个监控程序,等到卡顿的时候采集日志
stqfdyr commentedon Jul 20, 2026
@Caldis 卡顿再次复现,下面是现场采集并脱敏后的数据。没有采集屏幕、输入内容、文件内容、网络流量、账号信息或硬件序列号。
结论摘要
WindowServer连续接近单核满载;Mos 自身几乎为 0%。WindowServer平均 77.1%、最高 100.7%,12 个样本 >=55%;Mos 平均 0.01%、最高 0.1%。平均值包含开始拖动前的 0%、8.5%、10.6% 三个样本。CVDisplayLinkCreateWithCGDisplays error -6661 due to invalid display count (0)。kCGSDisplayDidWake17 次、kCGSDisplayWillSleep16 次、上述 -6661 错误 26 条(每次失败连续两条)。pmset同时记录到反复的Clamshell Sleep/ USB2 wake;本次开机以来计数达到 656 次 sleep/wake。system_profiler SPDisplaysDataType在采集时只返回 Apple M4 GPU,没有返回任何 display 条目。这和invalid display count (0)相符,但目前只能认为是关联线索,不是已证明的根因。环境
speed=2.7、step=33.6、duration=4.35、deadZone=1;无按 App 配置WindowServer / Mos CPU 原始摘录
Mos Console 日志摘录
对应的电源日志中,20:38–20:40 连续记录了
Entering Sleep state due to 'Clamshell Sleep'、USB2_wake,最后在 20:40:51DarkWake to FullWake ... due to UserActivity,时间与上面的 Mos 日志一致。Mos 5 秒 sample 摘要
Mos 主线程绝大多数时间正常阻塞在事件循环,而不是自身 CPU 忙循环;少量采样落在 Mos 的 event tap / 定时检查路径:
完整脱敏数据已在本地保留:20 分钟 Mos unified log、15 秒 top 原始采样、5 秒 Mos sample、对应 sleep/wake 电源日志和环境元数据。如果需要其中某一份完整内容,我可以继续贴到本 issue。
关于你问的复现条件:是否每次休眠唤醒都触发目前还不能确认;只锁屏不合盖尚未单独测试。本次卡顿至少在两轮采样期间持续,没有自行恢复。此前退出 Mos 后窗口拖动立即恢复;这次为了保留现场没有退出或重启 Mos。
stqfdyr commentedon Jul 20, 2026
补充附件:本次复现窗口的完整脱敏日志包(ZIP,5.8 KB 压缩/43 KB 解压):
mos-issue-evidence-20260720-2045-sanitized-logs.zip
内含:
Mos-unified-log.txt:20 分钟 Mos unified logMos-sample.txt:5 秒 Mos sample(调用栈)process-samples.txt:15 秒 WindowServer / Mos CPU 采样power-sleep-wake.txt:对应的 sleep/wake 时间线已再次遮盖电源日志中的本机 UID 占位符;不包含
raw/原始文件、屏幕/输入内容、网络地址、账号资料或硬件标识。ZIP SHA-256:12b10990d7830ed80d350d2b5713d83a42b41211e76b022e5e8d77373faefc07。Caldis commentedon Aug 4, 2026
已由 #999 修复并合入
master,感谢大家持续补充复现信息、日志和现场数据。根因是
Interceptor销毁时没有调用CFMachPortInvalidate,导致已禁用的 event tap 注册残留在 WindowServer 中。检查历史后确认,这个生命周期缺口存在已久;后续加入的 sleep/wake 重建和 Button 功能增加了重建频率与每轮 tap 数量,才让问题更快累积并变得明显。修复会随后续版本发布。
fix(interceptor): invalidate event tap CFMachPort on deinit (Caldis#999)
Da1sypetals commentedon Aug 20, 2026
有没有canary版本可以用上这个fix的
Caldis commentedon Aug 20, 2026
我来发个新版
Caldis commentedon Aug 20, 2026
@15615144111 4.3.0-beta 已发布, 包含一个与此症状高度相关的修复: 显示器休眠唤醒后, 滚动引擎可能被绑定在过低的刷新率上导致卡顿, 此前只能重启 Mos 恢复, 现在会在唤醒后几秒内自动纠正 (#991, 感谢 @wiskiiii)。本版还修复了长时间运行的若干资源泄漏问题。欢迎更新到 beta 验证盒盖待机后是否还会出现卡顿: https://github.com/Caldis/Mos/releases/tag/4.3.0-beta-20260820.1
Lum1104 commentedon Nov 19, 2026
我也遇到这个问题了,卡的不行找半天,感谢修复!