Skip to content

Instantly share code, notes, and snippets.

View sysrq-reisub's full-sized avatar
🍕
pizza

Luca sysrq-reisub

🍕
pizza
View GitHub Profile
@chrp
chrp / fanny.rb
Created August 12, 2013 15:21
Auto adjust fan speed of graphics card with ATI catalyst driver on Ubuntu.
#!/usr/bin/env ruby
# encoding: utf-8
# first part, get temperature
temp_str = `aticonfig --adapter=0 --od-gettemperature`
temp = temp_str.scan(/Sensor 0: Temperature - (\d+\.\d+) C/)[0][0].to_i
# determine fan speed
thresholds = [ 40, 60, 70, 80, 85 ]
speeds = [ 10, 25, 30, 35, 50 ]