Skip to content

Add Super I/O (motherboard) fan support via hwmon - #2120

Open
Reckless5040 wants to merge 6 commits into
flightlessmango:masterfrom
Reckless5040:master
Open

Add Super I/O (motherboard) fan support via hwmon#2120
Reckless5040 wants to merge 6 commits into
flightlessmango:masterfrom
Reckless5040:master

Conversation

@Reckless5040

@Reckless5040 Reckless5040 commented Aug 25, 2026

Copy link
Copy Markdown

Summary

  • Adds a new cfan overlay element that auto-detects and reads chassis/CPU/system fan RPM from Super I/O chips (Nuvoton/ITE/Fintek/Winbond/SMSC) via Linux hwmon, independent of the existing Steam Deck-only fan element
  • Adds fan_custom_sensor / cfan_custom_sensor config options (shared parser) to manually pick a specific chip,input[,label] sensor, supporting multiple labelled fans
  • Adds a dedicated cfan_color so the new element's label isn't forced to share fan_color
  • Fixes a pre-existing bug where fan_color/cfan_color were missing from the 0xRRGGBB→ImGui color swizzle table (red/blue channels were swapped)

Details

See FAN_SUPERIO.md for the full rationale and a before/after table of touched files.

Test plan

  • Build with meson/ninja on a desktop system with a Super I/O hwmon device present
  • Verify cfan=1 auto-detects and displays a sensible RPM
  • Verify cfan_custom_sensor selects a specific chip/input and supports multiple fans
  • Verify fan (Steam Deck) behavior is unchanged
  • Verify fan_color/cfan_color render with correct (non-swapped) RGB

Disclosure: This code and PR description were written with the help of an AI coding assistant (Claude).

Reckless5040 and others added 6 commits June 14, 2026 00:19
Auto-detect Super I/O chips (Nuvoton/ITE/Fintek/Winbond/SMSC) through
hwmon in addition to the Steam Deck fan, and add a fan_custom_sensor
option to select specific chip,input[,label] sensors (multi-fan capable).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Keep 'fan' for the Steam Deck APU fan and add a new 'cfan' element for
custom / Super I/O chip fans. cfan auto-detects a Super I/O chip or uses
fan_custom_sensor; update_fan() now resolves fan_sensors (Steam Deck) and
cfan_sensors (Super I/O) separately.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cfan now uses its own cfan_color (default eb5b5b) instead of sharing
fan_color.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Make the custom-sensor options symmetric: fan_custom_sensor drives the
'fan' element (else Steam Deck auto-detect) and cfan_custom_sensor drives
'cfan' (else Super I/O auto-detect). Both share a parser via a
parse_cfan_custom_sensor alias. Also fixes update_fan() so it runs when
either fan or cfan is enabled.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
These two were missing from the color fix-up array, so their red and
blue channels were swapped when rendered. Add them and bump the array
size 24->26.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant