You are not logged in.

#1 2012-09-01 08:59:30

bmanuel
Member
Registered: 2011-10-06
Posts: 106

[SOLVED] cpupower/systemd, cannot set 'performance' governor at boot

Hi all, i upgraded to systemd and everything is working fine and faster: the only one thing i'm missing is cpufrequtils since this was the only way to set the "performance" governor at boot and have it stay this way.
Since i upgraded to cpupower and enabled the cpupower.service unit, the governor is automatically switched to ondemand even if i specified performance in the /etc/conf.d/cpupower config file: i don't get what's happening because if i restart the cpupower.service unit manually everything is fine and it will not switch to ondemand on its own o_O

Processor information

vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
stepping	: 5
microcode	: 0x11
cpu MHz		: 1600.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 7
initial apicid	: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5322.83
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:
/etc/conf.d/cpupower
------------------------------

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

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

# Specific frequency to be set.
# Requires userspace governor to be available and loaded.
#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=0

# 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=0

#  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:
sytemctl status cpupower.service
-----------------------------------------------
cpupower.service - Apply cpupower configuration
	  Loaded: loaded (/usr/lib/systemd/system/cpupower.service; enabled)
	  Active: active (exited) since Sat, 01 Sep 2012 10:50:05 +0200; 1min 27s ago
	 Process: 2148 ExecStart=/usr/lib/systemd/scripts/cpupower (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/cpupower.service
journalctl |grep -i cpupower
--------------------------------------
(empty)

I even tried to mimic an rc.local with a custom service i use to set RTC max frequency (for the Android emulator) but it doesn't set the governor to performance, even if i know this script works since i can query max_user_freq and read 2048 as i need it to be, here is the script launched by the custom service.

#!/bin/bash

echo 2048 > /sys/class/rtc/rtc0/max_user_freq
echo 2048 > /proc/sys/dev/hpet/max-user-freq

cpupower frequency-set -g performance

Does this happen for you too? I remember having this problem one year ago, and switched to cpufrequtils since that was working: now that is being deprecated i would like to pinpoint the problem and solve it once and for all, can you help me?

I think i could auto-start some script via gnome-session-properties but i would love to have a systemd-only solution working :-/

Thank you,
Manuel

Last edited by bmanuel (2012-09-07 17:39:01)

Offline

#2 2012-09-02 11:18:56

z0id
Member
From: Romania
Registered: 2010-02-02
Posts: 122

Re: [SOLVED] cpupower/systemd, cannot set 'performance' governor at boot

Are the proper kernel modules loaded?


/usr/bin/drinking

Offline

#3 2012-09-02 11:26:02

bmanuel
Member
Registered: 2011-10-06
Posts: 106

Re: [SOLVED] cpupower/systemd, cannot set 'performance' governor at boot

z0id wrote:

Are the proper kernel modules loaded?

Sure they are, "ondemand" and "performance" modules should be compiled-in into the default kernel, i can even run it *after* logging in gnome-shell and the settings will stay correctly.

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors 
ondemand performance 

Offline

#4 2012-09-05 02:32:46

Hyugga
Member
From: Santiago, Chile
Registered: 2010-03-26
Posts: 335

Re: [SOLVED] cpupower/systemd, cannot set 'performance' governor at boot

Same here. I set the "conservative" governor but it always load the "on-demand" governor.
Only if i load it by myself, cpupower says that the "conservative" governor is loaded.

Offline

#5 2012-09-05 07:37:32

bmanuel
Member
Registered: 2011-10-06
Posts: 106

Re: [SOLVED] cpupower/systemd, cannot set 'performance' governor at boot

Oh well, at least i'm not the only one wink

Offline

#6 2012-09-07 01:07:47

Hyugga
Member
From: Santiago, Chile
Registered: 2010-03-26
Posts: 335

Re: [SOLVED] cpupower/systemd, cannot set 'performance' governor at boot

I updated cpupower last night, and it seems that the problem is gone.
I have the "conservative" governor at boot.
Solved for me....
Good luck!

Offline

#7 2012-09-07 08:10:26

bmanuel
Member
Registered: 2011-10-06
Posts: 106

Re: [SOLVED] cpupower/systemd, cannot set 'performance' governor at boot

I've still to update it since was busy, this night i'm going to look at it and report back, thank you for bringing this to my attention!

Offline

#8 2012-09-07 17:38:46

bmanuel
Member
Registered: 2011-10-06
Posts: 106

Re: [SOLVED] cpupower/systemd, cannot set 'performance' governor at boot

Solved for me too! Marking as solved!

Offline

Board footer

Powered by FluxBB