Skip to content

Added SATA drive temperature monitoring, requires hddtemp#1

Open
ghalfacree wants to merge 2 commits intoArgon40Tech:masterfrom
ghalfacree:master
Open

Added SATA drive temperature monitoring, requires hddtemp#1
ghalfacree wants to merge 2 commits intoArgon40Tech:masterfrom
ghalfacree:master

Conversation

@ghalfacree
Copy link

@ghalfacree ghalfacree commented Mar 11, 2022

This PR adds the ability to monitor the temperature of SATA drives connected to the Argon Eon and trigger the fan accordingly.

It requires hddtemp; this has been added to tutorials/install-dependencies.sh but has not been added to the official install script, as that's not part of this repository.

The code adds a new function, argonsysinfo_gethddtemp(): this goes through all disks found in /dev/disk/by-id which begin with ata, indicating an ATA or SATA type, and queries them one-by-one for the current temperature using hddtemp. Each time, the disk's temperature is compared to the highest previously-seen temperature; if the latest disk is hotter, that becomes the new highest. At the end, the highest-seen temperature is returned as a float for compatibility with the argononed.py script.

To minimise complexity and maintain compatibility with the existing fan configuration format, the new monitoring feature is integrated into argononed.py as simply as possible: the argonsysinfo_gethddtemp() function is queried for the hottest-running hard drive; if the drive is hotter than the CPU, the drive's temperature replaces the CPU temperature for the purpose of fan control (but not for the CPU temperature screen on the OLED.)

Thus the fan is now triggered by either the CPU temperature or the hard drive temperature, whichever is greater. As a result, IO-intensive operations which increase hard drive temperature without putting strain on the CPU will still activate the fan - preventing the drives from overheating. Hopefully.

I'd recommend setting the activation temperature to a few degrees below peak operating temperature for the drives. I've been using:

#
# Argon Fan Configuration
#
# Min Temp=Fan Speed
40=50
60=80
70=100

If this PR is merged and it becomes a standard feature, please ensure you add hddtemp to the install script.

Thanks for reading!

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