I was stuck when trying to write to a system file to change the cpu frequency:
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
<unsupported>
$ echo 1600000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
1600000
tee: /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed: Invalid argument
Changing user to root has the same problem:
$ sudo su
# echo 1600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
bash: echo: write error: Invalid argument
The following should probably be unrelated. Previously, the above commands all worked, but then my Ubuntu was frozen an hour ago when I plug the usb plug of my laptop cooler into one usb port of my laptop, so I had to reboot it by hitting the power button of my laptop, and then I have the above problem.
Previously when it worked, cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
output some value instead of <unsupported>
. After trying many times with the above invalid argument
error, now I just ran echo 1600000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
once again, and it works without the invalid argument
error. Around the same time, ubuntu reported some cpu frequency utility error, which I don't remember exactly.
sudo
and redirection. – Tim Mar 31 '18 at 21:35scaling_governor
before making changes it can be the cause of the permission problem. – GAD3R Apr 01 '18 at 09:17