You are not logged in.

#1 2013-11-13 23:53:16

hobonix
Member
From: Seattle
Registered: 2009-02-17
Posts: 31

Unit cpupower.service entered failed state

I've installed linux-rt (3.10.18-rt14-1-rt) with the intention of setting it up for pro-audio work. My cpu is a Core2 Quad.

I'm trying to set the cpu frequency to performance on start up, but it fails.

I installed cpupower and edited /etc/default/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="2.00GHz"
max_freq="2.50Hz"

I ran systemctl enable cpupower.service

But after reboot I get:

[tony@hydra ~]$ systemctl status cpupower.service
cpupower.service - Apply cpupower configuration
   Loaded: loaded (/usr/lib/systemd/system/cpupower.service; enabled)
   Active: failed (Result: exit-code) since Tue 2013-11-12 07:13:15 PST; 42min ago
  Process: 218 ExecStart=/usr/lib/systemd/scripts/cpupower (code=exited, status=1/FAILURE)
 Main PID: 218 (code=exited, status=1/FAILURE)
   CGroup: /system.slice/cpupower.service

Here's the output from sudo journalctl | grep cpupower:

Nov 11 19:03:45 hydra sudo[11586]: tony : TTY=pts/0 ; PWD=/home/tony ; USER=root ; COMMAND=/usr/bin/pacman -S cpupower
Nov 11 19:32:46 hydra sudo[1444]: tony : TTY=pts/0 ; PWD=/home/tony ; USER=root ; COMMAND=/usr/bin/cpupower info
Nov 11 19:43:06 hydra sudo[1469]: tony : TTY=pts/0 ; PWD=/home/tony ; USER=root ; COMMAND=/usr/bin/cpupower frequency-set -g performance
Nov 12 05:48:25 hydra dbus-daemon[219]: dbus[219]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.13" (uid=1000 pid=4953 comm="systemctl enable cpupower.service ") interface="org.freedesktop.systemd1.Manager" member="EnableUnitFiles" error name="(unset)" requested_reply="0" destination="org.freedesktop.systemd1" (uid=0 pid=1 comm="/sbin/init ")
Nov 12 05:48:25 hydra dbus[219]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.13" (uid=1000 pid=4953 comm="systemctl enable cpupower.service ") interface="org.freedesktop.systemd1.Manager" member="EnableUnitFiles" error name="(unset)" requested_reply="0" destination="org.freedesktop.systemd1" (uid=0 pid=1 comm="/sbin/init ")
Nov 12 05:48:45 hydra sudo[4993]: tony : TTY=pts/0 ; PWD=/home/tony ; USER=root ; COMMAND=/usr/bin/systemctl enable cpupower.service
Nov 12 05:50:44 hydra systemd[1]: Starting Apply cpupower configuration...
Nov 12 05:50:44 hydra systemd[1]: cpupower.service: main process exited, code=exited, status=1/FAILURE
Nov 12 05:50:44 hydra systemd[1]: Failed to start Apply cpupower configuration.
Nov 12 05:50:44 hydra systemd[1]: Unit cpupower.service entered failed state.
Nov 12 06:32:32 hydra sudo[8192]: tony : TTY=pts/0 ; PWD=/home/tony ; USER=root ; COMMAND=/usr/bin/cpupower frequency-set -g
Nov 12 06:32:42 hydra sudo[8245]: tony : TTY=pts/0 ; PWD=/home/tony ; USER=root ; COMMAND=/usr/bin/cpupower frequency-set -g performance
Nov 12 06:56:14 hydra systemd[1]: Starting Apply cpupower configuration...
Nov 12 06:56:14 hydra systemd[1]: cpupower.service: main process exited, code=exited, status=1/FAILURE
Nov 12 06:56:14 hydra systemd[1]: Failed to start Apply cpupower configuration.
Nov 12 06:56:14 hydra systemd[1]: Unit cpupower.service entered failed state.
Nov 12 07:13:15 hydra systemd[1]: Starting Apply cpupower configuration...
Nov 12 07:13:15 hydra systemd[1]: cpupower.service: main process exited, code=exited, status=1/FAILURE
Nov 12 07:13:15 hydra systemd[1]: Failed to start Apply cpupower configuration.
Nov 12 07:13:15 hydra systemd[1]: Unit cpupower.service entered failed state.
Nov 12 08:16:51 hydra systemd[1]: Starting Apply cpupower configuration...
Nov 12 08:16:51 hydra systemd[1]: cpupower.service: main process exited, code=exited, status=1/FAILURE
Nov 12 08:16:51 hydra systemd[1]: Failed to start Apply cpupower configuration.
Nov 12 08:16:51 hydra systemd[1]: Unit cpupower.service entered failed state.

But, I can set it manually:

[tony@hydra ~]$ sudo cpupower frequency-set -g performance
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
[tony@hydra ~]$ sudo cpupower frequency-info -p
analyzing CPU 0:
1998000 2500000 performance

Any ideas on where to go from here to get this working?


I think Lisp is funny, double semi-colons and unmatched parentheses crack me up.

Offline

#2 2013-11-14 00:18:10

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: Unit cpupower.service entered failed state

What does cpupower frequency-info give you? (i.e. not just the policy - what's the full output?)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#3 2013-11-14 01:20:45

hobonix
Member
From: Seattle
Registered: 2009-02-17
Posts: 31

Re: Unit cpupower.service entered failed state

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: 10.0 us.
  hardware limits: 2.00 GHz - 2.50 GHz
  available frequency steps: 2.50 GHz, 2.00 GHz
  available cpufreq governors: ondemand, performance
  current policy: frequency should be within 2.00 GHz and 2.50 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 2.00 GHz (asserted by call to hardware).
  boost state support:
    Supported: no
    Active: no


I think Lisp is funny, double semi-colons and unmatched parentheses crack me up.

Offline

#4 2013-11-14 04:27:47

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: Unit cpupower.service entered failed state

If you start the service rather than running cpupower manually, does it work correctly then?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#5 2013-11-14 14:04:29

hobonix
Member
From: Seattle
Registered: 2009-02-17
Posts: 31

Re: Unit cpupower.service entered failed state

No.

# systemctl start cpupower.service
Job for cpupower.service failed. See 'systemctl status cpupower.service' and 'journalctl -xn' for details.
# journalctl -xn
-- Logs begin at Sat 2013-11-09 15:26:43 PST, end at Thu 2013-11-14 06:56:23 PST. --
Nov 14 06:56:19 hydra su[1010]: (to root) tony on pts/0
Nov 14 06:56:19 hydra su[1010]: pam_unix(su:session): session opened for user root by tony(uid=1000)
Nov 14 06:56:20 hydra slim[235]: starting deadbeef 0.5.6
Nov 14 06:56:20 hydra slim[235]: server_start
Nov 14 06:56:21 hydra slim[235]: starting deadbeef 0.5.6
Nov 14 06:56:21 hydra slim[235]: server_start
Nov 14 06:56:22 hydra slim[235]: starting deadbeef 0.5.6
Nov 14 06:56:22 hydra slim[235]: server_start
Nov 14 06:56:23 hydra slim[235]: starting deadbeef 0.5.6
Nov 14 06:56:23 hydra slim[235]: server_start

Last edited by hobonix (2013-11-14 15:00:58)


I think Lisp is funny, double semi-colons and unmatched parentheses crack me up.

Offline

#6 2013-11-16 03:08:50

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: Unit cpupower.service entered failed state

That's not showing anything relevant - it is just about deadbeef. You need to find the errors using journalctl and systemctl status. I guess it is probably not showing you enough of the journal or else you didn't immediately look at the journal.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#7 2013-11-16 07:20:01

hobonix
Member
From: Seattle
Registered: 2009-02-17
Posts: 31

Re: Unit cpupower.service entered failed state

cfr wrote:

You need to find the errors using journalctl and systemctl status.

I've used these tools a number of times trying to understand what's happening and that's all they ever show.

I posted this on linuxmusicians.com and a couple Archers there said they couldn't get this to work either. One just compiled the kernel to always be in performance mode. I expect there is a bug somewhere but I don't understand it well enough to know what to file it on.


I think Lisp is funny, double semi-colons and unmatched parentheses crack me up.

Offline

#8 2013-11-16 22:43:57

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: Unit cpupower.service entered failed state

I think the error may be in /usr/lib/systemd/scripts/cpupower. It doesn't work for me to append the values to the params array like that.
For example:

declare -a params=()
params+=(${governor:+-g $governor})
params+=(${min_freq:+-d $min_freq})
params+=(${max_freq:+-u $max_freq})
params+=(${freq:+-f $freq})

doesn't give me what I take it it should if I run it with test values. I set g to "34f" and h to "56g"

$ declare -a f=()
$ f+=(${g:+-g $g})
$ f+=(${h:+-h $h})
$ echo $f
-g

In contrast:

$ declare -a f=()
$ f+=${g:+-g $g}
$ echo $f
-g 34f
$ f+=${h:+-h $h}
$ echo $f
-g 34f-h 56g

So maybe it is just nor running the right command?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#9 2013-11-16 22:50:30

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Unit cpupower.service entered failed state

I think your journal output you posted in #5 is your user journal.  You need to be looking at the system journal.  This would explain why you aren't seeing anything useful. 

Still, cfr suggested you use systemctl status as well, which would have probably given you some kind of useful information.  So I'm not sure why you didn't take that advice.

Offline

#10 2013-11-17 02:45:58

hobonix
Member
From: Seattle
Registered: 2009-02-17
Posts: 31

Re: Unit cpupower.service entered failed state

WonderWoofy wrote:

I think your journal output you posted in #5 is your user journal.  You need to be looking at the system journal.  This would explain why you aren't seeing anything useful.

It's the only journal I know.

WonderWoofy wrote:

Still, cfr suggested you use systemctl status as well, which would have probably given you some kind of useful information.  So I'm not sure why you didn't take that advice.

It's in the OP.

I have a workaround for this and so I think it's time for me to go. There's a few of us dealing with this on linuxmusicians.com; if anyone wants more feedback they can go there and ask about it.

I'm sure you guys will get it worked out eventually.


I think Lisp is funny, double semi-colons and unmatched parentheses crack me up.

Offline

#11 2013-11-17 02:58:15

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: Unit cpupower.service entered failed state

So do you plan to share your workaround here so that others who search can benefit from this thread?

Note that the people in this thread do not, I think, have this problem. You do. So it is not for us to "get it worked out eventually".

https://wiki.archlinux.org/index.php/Fo … way_Street


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#12 2013-12-31 23:55:02

ArgelErx
Member
Registered: 2013-12-30
Posts: 3

Re: Unit cpupower.service entered failed state

cfr wrote:

[...]

declare -a params=()
params+=(${governor:+-g $governor})
params+=(${min_freq:+-d $min_freq})
params+=(${max_freq:+-u $max_freq})
params+=(${freq:+-f $freq})

doesn't give me what I take it it should if I run it with test values.
[...]

Same observation here. For some arcane reason the systemd cpupower script does not do what the author intended and the bash manual page discribes.

Disabled the cpupower service for now.

PS: Happy new year!

Offline

Board footer

Powered by FluxBB