Wednesday, July 10, 2013

Fan control with nouveau

I recently switched over to the nouveau driver for my Nvidia graphics card. I had been using the proprietary blob simply because it would slow the GPU fan when idle. However, with recent kernels, nouveau now has this ability too. You just have to enable it via sysfs.

For example, on my system, I locate the proper sysfs file:

% find /sys -name pwm1_enable
/sys/devices/pci0000:00/0000:00:02.0/0000:01:00.0/hwmon/hwmon2/pwm1_enable
/sys/devices/platform/it87.552/pwm1_enable
% readlink /sys/devices/pci0000:00/0000:00:02.0/0000:01:00.0/driver
../../../../bus/pci/drivers/nouveau

Then I can set the fan mode to auto (2):

# echo 2 > /sys/devices/pci0000:00/0000:00:02.0/0000:01:00.0/hwmon/hwmon2/pwm1_enable

A better approach is to utilize a udev rule to do the job.

% cat /etc/udev/rules.d/50-nouveau-hwmon.rules
ACTION=="add", SUBSYSTEM=="hwmon", DRIVERS=="nouveau", ATTR{pwm1_enable}="2"

4 comments:

  1. Dude you rock! I have been looking for over an hour for this info! Thanks!

    ReplyDelete
  2. Great, I was also looking for this since god knows how long. Thanks a lot!!

    ReplyDelete
  3. it doesnt works after the sleeping-mode.

    ReplyDelete
  4. Thanks man, this is exactly what I've been looking for!

    ReplyDelete