cpufrequtils can't find expected /sys/devices/system/cpu/cpufreq

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

cpufrequtils can't find expected /sys/devices/system/cpu/cpufreq

Walter Dnes
  I'm finishing up on installing Gentoo on a laptop.  I tried testing
cpufrequtils, and ran into problems...

[aa1][root][/usr/src/linux] /etc/init.d/cpufrequtils start
 * Caching service dependencies ...                          [ ok ]
 * Running cpufreq-set --governor conservative -- ...
/usr/libexec/cpufrequtils-change.sh: line 26: cd:
/sys/devices/system/cpu/cpufreq: No such file or directory   [ !! ]
 * ERROR: cpufrequtils failed to start

  I found some promising-looking threads on forums.gentoo.org, but the
forum gives...

phpBB : Critical Error

Could not connect to the database

...so that wasn't any help.  Am I missing some kernel setting?  Note
that I'me running mdev instead of udev.  Could that be the problem?

--
Walter Dnes <[hidden email]>
I don't run "desktop environments"; I run useful applications

Reply | Threaded
Open this post in threaded view
|

Re: cpufrequtils can't find expected /sys/devices/system/cpu/cpufreq

Neil Bothwick
On Thu, 24 Apr 2014 02:27:05 -0400, Walter Dnes wrote:

> [aa1][root][/usr/src/linux] /etc/init.d/cpufrequtils start
>  * Caching service dependencies ...                          [ ok ]
>  * Running cpufreq-set --governor conservative -- ...
> /usr/libexec/cpufrequtils-change.sh: line 26: cd:
> /sys/devices/system/cpu/cpufreq: No such file or directory   [ !! ]
>  * ERROR: cpufrequtils failed to start

I get a similar message, it appears to be looking in the wrong place.

/sys/devices/system/cpu/cpufreq does not exist but
/sys/devices/system/cpu/cpu{0..3}/cpufreq do


--
Neil Bothwick

Engineers do it with less resistance.

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cpufrequtils can't find expected /sys/devices/system/cpu/cpufreq

J. Roeleveld
On Thursday 24 April 2014 10:13:39 Neil Bothwick wrote:

> On Thu, 24 Apr 2014 02:27:05 -0400, Walter Dnes wrote:
> > [aa1][root][/usr/src/linux] /etc/init.d/cpufrequtils start
> >
> >  * Caching service dependencies ...                          [ ok ]
> >  * Running cpufreq-set --governor conservative -- ...
> >
> > /usr/libexec/cpufrequtils-change.sh: line 26: cd:
> > /sys/devices/system/cpu/cpufreq: No such file or directory   [ !! ]
> >
> >  * ERROR: cpufrequtils failed to start
>
> I get a similar message, it appears to be looking in the wrong place.
>
> /sys/devices/system/cpu/cpufreq does not exist but
> /sys/devices/system/cpu/cpu{0..3}/cpufreq do

Strange, on my system it does exist:

# ls -lsa /sys/devices/system/cpu/cpufreq*
total 0                                                                                                                                                                                                                                      
0 drwxr-xr-x  2 root root    0 Apr 24 11:19 .                                                                                                                                                                                                
0 drwxr-xr-x 10 root root    0 Apr 24 07:06 ..                                                                                                                                                                                              
0 -r--r--r--  1 root root 4096 Apr 24 11:19 boost

along with the cpu{0..3} options.

When going through the CPUFREQ options in menuconfig, the following option
mentions a "boost" entry:
**********
CONFIG_X86_ACPI_CPUFREQ_CPB:                                                                                                                                                                                                        
The powernow-k8 driver used to provide a sysfs knob called "cpb"                                                                                                                                                                      
to disable the Core Performance Boosting feature of AMD CPUs. This                                                                                                                                                                  
file has now been superseeded by the more generic "boost" entry.                                                                                                                                                                    

By enabling this option the acpi_cpufreq driver provides the old                                                                                                                                                                    
entry in addition to the new boost ones, for compatibility reasons.                                                                                                                                                                  

Symbol: X86_ACPI_CPUFREQ_CPB [=y]                                                                                                                                                                                                    
Type  : boolean                                                                                                                                                                                                                      

Prompt: Legacy cpb sysfs knob support for AMD CPUs                                                                                                                                                                                  
*********

--
Joost

Reply | Threaded
Open this post in threaded view
|

Re: cpufrequtils can't find expected /sys/devices/system/cpu/cpufreq

Holger Hoffstätte
In reply to this post by Neil Bothwick
On Thu, 24 Apr 2014 10:13:39 +0100, Neil Bothwick wrote:

> On Thu, 24 Apr 2014 02:27:05 -0400, Walter Dnes wrote:
>
>> [aa1][root][/usr/src/linux] /etc/init.d/cpufrequtils start
>>  * Caching service dependencies ...                          [ ok ]
>>  * Running cpufreq-set --governor conservative -- ...
>> /usr/libexec/cpufrequtils-change.sh: line 26: cd:
>> /sys/devices/system/cpu/cpufreq: No such file or directory   [ !! ]
>>  * ERROR: cpufrequtils failed to start
>
> I get a similar message, it appears to be looking in the wrong place.
>
> /sys/devices/system/cpu/cpufreq does not exist but
> /sys/devices/system/cpu/cpu{0..3}/cpufreq do

It depends on the CPU frequency governor. If CONFIG_X86_INTEL_PSTATE is
set and active (depending on your CPU model), the traditional governors
(like ondemand) and their correspondig sysfs entries are disabled.
For example I have the former (cpufreq) entry on my old core2 laptop,
but no such entry on my machines with i5/i7 with pstate despite the same
3.12.x kernel everywhere.
Generally pstate is much better than ondemand for both performance and
especially powersave mode.

Also AFAIK cpufrequtils are unmaintained/deprecated/dead, you should
migrate to sys-power/cpupower. It's slightly different but IIRC easy
to switch to.

-h


Reply | Threaded
Open this post in threaded view
|

Re: cpufrequtils can't find expected /sys/devices/system/cpu/cpufreq

Neil Bothwick
In reply to this post by J. Roeleveld
On Thu, 24 Apr 2014 11:28:34 +0200, Joost Roeleveld wrote:

> > /sys/devices/system/cpu/cpufreq does not exist but
> > /sys/devices/system/cpu/cpu{0..3}/cpufreq do
>
> Strange, on my system it does exist:
>
> When going through the CPUFREQ options in menuconfig, the following
> option mentions a "boost" entry:
> **********
> CONFIG_X86_ACPI_CPUFREQ_CPB:                                                                                                                                                                                                        
> The powernow-k8 driver used to provide a sysfs knob called
> "cpb" to disable the Core Performance Boosting feature of AMD CPUs.
> This file has now been superseeded by the more generic "boost"
> entry.                                                                                                                                                                    
>
> By enabling this option the acpi_cpufreq driver provides the
> old entry in addition to the new boost ones, for compatibility
> reasons.                                                                                                                                                                  
I don't have the directory even on systems with this kernel option
enabled, it must be something else.


--
Neil Bothwick

"Press Return to Continue" - known as "The Mail Menupause".

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cpufrequtils can't find expected /sys/devices/system/cpu/cpufreq

Walter Dnes
In reply to this post by Holger Hoffstätte
On Thu, Apr 24, 2014 at 09:35:27AM +0000, Holger Hoffstätte wrote
>
> It depends on the CPU frequency governor. If CONFIG_X86_INTEL_PSTATE is
> set and active (depending on your CPU model), the traditional governors
> (like ondemand) and their correspondig sysfs entries are disabled.
> For example I have the former (cpufreq) entry on my old core2 laptop,
> but no such entry on my machines with i5/i7 with pstate despite the same
> 3.12.x kernel everywhere.
> Generally pstate is much better than ondemand for both performance and
> especially powersave mode.

  It's an old AMD dual-core cpu (from /proc/cpuinfo)

vendor_id       : AuthenticAMD
cpu family      : 16
model           : 6
model name      : AMD Athlon(tm) II P320 Dual-Core Processor
stepping        : 3
microcode       : 0x10000b6

 
> Also AFAIK cpufrequtils are unmaintained/deprecated/dead, you should
> migrate to sys-power/cpupower. It's slightly different but IIRC easy
> to switch to.

  Thanks.  I've got it working.  I prefer the "conservative" governor,
which doesn't jump around as much.  Both cores now show...

  maximum transition latency: 4.0 us.
  hardware limits: 800 MHz - 2.10 GHz
  available frequency steps: 2.10 GHz, 1.50 GHz, 800 MHz
  available cpufreq governors: ondemand, userspace, powersave, conservative, performance
  current policy: frequency should be within 800 MHz and 2.10 GHz.
                  The governor "conservative" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).

--
Walter Dnes <[hidden email]>
I don't run "desktop environments"; I run useful applications

Reply | Threaded
Open this post in threaded view
|

Re: cpufrequtils can't find expected /sys/devices/system/cpu/cpufreq

Samuli Suominen-4
In reply to this post by Walter Dnes
cpufreqd, cpufrequtils are both dead packages for years now, it's
propably cpupower you want instead,
the only package getting updated for constantly changing paths in /sys



On 24/04/14 09:27, Walter Dnes wrote:

>   I'm finishing up on installing Gentoo on a laptop.  I tried testing
> cpufrequtils, and ran into problems...
>
> [aa1][root][/usr/src/linux] /etc/init.d/cpufrequtils start
>  * Caching service dependencies ...                          [ ok ]
>  * Running cpufreq-set --governor conservative -- ...
> /usr/libexec/cpufrequtils-change.sh: line 26: cd:
> /sys/devices/system/cpu/cpufreq: No such file or directory   [ !! ]
>  * ERROR: cpufrequtils failed to start
>
>   I found some promising-looking threads on forums.gentoo.org, but the
> forum gives...
>
> phpBB : Critical Error
>
> Could not connect to the database
>
> ...so that wasn't any help.  Am I missing some kernel setting?  Note
> that I'me running mdev instead of udev.  Could that be the problem?
>


yac
Reply | Threaded
Open this post in threaded view
|

Re: cpufrequtils can't find expected /sys/devices/system/cpu/cpufreq

yac
In reply to this post by Walter Dnes
On Thu, 24 Apr 2014 02:27:05 -0400
"Walter Dnes" <[hidden email]> wrote:

>   I'm finishing up on installing Gentoo on a laptop.  I tried testing
> cpufrequtils, and ran into problems...
>
> [aa1][root][/usr/src/linux] /etc/init.d/cpufrequtils start
>  * Caching service dependencies ...                          [ ok ]
>  * Running cpufreq-set --governor conservative -- ...
> /usr/libexec/cpufrequtils-change.sh: line 26: cd:
> /sys/devices/system/cpu/cpufreq: No such file or directory   [ !! ]
>  * ERROR: cpufrequtils failed to start

I haven't tried this myself but I believe you need
CPU_FREQ_DEFAULT_GOV_USERSPACE kernel config.

And I guess this is the ultimate reference:
https://www.kernel.org/doc/Documentation/cpu-freq/index.txt


---
Jan Matějka        | Developer
https://gentoo.org | Gentoo Linux
GPG: A33E F5BC A9F6 DAFD 2021  6FB6 3EBF D45B EEB6 CA8B

signature.asc (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cpufrequtils can't find expected /sys/devices/system/cpu/cpufreq

James-2
yac <yac <at> gentoo.org> writes:


> >   I'm finishing up on installing Gentoo on a laptop.  I tried testing
> > cpufrequtils, and ran into problems...

> I haven't tried this myself but I believe you need
> CPU_FREQ_DEFAULT_GOV_USERSPACE kernel config.
 
> And I guess this is the ultimate reference:
> https://www.kernel.org/doc/Documentation/cpu-freq/index.txt


Well, for sure I have not kept up with all these issues. But some
kernel versions ago, there was heavy work on the I/O and various schedulers,
memory management etc etc. All of these settings effect the processor(s)
speeds, idle etc. I started reading about overclocking my FX-8350 after I
got the water cooler installed and realize about a year ago,
many, many things have changed. So I guess what I'm saying is this
subject get's very complicated very quick, with lots of new options
for performance tuning on a system.

I'd read up a bit and find similar things that folks have done to "optimize"
a workstation (laptop) for speed or economy (power consumption) and start
with that before tweaking and testing the myriad of things that can effect
your system's overall performance. On laptops, some graphics hardware can be
put to sleep for substantial power savings, along with tricks on HD
operations......

Surely monitoring the cpu temerpatures is the best place to start, but
there is so much more to tune now, kernel and otherwise.


Arch Linux has some nice docs that may get your research going:

https://wiki.archlinux.org/index.php/CPU_frequency_scaling

https://wiki.archlinux.org/index.php/maximizing_performance


hth,
James