mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: added better fan control for M3/M4 Apple Silicon (#2924)
* Fix Ftst key handling for Apple Silicon fan control * Update CFBundleVersion to 747 in Info.plist Signed-off-by: Alex Goodkind <alex@goodkind.io> * Update TeamId and SMC.Helper certificate identifier in Info.plist Signed-off-by: Alex Goodkind <alex@goodkind.io> * Add debug logging to SMC fan control functions * Use writeWithRetry for Apple Silicon fan control writes and bump helper version to 1.0.3 * SMC fan control: serialize ops, Ftst timing, verification, logging - Helper: serial queue for setFanMode/setFanSpeed/resetFanControl - smc.swift: 3s wait after Ftst=1, longer mode retry (100ms), SMC result logging - helpers: per-fan verification with cancel-on-supersede, clearer logs - smc.swift: neutral write logs (no 'succeeded'), FAILED on error * - Updated error handling in SMCHelper to suppress expected XPC errors (codes 4097 and 4099) during helper updates/restarts. - Removed unnecessary debug print statement in ModeButtons for improved log clarity. * Update version numbers in Info.plist files to 752 and change TeamId for SMC.Helper * Add FanMode.auto3 and isAutomatic, re-add F%dMd write in automatic path, use isAutomatic in countManualFans; bump SMC Helper to 1.0.24 * Apple Silicon fan control: direct-first writes, strip diagnostic bloat Try direct F%dMd=1 write before Ftst unlock (instant on M1, fallback on M3/M4). Remove verification system, diagnostic prints, dead code. * Apple Silicon fan control: direct-first writes Try direct F%dMd=1 write before Ftst unlock (instant on M1, fallback on M3/M4). Bump helper to 1.0.2/3, Stats/Widgets to 751. --------- Signed-off-by: Alex Goodkind <alex@goodkind.io>
This commit is contained in:
@@ -894,6 +894,11 @@ public class SMCHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public func resetFanControl() {
|
||||
guard let helper = self.helper(nil) else { return }
|
||||
helper.resetFanControl { _ in }
|
||||
}
|
||||
|
||||
public func isActive() -> Bool {
|
||||
return self.connection != nil
|
||||
}
|
||||
|
||||
@@ -271,6 +271,7 @@ public extension Notification.Name {
|
||||
static let refreshPublicIP = Notification.Name("refreshPublicIP")
|
||||
static let resetTotalNetworkUsage = Notification.Name("resetTotalNetworkUsage")
|
||||
static let syncFansControl = Notification.Name("syncFansControl")
|
||||
static let checkFanModes = Notification.Name("checkFanModes")
|
||||
static let fanHelperState = Notification.Name("fanHelperState")
|
||||
static let toggleOneView = Notification.Name("toggleOneView")
|
||||
static let widgetRearrange = Notification.Name("widgetRearrange")
|
||||
|
||||
Reference in New Issue
Block a user