All posts by dan

Linking Nvidia GPU temperature with a motherboard PWM fan in Linux

So I have a closed loop water cooler on my GPU and I replaced the stock single speed fan with two Noctua PWM fans (doing push/pull) connected to my motherboard. Even though the fans can be seen by lm_sensors and fancontrol the Nvidia GPU does not appear as it’s proprietary driver.

I knew nvidia-settings could be used to query the temperature (and the pump speed if you care) so I wrote a script to tie it all together:

#!/usr/bin/env bash
set -e

# This is the path to the PWM controlled fan (use lm_sensors/fancontrol to help you identify this)
# Read for your PWM chip to find the correct values (I have a nct6792)
# Temperature at which to run fan at 100% speed

# Re-enable automatic fan control on exit
trap "echo ${automatic} > ${fan}_enable; exit" SIGHUP SIGINT SIGTERM ERR EXIT

# Enable manual fan control
echo ${manual} > ${fan}_enable

function temperature() {
        nvidia-settings -q [gpu:0]/gpucoretemp -t

function fan_speed() {
        echo Setting FAN Speed to $1%
        echo $(((($1 * 255)) / 100)) > ${fan}

while true; do
        echo GPU Temperature: $temp

        if [ "$temp" -ge "$max" ] ; then
                fan_speed 100
                fan_speed $(($temp + ((100 - $max))))

        sleep 1

Then make the script sudoable without password and run on login. Now my fans run at 600rpm at idle and go up to 1100rpm when running a GPU burn in tool.

GitFlow hmmmm

After reading Atlassian worflow comparison and Vincent Driessen original post about GitFlow I have come to realise a couple of worrying things:

  • I incorrectly assumed GitFlow was the same thing as GitHub flow (fork project, do work then pull request)
  • This model appears to be popular but it seems totally archaic to me
    • Requires lots of merging especially if you refactor at lot.
    • Doesn’t do CD
    • Requires lots of manual work
    • Master and develop seem the wrong way around to me
    • How many branches?
  • I use pull requests but don’t use feature branches which the Atlassian article implies requires feature branches
  • Most places I’ve seen, feature branches do live on origin (unlike the original post)

GitHub flow is so nearly right except for the last two steps are the wrong way round (Deploy then Merge!):

Now that your changes have been verified in production, it is time to merge your code into the master branch.

This is my prefered workflow:

  • Master is always trunk or head where all new development happens
  • Every single check-in triggers a build (and tag with auto increment minor version) and is expected to be production code
    • If possible every build is automatically released but if not then a single click by an authorised user would make that release public
  • If old major versions are supported by team they are on branches (but the rest is the same, i.e every check is a release etc)
  • Hot fixes are just another commit to either master or the branch. i.e nothing special
  • Done means in production and you have monitored it with your own eyes! You don’t start new work until you have seen your old work live
  • If you are on the core team:
    • If you pair you can commit to master or branch directly
    • If you solo you should get code review or pull request
  • If you are not on core team you pull request from your fork

Is it just me that thinks GitFlow doesn’t look very “flow” based, more like a lot of manual busy work like the old days. Please report your counter experiences or alternate workflows…

Ubuntu + Evolution + Exchange

By default Ubuntu does not install the EWS (Exchange Web Service) plugin for Evolution

sudo apt-get install evolution-ews

Then go into Evolution and choose the following settings:

  • Server Type: Exchange Web Service
  • Username: WINDOWS-DOMAIN\username
  • Host URL:

Now click “Fetch URL” and it should ask you for a password and populate the Host and OAB Url correctly.

It will then try and launch Evolution but for me I had to restart for it to correctly work and then it asked me a couple of times for my windows password.

AMD ATI Graphics tearing in Chrome on Ubuntu 15.04

I had to switch to using proprietor AMD drivers as the open source ones don’t support audio via display port, but after switching, Chrome was tearing and just going completely black.

The chrome GPU page reported no hardware acceleration enabled.

So I went to Chrome Flags page and forced GPU acceleration and rasterisation

Override software rendering list -> Disabled
Enable GPU rasterization -> Force enabled on all layers
Smooth Scrolling Linux -> Enable