Skip to content

system-monitor-graph@rcassani: Add CPU fan monitoring - #1868

Merged
claudiux merged 6 commits into
linuxmint:masterfrom
karthikmudaliarX:agent/add-cpu-fan-monitoring
Jul 22, 2026
Merged

system-monitor-graph@rcassani: Add CPU fan monitoring#1868
claudiux merged 6 commits into
linuxmint:masterfrom
karthikmudaliarX:agent/add-cpu-fan-monitoring

Conversation

@karthikmudaliarX

@karthikmudaliarX karthikmudaliarX commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

What

  • add CPU Fan as its own selectable graph under the CPU variables
  • show the current RPM with a green On state, and a clean red Off state without a misleading 0 RPM value
  • use a slightly smaller RPM readout so four-digit fan speeds fit comfortably
  • normalize RPM to a fixed 0–4000 graph range and reuse the standard single-series renderer
  • prefer CPU/processor-labelled sensors, with a conservative Dell/ThinkPad primary-fan fallback
  • rediscover stale hwmon paths after read failures and retry initial discovery with capped backoff when the driver is not ready yet
  • update desklet metadata, documentation, the combined screenshot, and gettext catalogs

Why

A separate graph makes fan activity over time visible without mixing RPM into the CPU-temperature scale. Conservative sensor selection avoids mislabelling arbitrary chassis, GPU, PSU, or pump fans.

Screenshot

CPU Fan graphs showing running and stopped states

Captured on Linux Mint 22.3 / Cinnamon 6.6.7 using the dell_smm hwmon driver.

Verification

  • node --check system-monitor-graph@rcassani/files/system-monitor-graph@rcassani/desklet.js
  • GJS/CJS parser check
  • ./validate-spice system-monitor-graph@rcassani
  • JSON validation and msgfmt --check for every translated catalog
  • translation-preservation check to reject incorrect fuzzy matches
  • git diff --check
  • live hardware smoke tests for real positive-RPM and stopped-fan states; the installed source is sensor-backed

Known limitation

The repository has no automated Cinnamon desklet test harness for sysfs sensor variants. Zero, positive, missing, stale-path, and delayed-driver behavior were reviewed and hardware-smoke-tested but are not covered by unit tests. RPM values above 4000 remain numerically accurate but are clipped at the graph ceiling by design.

cc @rcassani

@rcassani

Copy link
Copy Markdown
Contributor

I do not have the hardware to test this. Please provide some screenshots for of the desklet looks with this addition.

In other thought, the fan status-speed is a variable, to me it makes more sense to have it's on graph, with the title:

"CPU Fan speed xxx RPM [spaces] 🟢 On / 🔴 Off",

then it would be possible to also see the history of the activity of the fan.

@karthikmudaliarX

Copy link
Copy Markdown
Contributor Author

@rcassani how does it look now

@karthikmudaliarX
karthikmudaliarX marked this pull request as ready for review July 21, 2026 15:42

@rcassani rcassani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @karthikmudaliarX, thank you so much for this feature, it is looking great. Please find here some of my comments, after addressing this is should be good to be merged.

Comment thread system-monitor-graph@rcassani/README.md
Comment thread system-monitor-graph@rcassani/README.md Outdated
Comment thread system-monitor-graph@rcassani/files/system-monitor-graph@rcassani/desklet.js Outdated
Comment thread system-monitor-graph@rcassani/files/system-monitor-graph@rcassani/desklet.js Outdated
Comment thread system-monitor-graph@rcassani/files/system-monitor-graph@rcassani/desklet.js Outdated
Comment thread system-monitor-graph@rcassani/files/system-monitor-graph@rcassani/desklet.js Outdated
Comment thread system-monitor-graph@rcassani/files/system-monitor-graph@rcassani/desklet.js Outdated
@claudiux
claudiux marked this pull request as draft July 21, 2026 23:13

@rcassani rcassani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karthikmudaliarX, for some reason this comment was not published in the previous review

Comment thread system-monitor-graph@rcassani/files/system-monitor-graph@rcassani/desklet.js Outdated
@claudiux

Copy link
Copy Markdown
Member

Please resolve all conversations.

@claudiux
claudiux marked this pull request as ready for review July 22, 2026 10:25
@claudiux

Copy link
Copy Markdown
Member

@rcassani Is all that OK for you?

@rcassani rcassani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claudiux,

  • The PR is ready once this small typo is addressed
  • I do not have the hardware to test any of the options for CPU Fan detection. The code works well without Fan reported in hwmon
  • If @karthikmudaliarX confirms the two options for CPU Fan detection are working properly the PR can be merged

Thank you both!

"Usage" : "usage",
"Temperature" : "temperature"
"Temperature" : "temperature",
"Fan Speed" : "fan"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change in the desklet settings was overseen:
Fan Speed --> Fan

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the settings label from Fan Speed to Fan.

For the hardware check, I’ve only been able to validate the Dell dell_smm fallback on my laptop. I tested it with the fan both running and stopped, and it works correctly. My machine doesn’t expose a CPU/processor-labelled fan sensor, so I haven’t been able to test that detection path on actual hardware.

Thanks for the review!

@rcassani

Copy link
Copy Markdown
Contributor

@claudiux this is ready to be merged, thanks

@claudiux
claudiux merged commit 462484e into linuxmint:master Jul 22, 2026
4 checks passed
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.

3 participants