You are not logged in.

#1 2013-03-31 09:37:27

Alastor
Member
Registered: 2012-12-30
Posts: 16

Can't set max\min frequencies with CPUpower

Hi all ! And happy easter to everyone !

I'm having a problem with CPU Frequency Scaling... I want to set maximum and minimum frequencies according to mi CPU specs, but I'm unable to do this.

Well, starting from the beginning :

I've a Samsung NP535U3C laptop, with and AMD A6-4455 APU. I've two boost pstates, in fact TurionPowerControl tells to me 

[alastor@NP535U3C ~]$ sudo TurionPowerControl -l
TurionPowerControl 0.44-rc2 (export)
Turion Power States Optimization and Control - by blackshard

Main processor is Family 15h (Bulldozer/Interlagos/Valencia) Processor
	Family: 0xf		Model: 0x0		Stepping: 0x1
	Extended Family: 0x15	Extended Model: 0x10
	Package Type: 0x0	BrandId: 0x0	
Machine has 1 nodes
Processor has 1 cores
Processor has 7 p-states
Processor has 2 boost states

Power States table:
-- Node: 0 Core 0
core 0 pstate 0 (pb0) - En:1 VID:80 FID:10 DID:0.00 Freq:2600 VCore:0.5500
core 0 pstate 1 (pb1) - En:1 VID:80 FID:7 DID:0.00 Freq:2300 VCore:0.5500
core 0 pstate 2 (p0) - En:1 VID:90 FID:5 DID:0.00 Freq:2100 VCore:0.4250
core 0 pstate 3 (p1) - En:1 VID:96 FID:2 DID:0.00 Freq:1800 VCore:0.3500
core 0 pstate 4 (p2) - En:1 VID:108 FID:14 DID:1.00 Freq:1500 VCore:0.2000
core 0 pstate 5 (p3) - En:1 VID:114 FID:10 DID:1.00 Freq:1300 VCore:0.1250
core 0 pstate 6 (p4) - En:0 VID:116 FID:2 DID:1.00 Freq:900 VCore:0.1000

 --- Node 0:
Processor Maximum PState: 6
Processor Startup PState: 4
Processor Maximum Operating Frequency: 2600 MHz

Minimum allowed VID: 123 (0.0125V) - Maximum allowed VID 0 (1.5500V)
Processor AltVID: 58 (0.8250V)

Done.

This is confirmed also by cpupower :

[alastor@NP535U3C ~]$ sudo cpupower frequency-info
analisi della CPU 0:
  modulo acpi-cpufreq
  CPU che operano alla stessa frequenza hardware: 0 1
  CPU che è necessario siano coordinate dal software: 0
  latenza massima durante la transizione: 4.0 us.
  limiti hardware: 1.30 GHz - 2.10 GHz
  frequenze disponibili: 2.10 GHz, 1.80 GHz, 1.50 GHz, 1.30 GHz
  gestori disponibili: conservative, ondemand, performance
  gestore attuale: la frequenza deve mantenersi tra 1.30 GHz e 2.10 GHz.
                   Il gestore "ondemand" può decidere quale velocità usare
                  in questo intervallo.
  la frequenza attuale della CPU è 1.50 GHz (ottenuta da una chiamata diretta all'hardware).
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 2
    Total States: 7
    Pstate-Pb0: 2600MHz (boost state)
    Pstate-Pb1: 2300MHz (boost state)
    Pstate-P0:  2100MHz
    Pstate-P1:  1800MHz
    Pstate-P2:  1500MHz
    Pstate-P3:  1300MHz
    Pstate-P4:  900MHz

So, my question is, why the ondemand governor can switch only between 2.10GHz and 1.3Ghz ? Should'nt switch between 2.6Ghz and 900MHz ?
I've tried to set lower frequency to 900 MHz whit the command :

cpupower frequency-set -d 900MHz

but nothing changed, the lower frequency still remained 1.3Ghz

I've also tried to set the maximum and minimum frequencies in /etc/default/cpupower :

# Define CPUs governor
# valid governors: ondemand, performance, powersave, conservative, userspace.
governor='ondemand'

# Limit frequency range
# Valid suffixes: Hz, kHz (default), MHz, GHz, THz
min_freq="900MHz"
max_freq="2600MHz"

# Specific frequency to be set.
# Requires userspace governor to be available.
# Do not set governor field if you use this one.
#freq=

# Utilizes cores in one processor package/socket first before processes are 
# scheduled to other processor packages/sockets.
# See man (1) CPUPOWER-SET for additional details.
#mc_scheduler=

# Utilizes thread siblings of one processor core first before processes are
# scheduled to other cores. See man (1) CPUPOWER-SET for additional details.
#smp_scheduler=

#  Sets a register on supported Intel processore which allows software to convey
# its policy for the relative importance of performance versus energy savings to
# the  processor. See man (1) CPUPOWER-SET for additional details.
#perf_bias=

# vim:set ts=2 sw=2 ft=sh et:

but again, nothing canged.

I've tried ondemand and userspace governors but the situation is the same whit both of them, I always get hardware limits 1.30 - 2.10 GHz.
I've also tried to set the processor.ignore_ppc=1 boot flag, but it was selfish.

Someone could help me ? At least to set the lower frequacy to 900MHz so I can save a bit of battery.

Thank you.

Offline

#2 2013-04-01 06:08:11

t1nk3r3r
Member
From: The Pacific Northwest
Registered: 2011-03-22
Posts: 79

Re: Can't set max\min frequencies with CPUpower

Try conservative, as it's not as "jumpy" as the ondemand governor.  This is explained in kernel documentation/cpu-freq.

I was under the impression that APU support was a work-in-progress.  I haven't yet seen any reference from Linux sources about specifications, so this might be a grey area. I can't say for sure...

You might also get a clue from:

cat /proc/cpuinfo

.
If changing governors doesn't help.


--------------------------The only wasted day is one in which you learn nothing.--------------------------

Offline

#3 2013-04-01 08:21:33

Alastor
Member
Registered: 2012-12-30
Posts: 16

Re: Can't set max\min frequencies with CPUpower

Hi ! And thank you for your reply !! I'm always on conservative when I'm on battery to save some power. At this point I think I should report the problem to AMD. However here is my /proc/cpuinfo :

[alastor@NP535U3C ~]$ cat /proc/cpuinfo
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 16
model name	: AMD A6-4455M APU with Radeon(tm) HD Graphics
stepping	: 1
microcode	: 0x6001119
cpu MHz		: 1300.000
cache size	: 2048 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 16
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core arat cpb hw_pstate npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold bmi1
bogomips	: 4193.77
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro

processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 16
model name	: AMD A6-4455M APU with Radeon(tm) HD Graphics   
stepping	: 1
microcode	: 0x6001119
cpu MHz		: 1300.000
cache size	: 2048 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 1
apicid		: 17
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core arat cpb hw_pstate npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold bmi1
bogomips	: 4193.77
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro

Offline

#4 2013-04-01 10:29:42

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Can't set max\min frequencies with CPUpower

I don't know why it doesn't go down to 900MHz. However, I think it's normal that the upper limit is 2100MHz - turbo frequencies are only enabled temporarily by hardware.

You can try to alter these settings manually by poking files in /sys/devices/system/cpu/cpu0/cpufreq .

Last edited by mich41 (2013-04-01 10:31:24)

Offline

#5 2013-04-01 11:27:33

Alastor
Member
Registered: 2012-12-30
Posts: 16

Re: Can't set max\min frequencies with CPUpower

mich41 wrote:

I don't know why it doesn't go down to 900MHz. However, I think it's normal that the upper limit is 2100MHz - turbo frequencies are only enabled temporarily by hardware.

You can try to alter these settings manually by poking files in /sys/devices/system/cpu/cpu0/cpufreq .

Thank you for your reply ! I found the file your mentioned, but I'm unable to modify it ! Also if I give to it write permission

Offline

#6 2013-04-01 18:25:04

t1nk3r3r
Member
From: The Pacific Northwest
Registered: 2011-03-22
Posts: 79

Re: Can't set max\min frequencies with CPUpower

Do not change read/write permissions in /sys or /proc!  At best, you'll get an error and at worst you could damage your system!
Only ever write values to objects that are marked as writable.

You could report this to AMD, they *might* do something or simply refer you to cpu-freq developers.
If I'm not mistaken, you should have 'fam15h_power' module loaded (lsmod).  I can't remember if it's built into stock-ARCH or not.

Boost is only actually ever used during favorable temperature conditions, and controlled explicitly by the CPU
/sys/devices/system/cpu/cpufreq/boost
setting simply allows it to do so.


--------------------------The only wasted day is one in which you learn nothing.--------------------------

Offline

#7 2013-04-01 22:04:55

Alastor
Member
Registered: 2012-12-30
Posts: 16

Re: Can't set max\min frequencies with CPUpower

Thank you for your advice ! However I reported the bug to kernel.org bugtracker and AMD.

Offline

#8 2014-05-06 18:57:51

meowcats
Member
Registered: 2014-05-06
Posts: 4

Re: Can't set max\min frequencies with CPUpower

Same issue with A8-4500M

$ uname -r
3.14.2-1-ARCH
$ sudo cpupower frequency-info
[sudo] password for ******: 
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 4.0 us.
  hardware limits: 1.40 GHz - 1.90 GHz
  available frequency steps: 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.40 GHz
  available cpufreq governors: ondemand, performance
  current policy: frequency should be within 1.40 GHz and 1.90 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.40 GHz (asserted by call to hardware).
  boost state support:
    Supported: yes
    Active: no
    Boost States: 2
    Total States: 8
    Pstate-Pb0: 2800MHz (boost state)
    Pstate-Pb1: 2300MHz (boost state)
    Pstate-P0:  1900MHz
    Pstate-P1:  1800MHz
    Pstate-P2:  1700MHz
    Pstate-P3:  1600MHz
    Pstate-P4:  1400MHz
    Pstate-P5:  900MHz

Offline

#9 2014-05-06 19:10:01

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Can't set max\min frequencies with CPUpower


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB