Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] can't change scaling governor
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
matroskin
Apprentice
Apprentice


Joined: 21 Jan 2003
Posts: 214

PostPosted: Tue Oct 21, 2014 6:50 pm    Post subject: [solved] can't change scaling governor Reply with quote

Hi
I'm trying to change scaling governor and get "invalid argument" error.. Actually I can't change any value under cpufreq directory. While I run ubuntu on that comp, everything works.

Here is a bash session
Code:

# uname -a
Linux localhost 3.14.3-aufs-r1-rt4 #2 SMP PREEMPT RT Tue Oct 21 17:31:40 IDT 2014 i686 Intel(R) Core(TM) i7-3612QE CPU @ 2.10GHz GenuineIntel GNU/Linux

# cd /sys/devices/system/cpu/cpu0/cpufreq
# pwd
/sys/devices/system/cpu/cpu0/cpufreq

# grep "" *
affected_cpus:0
bios_limit:2101000
cpuinfo_cur_freq:2101000
cpuinfo_max_freq:2101000
cpuinfo_min_freq:1200000
cpuinfo_transition_latency:10000
freqdomain_cpus:0 1 2 3 4 5 6 7
related_cpus:0
scaling_available_frequencies:2101000 2100000 2000000 1900000 1800000 1700000 1600000 1500000 1400000 1300000 1200000
scaling_available_governors:conservative ondemand userspace powersave performance
scaling_cur_freq:2101000
scaling_driver:acpi-cpufreq
scaling_governor:performance
scaling_max_freq:2101000
scaling_min_freq:1200000
scaling_setspeed:<unsupported>

# echo ondemand > scaling_governor
-bash: echo: write error: Invalid argument

# echo performance > scaling_governor
-bash: echo: write error: Invalid argument

# echo 2000000 > scaling_max_freq
-bash: echo: write error: Invalid argument

# grep FREQ /boot/config-3.14.3-aufs-r1-rt4
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_X86_PCC_CPUFREQ=y
CONFIG_X86_ACPI_CPUFREQ=y
# CONFIG_X86_ACPI_CPUFREQ_CPB is not set
# CONFIG_X86_AMD_FREQ_SENSITIVITY is not set
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
# CONFIG_PM_DEVFREQ is not set

_________________
fbpanel


Last edited by matroskin on Thu Oct 30, 2014 6:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
netixen
n00b
n00b


Joined: 26 Sep 2013
Posts: 31

PostPosted: Wed Oct 22, 2014 1:52 am    Post subject: Reply with quote

Try
Code:
cpufreq-set -c0 -g ondemand
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Oct 22, 2014 7:47 am    Post subject: Reply with quote

for some reason only cpupower works here.

example
Code:
localhost roman # cpupower frequency-set -g ondemand
Setting cpu: 0
Setting cpu: 1
Back to top
View user's profile Send private message
matroskin
Apprentice
Apprentice


Joined: 21 Jan 2003
Posts: 214

PostPosted: Sun Oct 26, 2014 3:46 am    Post subject: Reply with quote

Thank you for the answers, but both cpupower and cpufreq-set fails
_________________
fbpanel
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Tue Oct 28, 2014 11:14 am    Post subject: Reply with quote

well you could compare ubutnu kernel config with your current kernel config and check wheres the difference.

also check which modules are loaded in both distributions and compare.

also maybe a userspace issue. ... could be /dev related too but thats just a guess
Back to top
View user's profile Send private message
matroskin
Apprentice
Apprentice


Joined: 21 Jan 2003
Posts: 214

PostPosted: Thu Oct 30, 2014 6:13 pm    Post subject: Reply with quote

Well, I think I came close to the answer - the config is ok, the combination of patches brings problem

I run kernel with aufs and RT patch
kernel with RT patch alone works ok
Kernel with aufs patch alone works ok
The problem arise only on a kernel with both patches
_________________
fbpanel
Back to top
View user's profile Send private message
matroskin
Apprentice
Apprentice


Joined: 21 Jan 2003
Posts: 214

PostPosted: Thu Nov 06, 2014 10:46 pm    Post subject: Reply with quote

The final answer is this: the RT kernel prevents changing scaling governor

Here is an explanation found on RT mailing list discussing exactly same problem
Thread http://www.spinics.net/lists/linux-rt-users/msg12170.html

They dug into the code and found that RT patch holds additional lock preventing taking semaphore needed to change a governor. Calling code returns EINVAL if taking semaphore fails - this is the reason for "invalid argument" error

Details are here http://www.spinics.net/lists/linux-rt-users/msg12207.html
_________________
fbpanel
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum