{"id":24998912,"url":"https://github.com/thiswillbeyourgithub/fancontrol_autohealing_config","last_synced_at":"2025-03-29T18:11:56.922Z","repository":{"id":269584416,"uuid":"907785533","full_name":"thiswillbeyourgithub/fancontrol_autohealing_config","owner":"thiswillbeyourgithub","description":"A Linux utility script that automatically updates hwmon device numbers in fancontrol configuration to ensure persistent fan control across system reboots.","archived":false,"fork":false,"pushed_at":"2025-03-04T11:19:27.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T12:26:11.535Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thiswillbeyourgithub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-12-24T11:36:30.000Z","updated_at":"2025-03-04T11:19:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"b0dd2849-437c-473b-ad28-a1684e0e777a","html_url":"https://github.com/thiswillbeyourgithub/fancontrol_autohealing_config","commit_stats":null,"previous_names":["thiswillbeyourgithub/fancontrol_autohealing_config"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2Ffancontrol_autohealing_config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2Ffancontrol_autohealing_config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2Ffancontrol_autohealing_config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2Ffancontrol_autohealing_config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thiswillbeyourgithub","download_url":"https://codeload.github.com/thiswillbeyourgithub/fancontrol_autohealing_config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246223331,"owners_count":20743167,"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":[],"created_at":"2025-02-04T18:52:17.092Z","updated_at":"2025-03-29T18:11:56.911Z","avatar_url":"https://github.com/thiswillbeyourgithub.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fancontrol Parser\n\nA Python utility to automatically update hwmon device numbers in the fancontrol configuration file when they change after system reboot.\n\n## Background\n\nOn Linux systems using lm-sensors and fancontrol, the hwmon device numbers (e.g., hwmon0, hwmon1) can change between reboots. This causes the fancontrol service to fail since it relies on these device numbers in its configuration. This script automatically detects and updates these numbers, ensuring your fan control settings persist across reboots.\n\n## Features\n\n- Automatically detects current hwmon numbers for coretemp and fan devices\n- Updates the fancontrol configuration file with new device numbers\n- Restarts the fancontrol service automatically\n- Dry run mode to preview changes\n- Quiet mode for silent operation\n- Safety checks to prevent unnecessary updates\n\n## Prerequisites\n\n- Python 3\n- lm-sensors and fancontrol packages installed\n- Root privileges (for modifying /etc/fancontrol)\n\n## Installation\n\n1. Clone this repository:\n```bash\ngit clone https://github.com/thiswillbeyourgithub/fancontrol-parser.git\n```\n\n## Usage\n\n```bash\nsudo python3 fancontrol_parser.py [--quiet] [--apply]\n```\n\nOptions:\n- `--quiet, -q`: Suppress output messages\n- `--apply, -a`: Apply changes (without this flag, runs in dry-run mode)\n\n## Example\n\n```bash\nsudo python3 fancontrol_parser.py --apply\n```\n\nThis will:\n1. Check if fancontrol service is already running\n2. Find current hwmon numbers for coretemp and fan devices\n3. Update the configuration if numbers have changed\n4. Restart the fancontrol service\n\n## Automatic Execution\n\nYou can add this script to your system's startup sequence to ensure fan control works correctly after every reboot. One way to do this is by creating a systemd service that runs before the fancontrol service:\n\n```bash\n# Create a systemd service file\nsudo nano /etc/systemd/system/fancontrol-parser.service\n```\n\nAdd the following content:\n\n```\n[Unit]\nDescription=Update hwmon device numbers in fancontrol config\nBefore=fancontrol.service\nAfter=multi-user.target\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/python3 /path/to/fancontrol_parser.py --apply\n\n[Install]\nWantedBy=multi-user.target\n```\n\nThen enable the service:\n\n```bash\nsudo systemctl enable fancontrol-parser.service\n```\n\n## License\n\nGPLv3\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiswillbeyourgithub%2Ffancontrol_autohealing_config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiswillbeyourgithub%2Ffancontrol_autohealing_config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiswillbeyourgithub%2Ffancontrol_autohealing_config/lists"}