View previous topic :: View next topic |
Author |
Message |
fangwen Tux's lil' helper
Joined: 23 Oct 2011 Posts: 128 Location: Shanghai, China
|
Posted: Sat Nov 12, 2011 7:54 am Post subject: Unable to start cpufreqd |
|
|
I installed cpufreqd and used the default configuration file in /etc/cpufreqd.conf. When I ran "/etc/init.d/cpufreqd start", it threw out these error messages:
Code: | *** buffer overflow detected ***: /usr/sbin/cpufreqd terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x50)[0xb780f6f0]
/lib/libc.so.6(+0xe668a)[0xb780d68a]
/lib/libc.so.6(+0xe6de8)[0xb780dde8]
/usr/sbin/cpufreqd(main+0x834)[0x804b304]
/lib/libc.so.6(__libc_start_main+0xe6)[0xb7741126]
/usr/sbin/cpufreqd[0x804a441]
======= Memory map: ========
08048000-08052000 r-xp 00000000 08:08 206326 /usr/sbin/cpufreqd
08052000-08053000 r--p 00009000 08:08 206326 /usr/sbin/cpufreqd
08053000-08054000 rw-p 0000a000 08:08 206326 /usr/sbin/cpufreqd
083ec000-0840d000 rw-p 00000000 00:00 0 [heap]
b7708000-b7723000 r-xp 00000000 08:08 1237000 /usr/lib/gcc/i686-pc-linux-gnu/4.5.3/libgcc_s.so.1
b7723000-b7724000 r--p 0001a000 08:08 1237000 /usr/lib/gcc/i686-pc-linux-gnu/4.5.3/libgcc_s.so.1
b7724000-b7725000 rw-p 0001b000 08:08 1237000 /usr/lib/gcc/i686-pc-linux-gnu/4.5.3/libgcc_s.so.1
b7725000-b7727000 rw-p 00000000 00:00 0
b7727000-b787f000 r-xp 00000000 08:08 2269216 /lib/libc-2.12.2.so
b787f000-b7880000 ---p 00158000 08:08 2269216 /lib/libc-2.12.2.so
b7880000-b7882000 r--p 00158000 08:08 2269216 /lib/libc-2.12.2.so
b7882000-b7883000 rw-p 0015a000 08:08 2269216 /lib/libc-2.12.2.so
b7883000-b7886000 rw-p 00000000 00:00 0
b7886000-b788a000 r-xp 00000000 08:08 206023 /usr/lib/libcpufreq.so.0.0.0
b788a000-b788b000 r--p 00003000 08:08 206023 /usr/lib/libcpufreq.so.0.0.0
b788b000-b788c000 rw-p 00004000 08:08 206023 /usr/lib/libcpufreq.so.0.0.0
b788c000-b788e000 r-xp 00000000 08:08 2269494 /lib/libdl-2.12.2.so
b788e000-b788f000 r--p 00001000 08:08 2269494 /lib/libdl-2.12.2.so
b788f000-b7890000 rw-p 00002000 08:08 2269494 /lib/libdl-2.12.2.so
b7897000-b7898000 rw-p 00000000 00:00 0
b7898000-b7899000 r-xp 00000000 00:00 0 [vdso]
b7899000-b78b5000 r-xp 00000000 08:08 2269498 /lib/ld-2.12.2.so
b78b5000-b78b6000 r--p 0001b000 08:08 2269498 /lib/ld-2.12.2.so
b78b6000-b78b7000 rw-p 0001c000 08:08 2269498 /lib/ld-2.12.2.so
bfc53000-bfc74000 rw-p 00000000 00:00 0 [stack]
* start-stop-daemon: failed to start `/usr/sbin/cpufreqd'
* ERROR: cpufreqd failed to start
|
I don't know does it mean.
Any ideas? |
|
Back to top |
|
|
Erdie Advocate
Joined: 20 May 2004 Posts: 2576 Location: Heidelberg - Germany
|
Posted: Tue Nov 15, 2011 9:03 pm Post subject: |
|
|
If you dont get this solved, try powernowd. I made very good experience on Intel and AMD systems with this. One advantage is that it scales the cpu frequency independed on all cores. _________________ Desktop AMD Ryzen 9 5900X 32GB RAM, Asus GF GTX 1060.
Notebook Tuxedo Pulse 15 Gen1 AMD Ryzen 7 4800H mit Radeon Vega 7
Raspberry Pi 1 + 2 + 3B+ + Zero W |
|
Back to top |
|
|
BlueDragonX n00b
Joined: 26 Mar 2004 Posts: 44 Location: United States
|
Posted: Sun Dec 18, 2011 8:27 am Post subject: |
|
|
I can confirm I'm having the same issue. Not sure what the problem is yet but I'm going to work towards a solution. |
|
Back to top |
|
|
BlueDragonX n00b
Joined: 26 Mar 2004 Posts: 44 Location: United States
|
Posted: Sun Dec 18, 2011 9:31 am Post subject: |
|
|
It looks like a new patch was integrated into 2.4.2-r1 without doing a version bump! They should have bumped it to r2.
Do an emerge --sync and re-emerge cpufreqd. If you're using a custom ebuild you'll need to integrated the MAX_PATH patch from the portage tree into your ebuild.
I was using a custom ebuild. It was a copy of the 2.4.2-r1 ebuild with an additional patch added in. When they added the new patch without doing a version bump mine broke, too.
Hope this helps. |
|
Back to top |
|
|
WvR Apprentice
Joined: 03 Mar 2011 Posts: 200 Location: Tsuruga, Japan
|
Posted: Sun Dec 18, 2011 11:41 pm Post subject: |
|
|
BlueDragonX wrote: | I can confirm I'm having the same issue. Not sure what the problem is yet but I'm going to work towards a solution. |
That would be very interesting. The segfault of cpufreqd is a "well known" bug. It has something to do with an incompatible version of glibc. There was a discussion on one of the Gentoo bug tracking lists but I cannot find it at the moment. The basic conclusion was that unless the cpufreqd is patched, it will always segfault - unless you downgrade the system's glibc, which is not a sensible thing to do.
Personally, I have switched to cpufrequtils, works fine on my laptop (Lenovo Thinkpad X201i) |
|
Back to top |
|
|
pd1986 Guru
Joined: 19 Feb 2012 Posts: 404 Location: Paris
|
Posted: Sat Mar 10, 2012 8:12 pm Post subject: |
|
|
Have you solved the problems? I have the same issue |
|
Back to top |
|
|
gnujiri n00b
Joined: 17 Mar 2012 Posts: 1
|
Posted: Sat Mar 17, 2012 10:01 am Post subject: |
|
|
hey. think, that i got it.
what i had:
1] /etc/cpufreqd.conf properly configured
2] when i start /usr/sbin/cpufreqd it works properly
3] rc-update add cpufreqd default
4] and the problem: it wasn't able to start daemon while booting
so i checked /etc/init.d/cpufreqd by vim, like this: Code: | #vim /etc/init.d/cpufreqd |
found start() function
and there was line:
Code: | start-stop-daemon --start --exec /usr/sbin/cpufreqd -- \
-f ${CONFIGFILE} |
in fact, this line runs command "/usr/sbin/cpufreqd -- -f /etc/cpufreqd.conf" which have problem with syntax, so..
because i dont need special config files for cpufreqd, i can make every changes in /etc/cpufreqd.conf, it means that i dont need the -f parameter and certainly i don't like -- parameter, which imho caused the error.
file /etc/init.d/cpufreqd after edit:
Code: | #!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/files/cpufreqd-init.d,v 1.2 2009/10/20 10:21:34 bangert Exp $
CONFIGFILE=/etc/cpufreqd.conf
depend() {
need localmount
use logger lm_sensors
}
checkconfig() {
if [[ ! -f ${CONFIGFILE} ]]; then
eerror "Configuration file ${CONFIGFILE} not found"
return 1
fi
if [[ ! -e /proc/cpufreq ]] ; then
for cpu in /sys/devices/system/cpu/cpu[0-9]* ; do
# We need just one cpu supporting freq scaling.
[[ -e ${cpu}/cpufreq ]] && return 0
done
eerror "cpufreqd requires the kernel to be configured with CONFIG_CPU_FREQ"
eerror "Make sure that the appropiate kernel drivers for your CPU are"
eerror "built-in or loaded."
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Starting CPU Frequency Daemon"
start-stop-daemon --start --exec /usr/sbin/cpufreqd
eend ${?}
}
stop() {
ebegin "Stopping CPU Frequency Daemon"
start-stop-daemon --stop --exec /usr/sbin/cpufreqd
eend ${?}
}
|
the most important is edited start() function
hope that it will help you.. |
|
Back to top |
|
|
pd1986 Guru
Joined: 19 Feb 2012 Posts: 404 Location: Paris
|
Posted: Sat Mar 24, 2012 12:01 am Post subject: |
|
|
gnujiri wrote: | hey. think, that i got it.
what i had:
1] /etc/cpufreqd.conf properly configured
2] when i start /usr/sbin/cpufreqd it works properly
3] rc-update add cpufreqd default
4] and the problem: it wasn't able to start daemon while booting
so i checked /etc/init.d/cpufreqd by vim, like this: Code: | #vim /etc/init.d/cpufreqd |
found start() function
and there was line:
Code: | start-stop-daemon --start --exec /usr/sbin/cpufreqd -- \
-f ${CONFIGFILE} |
in fact, this line runs command "/usr/sbin/cpufreqd -- -f /etc/cpufreqd.conf" which have problem with syntax, so..
because i dont need special config files for cpufreqd, i can make every changes in /etc/cpufreqd.conf, it means that i dont need the -f parameter and certainly i don't like -- parameter, which imho caused the error.
file /etc/init.d/cpufreqd after edit:
Code: | #!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/files/cpufreqd-init.d,v 1.2 2009/10/20 10:21:34 bangert Exp $
CONFIGFILE=/etc/cpufreqd.conf
depend() {
need localmount
use logger lm_sensors
}
checkconfig() {
if [[ ! -f ${CONFIGFILE} ]]; then
eerror "Configuration file ${CONFIGFILE} not found"
return 1
fi
if [[ ! -e /proc/cpufreq ]] ; then
for cpu in /sys/devices/system/cpu/cpu[0-9]* ; do
# We need just one cpu supporting freq scaling.
[[ -e ${cpu}/cpufreq ]] && return 0
done
eerror "cpufreqd requires the kernel to be configured with CONFIG_CPU_FREQ"
eerror "Make sure that the appropiate kernel drivers for your CPU are"
eerror "built-in or loaded."
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Starting CPU Frequency Daemon"
start-stop-daemon --start --exec /usr/sbin/cpufreqd
eend ${?}
}
stop() {
ebegin "Stopping CPU Frequency Daemon"
start-stop-daemon --stop --exec /usr/sbin/cpufreqd
eend ${?}
}
|
the most important is edited start() function
hope that it will help you.. |
sorry to reply late.
I tried. It truly starts but when I check the status, it give "crashed" |
|
Back to top |
|
|
WvR Apprentice
Joined: 03 Mar 2011 Posts: 200 Location: Tsuruga, Japan
|
Posted: Sat Mar 24, 2012 9:03 am Post subject: |
|
|
gnujiri wrote: | because i dont need special config files for cpufreqd, i can make every changes in /etc/cpufreqd.conf, it means that i dont need the -f parameter and certainly i don't like -- parameter, which imho caused the error. |
Well, you didn't "solve" the problem. You may have found a quick fix (or a "workaround") - you have cured the symptom but the underlying disease remains
The problem with cpufreqd is exactly with the string handling functions which are used to manipulate file names, and somehow somewhere there is an error. Indeed, if you don't specify the log file then cpufreqd does not need to manipulate the file name and it will probably not crash.
However, until the string handling error is solved in the source of cpufreqd you have not solved the bug |
|
Back to top |
|
|
pd1986 Guru
Joined: 19 Feb 2012 Posts: 404 Location: Paris
|
Posted: Sat Mar 24, 2012 9:18 am Post subject: |
|
|
WvR wrote: | gnujiri wrote: | because i dont need special config files for cpufreqd, i can make every changes in /etc/cpufreqd.conf, it means that i dont need the -f parameter and certainly i don't like -- parameter, which imho caused the error. |
Well, you didn't "solve" the problem. You may have found a quick fix (or a "workaround") - you have cured the symptom but the underlying disease remains
The problem with cpufreqd is exactly with the string handling functions which are used to manipulate file names, and somehow somewhere there is an error. Indeed, if you don't specify the log file then cpufreqd does not need to manipulate the file name and it will probably not crash.
However, until the string handling error is solved in the source of cpufreqd you have not solved the bug |
Thanks. Frankly speaking, I don't totally understand what you are talking about. I still don't know where I could start to fix the string error. In this case, waiting may be a choice. Anyway, everything that I do aims at fixing my fan problem. I have to try everything about power management to find where the problem is(still don't find it). In fact, I don't really need cpufreqd, as the cpu frequency control works well even without cpufreqd. |
|
Back to top |
|
|
s_j_newbury n00b
Joined: 05 Apr 2007 Posts: 56 Location: UK
|
|
Back to top |
|
|
pd1986 Guru
Joined: 19 Feb 2012 Posts: 404 Location: Paris
|
Posted: Sat Mar 31, 2012 1:08 pm Post subject: |
|
|
Thanks. One question.
Given that the status is marked "unconfirmed", does it mean that the patch hasn't been put into the cpufreqd package in the emerge tree? so that it will change nothing if I remerge cpufreqd from emerge tree? |
|
Back to top |
|
|
theven n00b
Joined: 24 Mar 2012 Posts: 3
|
Posted: Thu Aug 01, 2013 9:13 pm Post subject: |
|
|
gnujiri wrote: | because i dont need special config files for cpufreqd, i can make every changes in /etc/cpufreqd.conf, it means that i dont need the -f parameter and certainly i don't like -- parameter, which imho caused the error.
Code: | start-stop-daemon --stop --exec /usr/sbin/cpufreqd |
|
Work for me, fix "crashes" in cpufreqd-2.4.2 |
|
Back to top |
|
|
gnumber9 n00b
Joined: 25 Jan 2014 Posts: 4
|
Posted: Mon Feb 03, 2014 12:09 am Post subject: |
|
|
editing this line
Code: | start-stop-daemon --start --exec /usr/sbin/cpufreqd -- \
-f ${CONFIGFILE}
|
to be this line
Code: | start-stop-daemon --stop --exec /usr/sbin/cpufreqd |
Also worked here.
Sorry if i posted this in an old thread. however, i can now throttle my cpu with a command. which is nice.
[edit] this actually did not work. the program started, but once i set a governor the cpu would not throttle. too, i could not return the cpu to any other speed with the command . so i did what i should have done in the first place and that was to have paid attention to the thread and then follow the gentoo wiki. my CPU now throttles as it should. [/edit]
Last edited by gnumber9 on Mon Feb 03, 2014 2:45 pm; edited 2 times in total |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Mon Feb 03, 2014 1:16 am Post subject: |
|
|
I do not have this problem.
In the past I ever had troubles with Cpufreqd on other distributions than Gentoo. So I stop to use it and just set the cpu frequency policy with Cpufrequtils. Recently, I came back to Cpufreqd on Debian and start using it with Gentoo too. After setting /etc/cpufreqd.conf properly to make Cpufreqd do what I want, it start, stop, restart and status normally on both systems. It is set to start at boot time and never fail. I got exactly what I set when I execute the cpufreqd-get command
Code: | cpufreqd-get
Name (#1): Conservative
Active on CPU#: 0, 1
Governor: conservative
Min freq: 1400000
Max freq: 2700000
Name (#2): Powersave
Governor: powersave
Min freq: 1400000
Max freq: 1400000 |
and Cpufreqd behave accordingly. I never edit /etc/init.d/cpufreqd. ps and rc-service tell me
Code: | ps aux|grep cpufreqd
root 2473 0.2 0.0 43816 1324 ? Ssl janv.29 13:31 /usr/sbin/cpufreqd -f /etc/cpufreqd.conf
gnu 26149 0.0 0.0 12356 960 pts/0 S+ 20:00 0:00 grep --colour=auto cpufreqd |
Code: | sudo rc-service cpufreqd status
* status: started |
These are my Cpufreqd and Glilc versions
Code: | equery l cpufreqd glibc
* Searching for cpufreqd ...
[IP-] [ ] sys-power/cpufreqd-2.4.2-r2:0
* Searching for glibc ...
[IP-] [ ] sys-libs/glibc-2.17:2.2 |
_________________ Paul |
|
Back to top |
|
|
|