feat: Apple Silicon support + graph bar color picker - #275
Open
nastarynaz wants to merge 14 commits into
Open
nastarynaz wants to merge 14 commits into
nastarynaz wants to merge 14 commits into
Conversation
…e monitoring - Add M-series specific SMC temperature sensors (Tp09, Tp0T, Tp05, Tg05) - Update SmcControl to fallback to M-series sensors when Intel sensors unavailable - Improve GPU monitoring to handle M-series integrated GPUs - Add GitHub Actions artifact upload for easier testing Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed SMCKeyInfoData.dataSize from IOByteCount (8 bytes on 64-bit) to UInt32 (4 bytes) to ensure SMCParamStruct is exactly 80 bytes as required by the SMC driver. This fixes the assertion failure on Apple Silicon Macs. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add Double.init(fromFLT:) to parse FLT (float) format temperature data - Update temperature() function to try SP78 first, then fallback to FLT - Update allUnknownTemperatureSensors() to include FLT format sensors - Fixes N/A temperature display on M-series Macs The Apple Silicon Macs use FLT (4-byte float) format for temperature sensors instead of SP78 (2-byte fixed-point) format used by Intel Macs. This change enables proper temperature reading on M1/M2/M3 Macs. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Catch all errors when trying SP78 format, not just specific error code - This ensures FLT fallback works reliably on Apple Silicon Macs - Simplifies error handling logic Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Problem: - GPU shows N/A on Apple Silicon (M-series) Macs - system_profiler doesn't provide device-id for Apple Silicon GPUs - IOAccelerator doesn't provide IOPCIMatch for Apple Silicon GPUs Solution: 1. GPU Detection (GPU.swift): - Use model name as deviceId fallback when device-id is not available - This allows Apple Silicon GPUs to be detected (e.g., "Apple M4 Pro") 2. GPU Statistics (GPU.swift): - Remove requirement for IOPCIMatch (was causing nil return) - Use "apple" as fallback pciMatch for Apple Silicon GPUs - GPU usage is available from PerformanceStatistics["Device Utilization %"] 3. GPU Matching (GpuStore.swift): - Detect Apple Silicon GPUs by checking if deviceId contains "apple" or " m" - Match Apple Silicon GPUs by pciMatch == "apple" - Keep Intel GPU matching logic (match by device ID in pciMatch) Note on GPU Temperature: - GPU temperature sensors (Tg*) exist but return SMC error 132 (read-only/unavailable) - This appears to be a system limitation on Apple Silicon - GPU temperature will show N/A, but usage percentage will work correctly Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add uptime days display in CPU menu block - Update version from 1.6.2 to 1.6.3 - Add localization support for all 22 languages Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
## Graph Bar Color - Added GraphColorOption enum with 5 options: Monochrome, Red (#e03a3e), Blue (#009ddc), Orange (#f6821f), Yellow (#fcb827) - EulComponentConfig now stores graphColor setting, persisted to UserDefaults - LineChart accepts a color parameter (fill at 50% opacity, solid stroke) - CpuView, GpuView, MemoryView pass config.graphColor.color to LineChart - PreferenceComponentConfigView shows a color picker row (circle swatches) when 'Show Graph' is enabled — clicking a swatch applies it instantly ## Color Definitions - Added .graphRed, .graphBlue, .graphOrange, .graphYellow to Color extension - ProgressBarView now accepts a color parameter for bar fill (default .primary) ## Apple Silicon / Build Fixes - Bumped MACOSX_DEPLOYMENT_TARGET from 10.15 → 11.0 for all targets - Disabled SwiftFormat build phase (was blocking build by downloading SPM deps) - Suppressed noisy SMC error 135 (SP78/FLT type mismatch on Apple Silicon — already handled by FLT fallback, was printing on every refresh cycle)
realhidden
pushed a commit
to realhidden/eul
that referenced
this pull request
Sep 18, 2026
Idle power (gao-sun#76, gao-sun#87, gao-sun#18): - New WidgetReloader coalesces WidgetCenter reloads: skipped entirely when no widget of the kind is installed (the common case; stores previously woke every widget extension process on each 3-5s tick) and throttled to >=15s otherwise. Widget entry validity widened 3s -> 45s and the timeline outdated window 10s -> 60s to match, so coalesced widgets don't flip to "not available". WidgetReloader is now the only WidgetCenter caller (verified). - AppDelegate: generation counters invalidate pending asyncAfter chains - a brief sleep/wake used to leave the old refresh chain running next to the new one, multiplying the effective refresh rate after every wake. The hourly update-check chain had the same accumulation bug via the upgrade-method subscription and gets its own generation. - SmcControl drops SMC sensors that fail 3 consecutive reads AND have never read successfully (the bogus Apple Silicon keys), ending the per-tick error log spam without risking removal of a working Intel sensor after a wake-time glitch. Status bar (gao-sun#40, gao-sun#113): StatusBarManager.render no longer toggles isVisible off/on - that made the system forget the item's saved position, so the bar jumped to the right end after reboot or component changes. The item is never fully hidden (it is the only path into Preferences). Accuracy / robustness (adapted from PR gao-sun#281 with fixes): - TopStore: parse top's rsize unit suffix; values are KB by default and may carry K/M/G plus a +/- growth marker (e.g. "433M+"), so RAM percentages were up to 1024x off (gao-sun#227). Suffix lookup ignores the marker (gao-sun#281's version mis-parsed "433M+" as KB). - NetworkStore: treat interface counter resets/wraps as zero speed instead of freezing (gao-sun#226); a 10s generation-guarded watchdog re-opens the single-flight guard if the shell pipeline never calls back (gao-sun#263) - stale watchdogs can't re-open the guard for a younger request, late callbacks are discarded, the speed division is guarded against near-zero elapsed, and the watchdog stops re-arming after 5 consecutive fires so a persistent hang can't accumulate hung processes. Widget reload routed through WidgetReloader. - DiskStore: with no explicit disk selected report the boot volume (volumeAvailableCapacityForImportantUsage, Finder-style) instead of summing all volumes - APFS volumes share a container so the sum double-counted (gao-sun#250, gao-sun#182). Cached per refresh; negative values guarded. - Info.getActiveInterfaces: exclude virtual interfaces (lo/awdl/llw/utun/ gif/stf) that report "active" and shadow the real port (gao-sun#226); exclusion rather than an en*/ap* allowlist keeps Thunderbolt/USB bridges working. - GPU.getInfo: also read "GPU Core Utilization" and IOAcceleratorStatistics2 (from PR gao-sun#275). NSApp.appearance follows the appearance preference (gao-sun#246). - splittedByWhitespace: drop the no-op NSRegularExpression. Deliberately NOT taken from gao-sun#281: widget dark/light theming via .preferredColorScheme - it is a no-op inside WidgetKit extension views, and the PreferenceEntry schema change broke decoding of pre-upgrade container data. gao-sun#236 needs a different mechanism. All changes adversarially reviewed by a 4-lens multi-agent pass (concurrency, behavior, API correctness, edge cases); 6 distinct confirmed findings fixed, including a missed WidgetReloader conversion in NetworkStore. Debug + Release BUILD SUCCEEDED on Xcode 26.3; live smoke run on Apple Silicon: sensors cached, active interface resolves to ["en0"], no SMC error spam. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
realhidden
pushed a commit
to realhidden/eul
that referenced
this pull request
Sep 18, 2026
Idle power (gao-sun#76, gao-sun#87, gao-sun#18): - New WidgetReloader coalesces WidgetCenter reloads: skipped entirely when no widget of the kind is installed (the common case; stores previously woke every widget extension process on each 3-5s tick) and throttled to >=15s otherwise. Widget entry validity widened 3s -> 45s and the timeline outdated window 10s -> 60s to match, so coalesced widgets don't flip to "not available". WidgetReloader is now the only WidgetCenter caller (verified). - AppDelegate: generation counters invalidate pending asyncAfter chains - a brief sleep/wake used to leave the old refresh chain running next to the new one, multiplying the effective refresh rate after every wake. The hourly update-check chain had the same accumulation bug via the upgrade-method subscription and gets its own generation. - SmcControl drops SMC sensors that fail 3 consecutive reads AND have never read successfully (the bogus Apple Silicon keys), ending the per-tick error log spam without risking removal of a working Intel sensor after a wake-time glitch. Status bar (gao-sun#40, gao-sun#113): StatusBarManager.render no longer toggles isVisible off/on - that made the system forget the item's saved position, so the bar jumped to the right end after reboot or component changes. The item is never fully hidden (it is the only path into Preferences). Accuracy / robustness (adapted from PR gao-sun#281 with fixes): - TopStore: parse top's rsize unit suffix; values are KB by default and may carry K/M/G plus a +/- growth marker (e.g. "433M+"), so RAM percentages were up to 1024x off (gao-sun#227). Suffix lookup ignores the marker (gao-sun#281's version mis-parsed "433M+" as KB). - NetworkStore: treat interface counter resets/wraps as zero speed instead of freezing (gao-sun#226); a 10s generation-guarded watchdog re-opens the single-flight guard if the shell pipeline never calls back (gao-sun#263) - stale watchdogs can't re-open the guard for a younger request, late callbacks are discarded, the speed division is guarded against near-zero elapsed, and the watchdog stops re-arming after 5 consecutive fires so a persistent hang can't accumulate hung processes. Widget reload routed through WidgetReloader. - DiskStore: with no explicit disk selected report the boot volume (volumeAvailableCapacityForImportantUsage, Finder-style) instead of summing all volumes - APFS volumes share a container so the sum double-counted (gao-sun#250, gao-sun#182). Cached per refresh; negative values guarded. - Info.getActiveInterfaces: exclude virtual interfaces (lo/awdl/llw/utun/ gif/stf) that report "active" and shadow the real port (gao-sun#226); exclusion rather than an en*/ap* allowlist keeps Thunderbolt/USB bridges working. - GPU.getInfo: also read "GPU Core Utilization" and IOAcceleratorStatistics2 (from PR gao-sun#275). NSApp.appearance follows the appearance preference (gao-sun#246). - splittedByWhitespace: drop the no-op NSRegularExpression. Deliberately NOT taken from gao-sun#281: widget dark/light theming via .preferredColorScheme - it is a no-op inside WidgetKit extension views, and the PreferenceEntry schema change broke decoding of pre-upgrade container data. gao-sun#236 needs a different mechanism. All changes adversarially reviewed by a 4-lens multi-agent pass (concurrency, behavior, API correctness, edge cases); 6 distinct confirmed findings fixed, including a missed WidgetReloader conversion in NetworkStore. Debug + Release BUILD SUCCEEDED on Xcode 26.3; live smoke run on Apple Silicon: sensors cached, active interface resolves to ["en0"], no SMC error spam. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR brings two major improvements to eul:
🍎 Apple Silicon (M-series) Temperature & GPU Support
SMC / Temperature fixes:
SMCParamStructsize corrected for Apple Silicon (prevents misaligned reads)FLT(32-bit float) sensor format support — Apple Silicon usesFLTinstead ofSP78. Code now triesSP78first and falls back toFLTFLT(SMCResult 135 handled silently)SmcControl:CPU_PCORE,CPU_PACKAGECPU_ECOREGPU_APPLE_SILICONGPU fixes:
getGPUs()uses model name as identifier whendevice-idis absent (Apple Silicon GPUs)getInfo()falls back to"apple"as pciMatch whenIOPCIMatchunavailableDevice Utilization %,GPU Activity(%),GPU Core Utilization,IOAcceleratorStatistics2— defaults to 0 instead of crashing🎨 Graph Bar Color Picker
GraphColorOptionenum: Monochrome, Red#e03a3e, Blue#009ddc, Orange#f6821f, Yellow#fcb827EulComponentConfig, persisted viaUserDefaultsLineChartaccepts acolorparam (fill at 50% opacity, full stroke)CpuView,GpuView,MemoryViewall pass the configured color toLineChart🔧 Build & Compatibility
10.15 → 11.0for all targetsSDKROOT=macosxfrom build scripts-sdk macosxflag