[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: smart fans



David Christensen wrote:

>> But changing the profile (governor) doesn't produce any
>> (noticable?) sound level change and also the temperature of
>> the CPU and the GPU seem unaffected.
>
> You will not notice a change in CPU fan temperature or speed
> profiles as a function of the Linux governor setting until
> the motherboard CPU fan speed control is working and you
> change the CPU load.
>
> Here is a Perl one-liner that should peg one core:
>
> $ perl -e "1 while 1"

OK, I wrote a script [last] and here is the result

$ temp-gov
CPU C (33.50 45.75) (100 iterations) conservative
CPU C (45.88 46.38) (100 iterations) userspace
CPU C (46.38 46.75) (100 iterations) powersave
CPU C (46.75 47.00) (100 iterations) ondemand
CPU C (47.00 47.00) (100 iterations) performance
CPU C (47.00 47.25) (100 iterations) schedutil

Hm ... the result seems to be pretty much identical for the
governors anyway?

#! /bin/zsh
#
# this file:
#   https://dataswamp.org/~incal/conf/.zsh/temp

temp-gov () {
    local t=100

    local cpu
    local cpu_min
    local cpu_max

    perl -e '1 while 1' &
    local pid=$!
    sleep 10

    local i
    local g
    for g in $(cpufreq-info -g); do
        sudo cpufreq-set -g $g
        cpu_min=999
        cpu_max=0
        for i in {0..$t}; do
            cpu=$(sensors -j | jq -a '.["k10temp-pci-00c3"].Tdie.temp1_input')
            (( $cpu < $cpu_min )) && cpu_min=$cpu
            (( $cpu > $cpu_max )) && cpu_max=$cpu
        done
        printf "CPU C (%.2f %.2f) (%d iterations) %s\n" $cpu_min $cpu_max $t $g
    done

    kill $pid
}

-- 
underground experts united
https://dataswamp.org/~incal


Reply to: