Skip to content

Instantly share code, notes, and snippets.

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

Luca sysrq-reisub

🍕
pizza
View GitHub Profile
@sysrq-reisub
sysrq-reisub / fanny.rb
Last active February 16, 2016 20:45 — forked from chrp/fanny.rb
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 = [ 30, 45, 50, 65, 70 ]