Category Archives: tutorial

ASUS z97-E/USB 3.1: Motherboard Sensors and Thermal Control on OpenSUSE 13.2

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:

sensors

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.

Ubuntu 14.04 on a Macbook 2.1

The hard drive on an old white Macbook (v2.1) died recently so I went through the adventure of recovering data from it (needed to image the drive with dd conv=sync,noerror) and then reinstalling the OS. But I ran into some troubles with OS X 10.5. Some of the programs that one may like to use (e.g. Skype) are no longer supported and I would have had to buy the upgrade to at least 10.6. Rather than do that, I opted to install Ubuntu 14.04 instead.

First step in the installation was to burn a copy of Ubuntu 14.04 onto a DVD. Weird thing to do since I’m used the USB installation stuff that we typically now do. I grabbed the “64-bit Mac (AMD64) desktop” image DVD image file from here. It is important to grab the mac specific image because you may find the regular image will fail to install due to a firmware incompatibility with the EFI bootloader (lost the citation on this one). With the DVD in the Macbook, start it up and hold “c” to boot from the DVD.

The Ubuntu installation will be typical. Once finished, there’s a couple things you need to do post install:

  1. Install the mactel team’s fan support, otherwise you may notice your macbook fan runs at 100% all the time.
  2. Install the iSight firmware so that you can use your webcam. To do this, you must:
    1. Grab the firmware file (AppleUSBVideoSupport) from here (remove the .pdf first, wordpress wouldn’t let me host it without), or if you have a Mac OSX 10.4 or 10.5 installed, you can get the firmware file at:
      /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport
    2. Make sure you know where you’ve downloaded/copied the AppleUSBVideoSupport to.
    3. Install the iSight firmware tools with: sudo apt-get install isight-firmware-tools. This will cause the software to ask for the path to the firmware file. If you have it on your desktop, the path would be /home/username/Desktop/AppleUSBVideoSupport.
    4. Reboot, and you are done!
  3. That’s it! Everything else seems to work just fine right out of the box.

Now one can get more life out of that Macbook without having to spend any cash on upgrading OS X.