{"id":20168299,"url":"https://github.com/ivansafonov/fanctl","last_synced_at":"2025-04-10T01:52:40.846Z","repository":{"id":215794351,"uuid":"739794655","full_name":"IvanSafonov/fanctl","owner":"IvanSafonov","description":"Service to control fan speed on linux","archived":false,"fork":false,"pushed_at":"2024-09-28T04:29:28.000Z","size":59,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T03:34:49.484Z","etag":null,"topics":["cpu","fan","fan-control","hwmon","temperature","thinkpad"],"latest_commit_sha":null,"homepage":"","language":"Go","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/IvanSafonov.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2024-01-06T15:11:04.000Z","updated_at":"2025-03-06T11:17:54.000Z","dependencies_parsed_at":"2024-01-10T18:36:59.423Z","dependency_job_id":null,"html_url":"https://github.com/IvanSafonov/fanctl","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"35e5312f0923a8defddfc4c3b85f50da9ddabeab"},"previous_names":["ivansafonov/fanctl"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanSafonov%2Ffanctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanSafonov%2Ffanctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanSafonov%2Ffanctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanSafonov%2Ffanctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IvanSafonov","download_url":"https://codeload.github.com/IvanSafonov/fanctl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142941,"owners_count":21054671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cpu","fan","fan-control","hwmon","temperature","thinkpad"],"created_at":"2024-11-14T01:07:14.524Z","updated_at":"2025-04-10T01:52:40.818Z","avatar_url":"https://github.com/IvanSafonov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚠️ Warning ⚠️\n\nYou use it at your own risk. Overheating can destroy your hardware.\n\n# 💡 About\n\nThat's a small service to control fan speed. It reads temperature sensors and current power profile and maps them to fan level. Mapping is set by the configuration file. There is no user interface, and there is no plan to make one.\n\nMain features:\n\n* Multiple fans and sensors.\n* Power profile support.\n* Delay before changing fan speed.\n* Change fan level before sleep/suspend.\n\nOriginally created for Thinkpad T14 gen 4 (Intel). There is [thinkfan](https://github.com/vmatare/thinkfan), but it does not support power profiles.\n\nThere are other fan [speed control tools](https://wiki.archlinux.org/title/fan_speed_control).\n\nAdding new drivers and other improvements are welcome.\n\n# ⚙️ Supported drivers\n\nFor now it support only thinkpads, but it's not that hard to add new drivers.\n\n## 💻  Thinkpad ACPI Fan\n\n❗Fan control is disabled by default. You need to enable it.\n\n```bash\necho \"options thinkpad_acpi fan_control=1\" | sudo tee -a /usr/lib/modprobe.d/thinkpad_acpi.conf\nsudo modprobe thinkpad_acpi\n```\n\n#### Links\n\n* [Arch wiki](https://wiki.archlinux.org/title/fan_speed_control#ThinkPad_laptops)\n* [Thinkpad acpi documentation](https://www.kernel.org/doc/Documentation/laptops/thinkpad-acpi.txt)\n\n## 🌡️ Hwmon sensors\n\nIt should work on every device, but you need to find sensor name and label.\n\n```bash\ntail -n 1 $(ls /sys/class/hwmon/hwmon*/{name,temp*_label,temp*_input} | sort)\n```\n\n#### Links\n\n* [Hwmon kernel documentation](https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface)\n\n## 🚀 Profile platform\n\nThere is a file `/sys/firmware/acpi/platform_profile` that contains current power profile. In KDE and GNOME you can control current profile from the user interface.\n\n```bash\n# To see available profiles\ncat /sys/firmware/acpi/platform_profile_choices\n```\n\n#### Links\n\n* [Kernel commit](https://patchwork.kernel.org/project/linux-acpi/patch/20201218174759.667457-2-markpearson@lenovo.com/)\n\n# 🧪 Configuration\n\nThere is [conf/fanctl.yaml](conf/fanctl.yaml) file with all available parameters and some explanation. You can use it to create your own config.\n\n[conf/thinkpad.yaml](conf/thinkpad.yaml) is an example I tested on T14.\n\nBinary file has `-d` flag which enables debug logs. And `-c` flag to pass the config file path.\n\n```bash\nsudo fanctl -d -c ./conf/fanctl.yaml\n```\n\n# 📦 Install\n\n## Manual\n\nInstall [latest version of go](https://go.dev/doc/install)\n\n```bash\ncd ./fanctl\ngo build -o fanctl ./cmd/fanctl\nsudo cp ./fanctl /usr/sbin/fanctl\nsudo cp ./systemd/* /lib/systemd/system/\nsudo cp ./conf/fanctl.yaml /etc/\n# Change /etc/fanctl.yaml according to your hardware\nsudo systemctl enable fanctl.service fanctl-wakeup.service fanctl-suspend.service\nsudo systemctl start fanctl\n# Check service status\nsudo systemctl status fanctl\n```\n\n## Deb package\n\nDownload deb package [here](https://github.com/IvanSafonov/fanctl/releases) and install. \n\n```bash\nsudo apt install ./fanctl*.deb\n# Change /etc/fanctl.yaml according to your hardware\nsudo systemctl enable fanctl.service fanctl-wakeup.service fanctl-suspend.service\nsudo systemctl start fanctl\n# Check service status\nsudo systemctl status fanctl\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivansafonov%2Ffanctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivansafonov%2Ffanctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivansafonov%2Ffanctl/lists"}