Linux In 2020 Can Finally Provide Sane Monitoring Of SATA Drive Temperatures
Written by Michael Larabel in Hardware on 12 January 2020 at 12:35 PM EST. 33 Comments
HARDWARE --
Here is another long overdue kernel change... For more than a decade there have been patches trying to get SATA/SCSI drive temperature monitoring working nicely within the Linux kernel but none of that work ever made it through for mainlining. That has left various user-space tools to provide the functionality, but in doing so that has required root access and not to mention the need to first install said utilities. Well, with Linux 5.6 in 2020, there is finally a proper drive temperature driver for disks and solid-state drives with temperature sensors.

It took until the current Linux 5.5 cycle to see a kernel driver for NVMe drive temperatures to avoid having to run third-party utilities as root in user-space while now for Linux 5.6 will be the support for even older SATA/SCSI drives with the new "drivetemp" driver.


Programs like smarttools and hddtemp have provided the same functionality before but with having to run them as root is a nuisance for security as well as less than stellar integration with various Linux sensor monitoring programs. But with Linux 5.6 the drivetemp driver will report HDD/SSD drive temperatures via the common HWMON infrastructure. Besides the benefits of no longer needing super user privileges to see drive temperatures and now nice integration with HWMON for unified thermal reporting, this now also opens it up for other areas of the kernel to see current drive temperatures should they be interested. Linux user-space programs that read HWMON/sysfs interfaces already can now elegantly begin reporting SATA drive temperatures.

The driver uses the ATA SCT Command Transport to read the drive temperature with a fallback of reading the SMART information. Some older ATA disk drives may not have the necessary sensors, but this should allow most newer drives to properly now have their temperatures reported (plus the newer NVMe drives with the Linux 5.5 kernel already).

The "drivetemp" driver can be configured with SENSORS_DRIVETEMP come Linux 5.6. For now the driver is resting in the hwmon area while awaiting the Linux 5.6 merge window in a few weeks.

More background information on the earlier Linux kernel patch attempts for SATA drive temperature reporting and the struggles endured can be found from this earlier kernel mailing list post when HWMON maintainer Guenter Roeck was first presenting this new driver.

What else is on your personal wishlist for "it took the Linux kernel this many years?!?" to complete? Let us know in the forums. Multipatch TCP is another feature coming to Linux 5.6 too that is seemingly many years late and years after other kernels have offered MPTCP functionality. Linux 5.6 should also be a mega kernel with the likes of USB4 support and WireGuard.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week