Bug 13368 - cpupower fails on kernel-desktop-3.12.18-1.mga4 and *3.15.6-1.mga5
Summary: cpupower fails on kernel-desktop-3.12.18-1.mga4 and *3.15.6-1.mga5
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2014-05-12 17:56 CEST by Martin Volf
Modified: 2015-10-27 06:56 CET (History)
6 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Martin Volf 2014-05-12 17:56:18 CEST
Hello everybody,

Description of problem:
- cpupower can not be started by command systemctl on kernel-desktop-3.12.18-1 MGA4 64bit. Problem is on Intel CPUs (Intel Core i5-3230M 2.6GHz), no problem on the computers with AMD CPUs.

Version-Release number of selected component (if applicable):
kernel-desktop-3.12.18-1.mga4-1-1.mga4
cpupower-3.12.18-1.mga4

How reproducible:
everytime

Steps to Reproduce:
1. update older kernel to kernel-desktop-3.12.18-1.mga4-1-1.mga4 and cpupower-3.12.18-1.mga4

2. reboot
3. use the command:
[root@localhost yullaw]# systemctl status cpupower.service -l
cpupower.service - Configure CPU power related settings
   Loaded: loaded (/usr/lib/systemd/system/cpupower.service; enabled)
   Active: failed (Result: exit-code) since Po 2014-05-12 17:43:24 CEST; 5s ago
  Process: 12513 ExecStart=/usr/bin/cpupower $CPUPOWER_START_OPTS (code=exited, status=237)
 Main PID: 12513 (code=exited, status=237)

kvÄ 12 17:43:24 localhost.localdomain cpupower[12513]: Error setting new values. Common errors:
kvÄ 12 17:43:24 localhost.localdomain cpupower[12513]: - Do you have proper administration rights? (super-user?)
kvÄ 12 17:43:24 localhost.localdomain cpupower[12513]: - Is the governor you requested available and modprobed?
kvÄ 12 17:43:24 localhost.localdomain cpupower[12513]: - Trying to set an invalid policy?
kvÄ 12 17:43:24 localhost.localdomain cpupower[12513]: - Trying to set a specific frequency, but userspace governor is not available,
kvÄ 12 17:43:24 localhost.localdomain cpupower[12513]: for example because of hardware which cannot be set to a specific frequency
kvÄ 12 17:43:24 localhost.localdomain cpupower[12513]: or because the userspace governor isn't loaded?
kvÄ 12 17:43:24 localhost.localdomain systemd[1]: cpupower.service: main process exited, code=exited, status=237/n/a
kvÄ 12 17:43:24 localhost.localdomain systemd[1]: Failed to start Configure CPU power related settings.
kvÄ 12 17:43:24 localhost.localdomain systemd[1]: Unit cpupower.service entered failed state.

More info:
[root@localhost yullaw]# ls /usr/lib/modules/$(uname -r)/kernel/drivers/cpufreq/
acpi-cpufreq.ko.xz          cpufreq_ondemand.ko.xz   pcc-cpufreq.ko.xz  speedstep-centrino.ko.xz
amd_freq_sensitivity.ko.xz  cpufreq_powersave.ko.xz  powernow-k8.ko.xz  speedstep-lib.ko.xz
cpufreq_conservative.ko.xz  cpufreq_stats.ko.xz      p4-clockmod.ko.xz

[root@localhost yullaw]# lsmod |grep ondemand
cpufreq_ondemand       20254  0

[root@localhost yullaw]# cpupower frequency-info
analyzuji CPU 0:
  ovladaÄ: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 0.97 ms.
  hardwarové meze: 1.20 GHz - 3.20 GHz
  dostupné regulátory: performance, powersave
  souÄasná taktika: frekvence by mÄla být mezi 1.20 GHz a 3.20 GHz.
                    Regulátor "powersave" může rozhodnout jakou frekvenci použít
                    v tÄchto mezích.
  souÄasná frekvence CPU je 2.25 GHz  (zjiÅ¡tÄno hardwarovým voláním).
  boost state support:
    Supported: yes
    Active: yes
    25500 MHz max turbo 4 active cores
    25500 MHz max turbo 3 active cores
    25500 MHz max turbo 2 active cores
    25500 MHz max turbo 1 active cores

[root@localhost yullaw]# cat /etc/sysconfig/cpupower 
# See 'cpupower help' and cpupower(1) for more info
CPUPOWER_START_OPTS="frequency-set -g ondemand"
CPUPOWER_STOP_OPTS="frequency-set -g ondemand"


If I change a file /etc/sysconfig/cpupower to:
# See 'cpupower help' and cpupower(1) for more info
CPUPOWER_START_OPTS="frequency-set -g performance"   # or powersave
CPUPOWER_STOP_OPTS="frequency-set -g performance"    # or powersave

then systemctl works well:
[root@localhost yullaw]# systemctl stop cpupower
[root@localhost yullaw]# systemctl start cpupower
[root@localhost yullaw]# systemctl status cpupower.service -l
cpupower.service - Configure CPU power related settings
   Loaded: loaded (/usr/lib/systemd/system/cpupower.service; enabled)
   Active: active (exited) since Po 2014-05-12 17:50:31 CEST; 14s ago
  Process: 13330 ExecStart=/usr/bin/cpupower $CPUPOWER_START_OPTS (code=exited, status=0/SUCCESS)
 Main PID: 13330 (code=exited, status=0/SUCCESS)

kvÄ 12 17:50:31 localhost.localdomain systemd[1]: Starting Configure CPU power related settings...
kvÄ 12 17:50:31 localhost.localdomain cpupower[13330]: Setting cpu: 0
kvÄ 12 17:50:31 localhost.localdomain cpupower[13330]: Setting cpu: 1
kvÄ 12 17:50:31 localhost.localdomain cpupower[13330]: Setting cpu: 2
kvÄ 12 17:50:31 localhost.localdomain cpupower[13330]: Setting cpu: 3
kvÄ 12 17:50:31 localhost.localdomain systemd[1]: Started Configure CPU power related settings.


How we should solve it?
Thank you...

Reproducible: 

Steps to Reproduce:
Comment 1 Martin Volf 2014-05-12 19:15:48 CEST
Second workaround:

In grub line to add intel_pstate=disable to activate module acpi-cpufreq instead intel_pstate. Then cpupower works as well.
Comment 2 Thomas Backlund 2014-05-12 20:24:55 CEST
Well,

intel_pstate is the driver designed for use with Sandy Bridge and newer hardware, 

acpi-cpufreq is obsolete and does not handle new hw efficiently

CC: (none) => tmb

Comment 3 Thomas Backlund 2014-05-12 20:44:25 CEST
Ah, I see you noticed in first "workaround" that it needs another performance or powersave.

Trouble is we dont have a way so far to set that config depending on hw.

I wonder if we should forcus on performance as default, and let people set other states if they want...
Comment 4 Martin Volf 2014-05-14 06:56:53 CEST
· Ok, so, who uses a driver intel_pstate (see example output from # cpupower frequency-info) then user must change from "ondemand" to "performance" or "powersave" in /etc/sysconfig/cpupower. Otherwise cpupower.service fails on start.

If some problems with apps (like Steam (choppy sound, ...), etc.) then in grub line to add intel_pstate=disable to activate older acpi-cpufreq.

· Sources:
https://wiki.archlinux.org/index.php/CPU_frequency_scaling
https://bbs.archlinux.org/viewtopic.php?pid=1294415#p1294415

· Q: Is not better to set in cpupower-3.12.18-x.mga4 to "powersave" for all processors?

· Q: Better to add some information to wiki about how to use/switch cpupower? Errata/New "cpupower" page


Thank you and for me can be this bugreport closed as solved/workaround.
Comment 5 Deri James 2014-05-15 12:51:58 CEST
I'm not sure if this is related. With this kernel the contents of /sys/devices/system/cpu/cpu0/cpufreq is:-

[derij@pip cpufreq]$ uname -a
Linux pip.chuzzlewit.co.uk 3.12.18-desktop-1.mga4 #1 SMP Thu Apr 24 13:10:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[derij@pip cpufreq]$ ll
total 0
-r--r--r-- 1 root root 4096 May 15 11:16 affected_cpus
-r-------- 1 root root 4096 May 15 11:16 cpuinfo_cur_freq
-r--r--r-- 1 root root 4096 May 15 11:16 cpuinfo_max_freq
-r--r--r-- 1 root root 4096 May 15 11:16 cpuinfo_min_freq
-r--r--r-- 1 root root 4096 May 15 11:16 cpuinfo_transition_latency
-r--r--r-- 1 root root 4096 May 15 11:16 related_cpus
-r--r--r-- 1 root root 4096 May 15 11:16 scaling_available_governors
-r--r--r-- 1 root root 4096 May 15 11:16 scaling_driver
-rw-r--r-- 1 root root 4096 May 15 11:13 scaling_governor
-rw-r--r-- 1 root root 4096 May 15 11:16 scaling_max_freq
-rw-r--r-- 1 root root 4096 May 15 11:16 scaling_min_freq
-rw-r--r-- 1 root root 4096 May 15 11:16 scaling_setspeed

With a previous kernel it is:-

[root@pip cpufreq]# uname -a
Linux pip.chuzzlewit.co.uk 3.12.13-desktop-2.mga4 #1 SMP Sat Feb 22 23:45:28 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@pip cpufreq]# ll
total 0
-r--r--r-- 1 root root 4096 May 14 16:21 affected_cpus
-r--r--r-- 1 root root 4096 May 14 16:21 bios_limit
-r-------- 1 root root 4096 May 14 16:21 cpuinfo_cur_freq
-r--r--r-- 1 root root 4096 May 14 16:21 cpuinfo_max_freq
-r--r--r-- 1 root root 4096 May 14 16:21 cpuinfo_min_freq
-r--r--r-- 1 root root 4096 May 14 16:21 cpuinfo_transition_latency
-r--r--r-- 1 root root 4096 May 14 16:21 freqdomain_cpus
-r--r--r-- 1 root root 4096 May 14 16:21 related_cpus
-r--r--r-- 1 root root 4096 May 14 16:19 scaling_available_frequencies
-r--r--r-- 1 root root 4096 May 14 16:21 scaling_available_governors
-r--r--r-- 1 root root 4096 May 14 16:19 scaling_cur_freq
-r--r--r-- 1 root root 4096 May 14 16:21 scaling_driver
-rw-r--r-- 1 root root 4096 May 14 16:19 scaling_governor
-rw-r--r-- 1 root root 4096 May 14 16:21 scaling_max_freq
-rw-r--r-- 1 root root 4096 May 14 16:21 scaling_min_freq
-rw-r--r-- 1 root root 4096 May 14 16:21 scaling_setspeed

One important difference is that scaling_available_frequencies is missing. This prevents a plasmoid called CPUFreqDisplay from starting, and I wonder whether it is a reason for "ondemand" to stop working.

CC: (none) => deri

Comment 6 Martin Volf 2014-05-15 20:15:26 CEST
(In reply to Deri James from comment #5)
...
> One important difference is that scaling_available_frequencies is missing.
> This prevents a plasmoid called CPUFreqDisplay from starting, and I wonder
> whether it is a reason for "ondemand" to stop working.

As next Mageia user reported gkrellm (HW monitoring system) - 0 MHz for all CPUs.

To see actual frequencies:
$ watch grep \"cpu MHz\" /proc/cpuinfo
Comment 7 Christian Pernot 2014-06-01 21:16:46 CEST
For what I can tell (trying mga4 with a i5-4200M), the intel_pstate seems to be the better solution, but it has a bug, which was only resolved in kernel 3.14, see https://bugzilla.kernel.org/show_bug.cgi?id=66581

Would it be possible to backport the changes into the current kernel, or get a new kernel version for mga4 ?

CC: (none) => kriks

Bit Twister 2014-06-03 02:38:43 CEST

CC: (none) => junknospam

Comment 8 Dick Gevers 2014-07-07 22:18:35 CEST
Also seen on M5 alpha 1 (current kernel)

Version: 4 => Cauldron
Whiteboard: (none) => 5alpha1

Comment 9 Dick Gevers 2014-08-03 09:37:44 CEST
In my experience fixing in Cauldron seems to have best chance of getting stable versions fixed as well (correct me if I'm wrong).

Seeing this also with kernel-desktop-3.15.6-1.mga5 on a laptop, but not with kernel-server-3.15.6-1.mga5 on a large memory desktop machine:

# systemctl status cpupower.service
cpupower.service - ...
   Loaded: loaded ...
   Active: failed (Result exit code) since ... 
   ... code=exited, status=237

The laptop is a < 1 year old Toshia Satellite C55-A with Intel Celeron 1037U (x86_64 dual core).

CC: (none) => dvgevers
Whiteboard: 5alpha1 => MGA4TOO; 5alpha2

Dick Gevers 2014-08-03 09:48:21 CEST

Summary: cpupower fails on kernel-desktop-3.12.18-1 => cpupower fails on kernel-desktop-3.12.18-1.mga4 and *3.15.6-1.mga5

Comment 10 Dick Gevers 2014-08-03 23:49:28 CEST
Re Comment #c9: this goes for first built 5alpha2 wth dual DVD (64 bits) and classical 32 bits DVD.
Comment 11 Dick Gevers 2014-10-24 17:08:14 CEST
For me it is fixed in current Cauldron and in fresh install from M5 beta1 with latest M5 kernels !!

Whiteboard: MGA4TOO; 5alpha2 => MGA4TOO;

Comment 12 Thomas Backlund 2014-10-24 17:12:42 CEST
(In reply to Christian Pernot from comment #7)
> For what I can tell (trying mga4 with a i5-4200M), the intel_pstate seems to
> be the better solution, but it has a bug, which was only resolved in kernel
> 3.14, see https://bugzilla.kernel.org/show_bug.cgi?id=66581
> 
> Would it be possible to backport the changes into the current kernel, or get
> a new kernel version for mga4 ?


We have 3.14 series in mga4 now, 

(In reply to Dick Gevers from comment #11)
> For me it is fixed in current Cauldron and in fresh install from M5 beta1
> with latest M5 kernels !!


when the 3.14.22 currently in updates_testing is released, cpupower is switched to performance governor like I have done in Cauldron
Comment 13 Jean-Christophe Cardot 2014-11-22 19:00:39 CET
indeed, now cpupower is switched to performance governor by default in mga4 through last updates (3.14.24-desktop-1.mga4), which seems wrong for me, as it causes more energy consumption for no benefit.
(acpi-cpufreq is what my computer is using though)

[jice@localhost ~]$ uname -a
Linux localhost.localdomain 3.14.24-desktop-1.mga4 #1 SMP Sat Nov 15 23:54:03 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[jice@localhost ~]$ cat /etc/modprobe.preload.d/cpufreq
acpi-cpufreq
cpufreq_powersave
cpufreq_conservative
cpufreq_ondemand

So I did the following:
[fred@localhost ~]$ cat /etc/sysconfig/cpupower
# See 'cpupower help' and cpupower(1) for more info
#CPUPOWER_START_OPTS="frequency-set -g performance"
#CPUPOWER_STOP_OPTS="frequency-set -g performance"
# JCC 22-nov-2014
CPUPOWER_START_OPTS="frequency-set -g ondemand"
CPUPOWER_STOP_OPTS="frequency-set -g ondemand"

CC: (none) => mageia

Comment 14 Manuel Hiebel 2014-11-22 19:13:50 CET
Setting performance always on a laptop is not really perfect no ?
(it looks it doesn't change the govervor with or without AC.)
Comment 15 Chris Denice 2015-02-04 15:32:08 CET
Can someone confirm that intel_pstate driver works on mga4. If yes, this bug should be closed.

CC: (none) => dirteat

Comment 16 Samuel Verschelde 2015-06-01 00:07:14 CEST
Setting version to Mageia 4 as per comment #15. For Mageia 5, release notes or errata contain words about the change.

Keywords: (none) => NEEDINFO
Version: Cauldron => 4
Whiteboard: MGA4TOO; => (none)

Comment 17 Samuel Verschelde 2015-09-21 13:18:59 CEST
Mageia 4 changed to end-of-life (EOL) status on 2015-09-19. It is is no longer 
maintained, which means that it will not receive any further security or bug 
fix updates.

Package Maintainer: If you wish for this bug to remain open because you plan to 
fix it in a currently maintained version, simply change the 'version' to a later 
Mageia version.

Bug Reporter: Thank you for reporting this issue and we are sorry that we weren't 
able to fix it before Mageia 4's end of life. If you are able to reproduce it 
against a later version of Mageia, you are encouraged to click on "Version" and 
change it against that version of Mageia. If it's valid in several versions, 
select the highest and add MGAxTOO in whiteboard for each other valid release.
Example: it's valid in cauldron and Mageia 5, set to cauldron and add MGA5TOO.

Although we aim to fix as many bugs as possible during every release's lifetime, 
sometimes those efforts are overtaken by events. Often a more recent Mageia 
release includes newer upstream software that fixes bugs or makes them obsolete.

If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].

[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/
Bit Twister 2015-09-23 11:48:27 CEST

CC: bittwister2 => (none)

Comment 18 Marja Van Waes 2015-10-27 06:56:26 CET
As announced over a month ago, Mageia 4 changed to end-of-life (EOL) status on 2015-09-19. It is is no longer maintained, which means that it will not receive any further security or bug fix updates.

This issue may have been fixed in a later Mageia release, so, if you still see it and didn't already do so: please upgrade to Mageia 5 (or, if you read this much later than this is written: make sure you run a currently maintained Mageia version)

If you are able to reproduce it against a maintained version of Mageia, you are encouraged to 
1. reopen this bug report, by changing the "Status" from "RESOLVED - OLD" to "REOPENED"
2. click on "Version" and change it against that version of Mageia. If you know it's valid in several versions, select the highest and add MGAxTOO in whiteboard for each other valid release.
Example: it's valid in cauldron and Mageia 5, set to cauldron and add MGA5TOO.
3. give as much relevant information as possible. If you're not an experienced bug reporter and have some time: please read this page:
https://wiki.mageia.org/en/How_to_report_a_bug_properly

If you see a similar issue, but are _not_sure_ it is the same, with the same cause, then please file a new bug report and mention this one in it (please include the bug number, too). 


If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].
[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/

Status: NEW => RESOLVED
Resolution: (none) => OLD


Note You need to log in before you can comment on or make changes to this bug.