A recent kernel update (to 6.11.0) brought with the awareness of sensor jc42, which monitors the temperature of DIMMs. I discovered it by the following entry in the system journal:
2024-10-01T10:34:40-07:00 sma-station14l sensord[148139]: Sensor alarm: Chip jc42-i2c-6-1b: DIMM Temp: 40.2 C (min = 0.0 C, max = 0.0 C) [ALARM]
The min and max values are not appropriate values. I created a conf file for jc42, jc42.conf, since none was standard in sensors3.conf and added it to /etc/sensors.d/. Contents:
# Chip: jc42-i2c-6-1b
# Adapter: SMBus PIIX4 adapter port 0 at 0b00
#
chip "jc42-*"
label "temp1" "DIMM Temp"
set temp1_min 00
set temp1_max 60
set temp1_max_hyst 56
#
The only entry that had an effect is “label.” The set commands do nothing.
sysfs parameters are not permanent, after a reboot they are gone so I would just give it a try (as root)
On how to set these parameters “normally”
Module parameters are like kernel parameters, but they specify a particular component of the kernel, usually a specific driver. Despite the name, these parameters apply whether the corresponding driver is compiled directly in the kernel or as a module. When the component is included in the main kernel image, you need to pass COMPONENT_NAME.PARAMETER_NAME=VALUE on the kernel command line. When the component is loaded as a module, you need to pass PARAMETER_NAME=VALUE to insmod.
No luck there. I modified the temp1_max file, setting it to 40; it was immediately reverted to 0.
I read “Change kernel parameters at runtime.” Oof. Browsing source files and system settings yielded very little for modifying jc42 values. I suspect naming conventions have changed in the 10 years since that was written.
I finally gave up; I added “ignore temp1” to the jc42.conf file. Along with “label” the “ignore” command worked as well. There is no temperature value in the system journal, and there is no alarm, which is what I ultimately wanted.
The units used by hwmon temperature attributes are millidegree Celsius. Also, the chip itself has more coarse resolution, so 60 is likely rounded down to 0. 60°C would be 60000 (may be slightly off due to chip resolution).
Do not use editor on sysfs attributes. sysfs is not designed to be editable. You are expected to write the whole value atomically and who knows what editors do.