Added SATA drive temperature monitoring, requires hddtemp#1
Open
ghalfacree wants to merge 2 commits intoArgon40Tech:masterfrom
Open
Added SATA drive temperature monitoring, requires hddtemp#1ghalfacree wants to merge 2 commits intoArgon40Tech:masterfrom
ghalfacree wants to merge 2 commits intoArgon40Tech:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 totutorials/install-dependencies.shbut 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-idwhich begin withata, indicating an ATA or SATA type, and queries them one-by-one for the current temperature usinghddtemp. 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 theargononed.pyscript.To minimise complexity and maintain compatibility with the existing fan configuration format, the new monitoring feature is integrated into
argononed.pyas simply as possible: theargonsysinfo_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:
If this PR is merged and it becomes a standard feature, please ensure you add
hddtempto the install script.Thanks for reading!