1

On Ubuntu 14.04, I hope to set the cpu frequency upon resuming from suspension, so I created a file /etc/pm/sleep.d/20_cpu_freq with content:

#!/bin/bash
case $1 in
        resume)
                sudo cpufreq-set -f 1.60GHz -c0
                sudo cpufreq-set -f 1.60GHz -c1
                ;;
        thaw)
                sudo cpufreq-set -f 1.60GHz -c0
                sudo cpufreq-set -f 1.60GHz -c1
                ;;
esac

But the cpu frequency isn't set upon waking up. What might be the reason?

Can I run sudo command in the script? Will that require me to type in the password of root?

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.