{"id":39264317,"url":"https://github.com/mohamadlounnas/ffan","last_synced_at":"2026-01-19T03:00:40.260Z","repository":{"id":332032171,"uuid":"1132512612","full_name":"mohamadlounnas/ffan","owner":"mohamadlounnas","description":"Lightweight macOS utility to monitor CPU/GPU temperatures and control fan speeds — built with SwiftUI","archived":false,"fork":false,"pushed_at":"2026-01-16T00:17:40.000Z","size":16263,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-17T05:21:11.040Z","etag":null,"topics":["fan","fan-speed-control","macos","swift","swiftui"],"latest_commit_sha":null,"homepage":"https://mohamadlounnas.github.io/ffan/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohamadlounnas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-12T04:10:28.000Z","updated_at":"2026-01-16T16:58:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mohamadlounnas/ffan","commit_stats":null,"previous_names":["mohamadlounnas/ffan"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/mohamadlounnas/ffan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamadlounnas%2Fffan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamadlounnas%2Fffan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamadlounnas%2Fffan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamadlounnas%2Fffan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohamadlounnas","download_url":"https://codeload.github.com/mohamadlounnas/ffan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamadlounnas%2Fffan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28526566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fan","fan-speed-control","macos","swift","swiftui"],"created_at":"2026-01-18T00:33:27.384Z","updated_at":"2026-01-19T03:00:40.245Z","avatar_url":"https://github.com/mohamadlounnas.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ffan - Fan Control for macOS\n\nA lightweight menu bar app for monitoring CPU/GPU temperatures and controlling fan speeds on macOS.\n\n\u003c!-- banner --\u003e\n![ffan banner](https://raw.githubusercontent.com/mohamadlounnas/ffan/main/docs/assets/banner.png)\n\n## Download\n\n[**Download Latest Version (v1.3.0)**](https://github.com/mohamadlounnas/ffan/releases/latest)\n\n**Quick Start:**\n1. Download the DMG from the link above\n2. Drag ffan.app to /Applications/\n3. Launch the app and click \"Install Helper\" when prompted\n4. Enter your password once - that's it!\n\n## Features\n\n- 🌡️ **Temperature Monitoring**: Real-time CPU and GPU temperature readings\n- 💨 **Fan Speed Control**: Manual fan speed adjustment or automatic temperature-based control\n- 📊 **Visual Feedback**: Color-coded temperature indicators and speed gauges\n- 🚀 **Launch at Login**: Automatic startup support using modern ServiceManagement API\n- 🎨 **Modern UI**: Liquid glass design with SwiftUI\n\n## Requirements\n\n- macOS 13.0 or later (for full functionality)\n- macOS 11.0 minimum (with limited features)\n\n## Important Notes\n\n### SMC Access\n\nThis app accesses the System Management Controller (SMC) to read temperatures and control fans. Due to macOS security restrictions:\n\n1. **Temperature Reading**: Works on most Macs without special privileges\n2. **Fan Control**: Requires root/admin privileges on modern macOS versions\n\n### Helper Tool Installation\n\nOn first launch, the app will prompt you to install a helper tool. This is a **one-time setup**:\n\n- Click \"Install Helper\" in the app\n- Enter your admin password once\n- The helper tool enables fan control without repeated password prompts\n\n**Alternative:** Automated installation via Terminal\n```bash\ncurl -fsSL https://raw.githubusercontent.com/mohamadlounnas/ffan/main/scripts/install.sh | bash\n```\n\nThis script downloads the latest version, installs the app, sets up the helper tool, and launches ffan automatically.\n\n### Demo Mode\n\nIf you want to test the UI without installing the helper tool, enable Demo Mode from the app menu to see simulated data.\n\n## Architecture\n\n### Files\n\n- **fanApp.swift**: Main app entry point and AppDelegate\n- **SystemMonitor.swift**: SMC communication for temperature and fan speed readings\n- **FanController.swift**: Fan speed control logic (manual and automatic modes)\n- **FanControlViewModel.swift**: Main view model with Combine bindings\n- **PermissionsManager.swift**: SMC access checking and permission dialogs\n- **LaunchAtLoginManager.swift**: Login item registration (SMAppService for macOS 13+)\n- **StatusBarManager.swift**: Menu bar icon and popover management\n- **PopoverView.swift**: Main UI container\n- **TemperatureView.swift**: Temperature display component\n- **FanSpeedView.swift**: Fan speed display and slider\n- **ControlModeView.swift**: Mode selection and settings\n\n### SMC Keys Used\n\n**Temperature Sensors:**\n- `TC0P`, `TCXC`, `TC0E`, `TC0F`, `TC0D`, `TC1C-TC4C` - CPU temperatures\n- `TGDD`, `TG0P`, `TG0D`, `TG0E`, `TG0F` - GPU temperatures\n- `Tp09`, `Tp0T`, `Tp01`, `Tp05`, `Tp0D`, `Tp0b` - Apple Silicon temperatures\n\n**Fan Control:**\n- `F0Ac`, `F1Ac`, etc. - Actual fan speed\n- `F0Mn`, `F0Mx` - Min/Max fan speed\n- `F0Tg` - Target fan speed (for manual control)\n- `F0Md` - Fan mode (0=auto, 1=manual)\n- `FS! ` - Force bits for manual control\n\n## Control Modes\n\n### Manual Mode\n- Set a fixed fan speed using the slider\n- Speed is maintained regardless of temperature\n\n### Automatic Mode\n- Fan speed adjusts based on temperature threshold\n- Below threshold: System manages fans\n- Above threshold: Linear interpolation to max speed\n- Critical (95°C+): Maximum fan speed\n\n## Build Configuration\n\nThe project uses:\n- Sandbox: **Disabled** (required for SMC access)\n- Hardened Runtime: **Enabled**\n- IOKit Framework: Linked\n- ServiceManagement Framework: Linked\n\n## Known Limitations\n\n1. **Apple Silicon Macs**: SMC structure may differ; some temperature keys may not work\n2. **Fan Control**: Writing to SMC requires elevated privileges\n3. **Sandbox**: Must be disabled for SMC access; not suitable for App Store\n\n## License\n\nThis project is provided as-is for educational purposes.\n\n## Troubleshooting\n\n### No Temperature Data\n- Ensure the app has SMC access (not sandboxed)\n- Try running with sudo for full access\n- Enable Demo Mode to test the UI\n\n### Fan Control Not Working\n- Fan control requires root privileges on modern macOS\n- Run with `sudo` or create a privileged helper tool\n\n### App Not Appearing in Menu Bar\n- Check if the app is running in Activity Monitor\n- Look for the fan icon in the menu bar\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamadlounnas%2Fffan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamadlounnas%2Fffan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamadlounnas%2Fffan/lists"}