https://github.com/aranbarri/linux-fan-check
A Linux GUI-based script that checks for fan presence on startup and prompts the user to shut down the system if no fan is detected. Compatible with any Linux desktop environment.
https://github.com/aranbarri/linux-fan-check
arduino fan fan-control gnome hardware-monitoring linux linux-desktop raspberry-pi thermal-protection ubuntu-desktop
Last synced: 3 months ago
JSON representation
A Linux GUI-based script that checks for fan presence on startup and prompts the user to shut down the system if no fan is detected. Compatible with any Linux desktop environment.
- Host: GitHub
- URL: https://github.com/aranbarri/linux-fan-check
- Owner: aranbarri
- Created: 2025-07-23T15:54:31.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-24T08:28:36.000Z (11 months ago)
- Last Synced: 2025-07-31T17:02:25.138Z (11 months ago)
- Topics: arduino, fan, fan-control, gnome, hardware-monitoring, linux, linux-desktop, raspberry-pi, thermal-protection, ubuntu-desktop
- Language: Shell
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Startup Fan Checker for Linux
This script runs at system startup/login and checks if a cooling fan is present on a Linux system.
If no fan is detected during startup, it shows a graphical prompt asking the user whether to shut down the system.

## Features
- Detects fan presence via:
- hwmon sensors
- `/boot/firmware/config.txt` overlay (`dtoverlay=gpio-fan`)
- `dmesg` logs
- manually labeled GPIO pins
- If no fan is detected, shows a GUI confirmation dialog (via Zenity)
- Logs to `/var/log/fan_check.log`
## Requirements
- Any Linux distribution with a graphical environment (X11 or Wayland)
- `zenity` installed (for the GUI window)
- `shutdown` command available
## Installation
1. Install Zenity:
```bash
sudo apt install zenity
```
2. Copy the script to a permanent location:
```bash
sudo cp check_fan.sh /usr/local/bin/
sudo chmod +x /usr/local/bin/check_fan.sh
```
3. To run on login (autostart), copy the desktop entry:
```bash
mkdir -p ~/.config/autostart
cp fan-check.desktop ~/.config/autostart/
```
## Manual Execution
You can run the script manually at any time:
```bash
/usr/local/bin/check_fan.sh
```
Check the logs after executing.
## Logging
All events and decisions are logged to:
```
/var/log/fan_check.log
```
## License
MIT License