Skip to content

v1.4.3 · 根治菜单卡死(风扇助手 socket 阻塞)

Choose a tag to compare

@Azhu9701 Azhu9701 released this 07 Oct 14:34
· 1 commit to main since this release

GT Toolkit v1.4.3

根治:菜单栏图标点不动(第二处根因,实机 sample 抓到现行)。

v1.4.2 修掉了点击路径上的同步 DDC I/O,但实机复现卡死后 sample 主线程,100% 停在:

FanController.applySmart() → __sendto

根因

智能温控每 3 秒往特权助手(gt-fanctl 守护)的 unix socket 发转速命令。守护是单线程命令循环,执行 AUDIO-RESET(重启 coreaudiod)或音频探测期间不读 socket;客户端 send() 没有发送超时,缓冲区写满后无限阻塞,主线程整个冻死——菜单自然点不动。

修复

客户端(FanController)

  • 全部 socket 收发移到后台串行队列,主线程零 socket 调用
  • 连接设置 SO_SNDTIMEO/SO_RCVTIMEO = 2s:卡死的守护最多拖 2 秒
  • 断线自动重连自愈;连续 3 次失败才降级恢复系统自动并提示(避免守护短暂忙碌导致模式来回跳)
  • 写入后乐观更新目标转速,滑杆/图标即时跟上

守护(gt-fanctl)

  • AUDIO-RESET 改为后台线程执行,命令循环不再被 coreaudiod 重启阻塞

升级

覆盖安装即可(设置全保留)。建议重新开关一次「音频自动修复」,把常驻守护替换为本版(会弹一次管理员密码);守护更新后,音频修复期间风扇命令也不再被拖住。

English: Root-caused the second menu-freeze: the smart-fan loop sent RPM commands over a unix socket with no send timeout, and the single-threaded daemon stops reading while restarting coreaudiod — the client's send() then blocked forever on the main thread. All socket I/O moved to a background serial queue with 2s timeouts and auto-reconnect; the daemon now runs AUDIO-RESET off its command loop. Re-toggle "音频自动修复" once to update the installed daemon.