Page 1 of 1

[Solved] Can not modify files in /sys

Posted: Sun Jan 24, 2016 6:35 pm
by davef
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?

Thanks

Re: Can not modify files in /sys

Posted: Mon Jan 25, 2016 4:49 am
by FATechsupport
Hi did you do that as "root"? If not please try doing it as root

Re: Can not modify files in /sys

Posted: Mon Jan 25, 2016 7:11 am
by davef
sudo = root

I read that Debian sometimes uses su as a "special root", but that doesn't work either

Re: Can not modify files in /sys

Posted: Tue Jan 26, 2016 11:06 am
by FATechsupport
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

Re: Can not modify files in /sys

Posted: Tue Jan 26, 2016 6:06 pm
by davef
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?

Re: Can not modify files in /sys

Posted: Thu Jan 28, 2016 2:30 am
by davef
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?

Re: Can not modify files in /sys

Posted: Fri Jan 29, 2016 8:37 am
by FATechsupport
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.

Re: Can not modify files in /sys

Posted: Fri Jan 29, 2016 9:49 am
by davef
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 :)