I recently put together a new desktop computer at work for data analysis for my supervisor. Here’s the parts list:
- ASUS Z97-E/USB 3.1 motherboard
- Intel i7-4790 processor
- 32GB Crucial CAS 8 RAM
- 2 Western Digital Black Series 1 TB HDDs
- Rosewill Glacier 500M Power Supply
- ASUS DVD Writer
- NZXT S210-001 ATX Tower Case
- Arctic Freezer 7 Pro CPU Fan/Heatsink
It’s a really solid processing machine and the Z97 is capable of clocking the RAM up to 1600MHz from 1333MHz using the built-in XMP. With water cooling, the Z97 could probably stably overclock the i7 up to 4.5 GHz (currently at 4 GHz). Since this machine will be used for heavy and prolonged computations, I wanted to make sure the fans were running sufficiently well to keep the i7 cool. To do this, we need to be able to monitor the fan speed and CPU temperature sensors.
The machine is running linux, specifically OpenSUSE 13.2. While I’ll focus on SUSE, this should work on any linux distribution so long as one uses the appropriate distribution specific commands. I am going to assume that the reader knows how to install software packages on SUSE 13.2. To read the CPU temperature and fan speeds, this is what I did:
1. Install lm-sensors
First I installed the lm-sensors package. The Z97-E has a Nuvoton NCT5538D that is used for fan speed measurements and control. In order for lm-sensors to read the NCT5538D we need to make sure the nct6775 kernel module is loaded (use
modprobe nct6775 to immediately load it). To load the module on system start up we can either add nct6775 module to the /etc/modprobe.d/99-local.conf, or by running
sensors-detect and following the instructions. If you use
sensors-detect then you must make sure that the
lm_sensors service is enabled and running:
systemctl enable lm_sensors
systemctl start lm_sensors
2. Modify grub Boot Options
Next we need to add the following to the
GRUB_CMDLINE_LINUX_DEFAULT variable in the /etc/default/grub file: acpi_enforce_resources=lax (Many thanks to http://lists.lm-sensors.org/pipermail/lm-sensors/2014-November/042908.html for the tip). After modifying the file, we have to make sure that grub is updated by using:
grub2-mkconfig -o /boot/grub2/grub.cfg.
3. Add an Entry to lm-sensors Config File (Fixed dead link: 6 December, 2015)
We now need to add an entry to the sensors configuration file. The nct6775 kernel module supports the NCT5538D chip via code for the Nuvoton NCT6791D, but we need to tell lm-sensors how to display the data it reads from the chip. Someone else already figured out the configuration for the Z97-A so I just used that and it seems to work. I added the entry discussed in the link for the Z97-A to the /etc/sensors3.conf file.
4. See If lm-sensors Works
You may want to reboot the computer at this point. We can now test to see if lm-sensors is set up correctly. If it is, when we run the
sensors command in a terminal, we should see something that looks like this:
Terminal output from executing the sensors command.
5. Optional: Set the Fan Speeds
First, BE VERY CAREFUL WITH THIS. You can easily damage your processor if you mess up the fan control. Also, it’s not my fault if you do.
Now we can modify the modes that the fan speeds will be adjusted with. For example, to set the fans to Smart Fan Mode 4, we can use a command like
echo 5 > /sys/class/hwmon/hwmon3/pwm2_enable for each of the fans by replacing pwm2 with the appropriate number (see here for the location of the PWM for the fans and here for information on the supported fan modes for the nct6775 kernel module). Be VERY careful while doing this. I recommend having a terminal open running
watch -n1 sensors so that you can monitor fan speed and CPU temperature while playing with the fan control. It took me some trial and error to figure out which pwm# controlled which fan. If you have any questions about this process, feel free to leave a comment.