Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

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.

ChatGPT Image 23 jul 2025, 18_08_36

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:

    sudo apt install zenity
  2. Copy the script to a permanent location:

    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:

    mkdir -p ~/.config/autostart
    cp fan-check.desktop ~/.config/autostart/

Manual Execution

You can run the script manually at any time:

/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

About

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.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages