Power & Source of Big Ideas

[Solved] Can not modify files in /sys

Moderators: chensy, FATechsupport

I want to change the CPU operating frequency by doing:

sudo echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

and I get a message : Permission denied

I have not been able to find any comments regarding Debian Jessie and any special behaviour on /sys
Can you provide any clue?

Hi did you do that as "root"? If not please try doing it as root
sudo = root

I read that Debian sometimes uses su as a "special root", but that doesn't work either
Hi you can try these:

Set its min freq:
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

Set its max freq
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Your suggestion did not work. I thought why not try changing the permissions on one of these files in /sys/devices/system/cpu/cpu0/cpufreq and see what happens.

Well, if I change scaling_governor from 444 (as found in the provided Debian image) to 666 then I can modify it, say from from "interactive" to "ondemand". If I change it from 444 to 644 I still can NOT modify it.

When the file permissions are 666 you do NOT need to precede the echo command with sudo.

This tells me that "nobody" permissions has to be set read/write. I thought the way it is suppose to work is if you have "root" permissions set to read/write then using sudo in front of your command will allow you to "echo" values to the file.

What am I not understanding?
I tried to change the scaling_governor on my netbook and found that even with sudo I can not change it there either.

There is some special process required to modify files in /sys/devices/system/cpu/cpu0/cpufreq

Nobody know the process?
Hi we tested this function in both Android and Debian and it worked.
I would suggest you try it this way: start Debian and login as root and try the commands again. If it still doesn't work you may post all the messages here and we will check for you.
Well, thank you very much for that. For years I have been running root on the mini2440, because it was that by default. I now see I needed some practice changing to a root login :)

Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 6 guests