You are not logged in.
Pages: 1
Hi, first of all let me congrat all the developers and community around Archlinux. I'm new to this distribution but I've been playing around with Linux for some years now.
Now my question, I've made a search and I could not find a thing about powerthend - no one until now tried this under Archlinux?
Offline
Hi,
well how good can it be since it has shit-in-its-name. No seriously. Anyway I never heard of it but it does look promising, I use the cpufrequtils in the Arch repos which suit me fine. You have any idea why this would be better?
You will probably get a lot of responses now that suggest you build-it-yourself if you want to use it though.
stefan
"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998
Offline
Well it's better alright, I've been using it for more than 1 year and it delivers quicker response when some task needs more cpu. It's on my "to-do" list but I've just moved to Arch so I'm compiling/creating packages for what I need most:
- Virtualbox 1.6 is out, so I'll rebuild the new version if I can
- Google Earth package
- Powerthend (I call it that way but it's really PowerThen Daemon)
- idjc (something like Sam Broadcaster but for Linux)
- Krusader 1.90.0 (already compiled and working)
So, just give me some time before the flames about "do it yourself" because I sure will. Then I will Read The FM before contributing with something. ![]()
Offline
Well it's better alright, I've been using it for more than 1 year and it delivers quicker response when some task needs more cpu. It's on my "to-do" list but I've just moved to Arch so I'm compiling/creating packages for what I need most:
- Virtualbox 1.6 is out, so I'll rebuild the new version if I can
- Google Earth package
- Powerthend (I call it that way but it's really PowerThen Daemon)
- idjc (something like Sam Broadcaster but for Linux)
- Krusader 1.90.0 (already compiled and working)So, just give me some time before the flames about "do it yourself" because I sure will. Then I will Read The FM before contributing with something.
well as for virtualbox 1.6, people are already working to get it in AUR so you could wait/help there but I tried the generic linux i386 download .run file which runs fine on my Arch_i686 system even with my existing 1.5.6 virtual machines
stefan
"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998
Offline
Thanks for pointing that out Stefan, I see that google earth is in AUR too.
Offline
PKGBUILD:
# Contributor: Ramses de Norre <snip>
pkgname=powerthend
pkgver=1.1.1
pkgrel=1
pkgdesc="Daemon to control the speed and voltage of CPUs."
arch=(i686 x86_64)
url="http://powerthend.scheissname.de/"
license=('GPL2')
source=(http://powerthend.scheissname.de/sources/$pkgname-$pkgver.tar.gz)
build() {
cd $startdir/src/$pkgname-$pkgver
sed -i "s|/usr/sbin|$startdir/pkg/usr/sbin|g" Makefile
install -d $startdir/pkg/usr/sbin
make || return 1
make install || return 1
install -d $startdir/pkg/etc/rc.d
install -m 755 -o root -g root powerthend.init $startdir/pkg/etc/rc.d/powerthend
}
md5sums=('fc99bb7d2d6fbcb6f11af4d0133d0c7e')The init script isn't working though, manually starting the daemon does work.
EDIT: removed mail address.
Last edited by Ramses de Norre (2008-11-14 17:40:08)
Offline
Thanks Ramses, the init scripts from zenwalk are quite good and I think it may be simple to adapt to Arch, since are you the maintainer can you have a look at this?
http://users.zenwalk.org/user-accounts/ … owerthend/
Offline
Thanks Ramses, the init scripts from zenwalk are quite good and I think it may be simple to adapt to Arch, since are you the maintainer can you have a look at this?
http://users.zenwalk.org/user-accounts/ … owerthend/
I'll look into that and I'll put the package in AUR. Thanks for the link ![]()
http://aur.archlinux.org/packages.php?ID=16937
Last edited by Ramses de Norre (2008-05-12 14:45:16)
Offline
Ramses, how about something like this to the daemon script, do you think the detection can be done this way?
##!/bin/bash
## CPU Frequency scaling script
## Requires bc for status calculations
## $driver must be set for this to work
statpath=/sys/devices/system/cpu/cpu0/cpufreq
stats() {
curfreq="$(cat ${statpath}/cpuinfo_cur_freq)"
maxfreq="$(cat ${statpath}/cpuinfo_max_freq)"
minfreq="$(cat ${statpath}/cpuinfo_min_freq)"
maxscal="$(cat ${statpath}/scaling_max_freq)"
minscal="$(cat ${statpath}/scaling_min_freq)"
avafreq=($(cat ${statpath}/scaling_available_frequencies))
driscal="$(cat ${statpath}/scaling_driver)"
setscal="${statpath}/scaling_setspeed"
pid="$(pidof powerthend)"
echo ""
echo -n "Daemon Running:"
if [ -n "${pid}" ]; then
echo -e "\t\t\bYes\n"
else
echo -e "\t\t\bNo\n"
fi
echo -n "Current Frequency:"
echo -e "\t\b${curfreq:0:1}.${curfreq:1:2}ghz\n"
echo -n "CPU Max:"
echo -e "\t\t\b${maxfreq:0:1}.${maxfreq:1:2}ghz\n"
echo -n "Scaling Max:"
echo -e "\t\t\b${maxscal:0:1}.${maxscal:1:2}ghz\n"
echo -n "CPU Min:"
echo -e "\t\t\b${minfreq:0:1}.${minfreq:1:2}ghz\n"
echo -n "Scaling Min:"
echo -e "\t\t\b${minscal:0:1}.${minscal:1:2}ghz\n"
echo -n "Avaliable Frequencies:"
i=0
unset damnhack
while [ -n "${avafreq[$i]}" ]; do
echo -e " ${damnhack}${avafreq[$i]:0:1}.${avafreq[$i]:1:2}ghz"
damnhack="\t\t\t\b"
let i++;
done
echo ""
echo -n "Current Driver:"
echo -e "\t\t\b${driscal}\n"
}
modcheck() {
if [ -n "$(grep vendor /proc/cpuinfo | grep AMD)" ]; then
for module in powernow-k6 powernow-k7 powernow-k8; do
if [ -z "$( modprobe $module 2>&1 )" ]; then
driver=${module}
break
fi
done
elif [ -n "$(grep vendor /proc/cpuinfo | grep Intel)" ]; then
for module in p4-clockmod speedstep-centrino acpi-cpufreq; do
if [ -z "$( modprobe $module 2>&1 )" ]; then
driver=${module}
break
fi
done
fi
}
setspeed() {
echo "${1}" > ${statpath}/scaling_setspeed
}
case ${1} in
start|restart|dyn|low|high)
killall -15 powerthend >& /dev/null
modcheck
case ${1} in
start|restart|dyn)
/usr/sbin/powerthend
echo $(cat ${statpath}/cpuinfo_min_freq) > ${statpath}/scaling_min_freq
echo $(cat ${statpath}/cpuinfo_max_freq) > ${statpath}/scaling_max_freq
;;
low)
setspeed $(cat ${statpath}/cpuinfo_min_freq)
;;
high)
setspeed $(cat ${statpath}/cpuinfo_max_freq)
;;
esac
;;
stop)
killall -15 powerthend >& /dev/null
setspeed $(cat ${statpath}/cpuinfo_max_freq)
;;
status)
modcheck
stats
;;
*)
echo "Usage: (start|stop|dyn|low|high|restart|status)"
;;
esacIf so you have to include bc as dependency.
Offline
I've included a modified version of the powernowd initscript, is there anything missing that I should add?
Offline
We only need to use that and to have the dependency of "bc". Maybe you can also include an echo telling to add the service powerthend to rc.conf. I've been using that script and it works great, and the computer is more responsive than using cpufreq in my opinion (in xfce if you add the CPU frequency plugin you can see the difference).
Offline
Does your complicated script have any significant improvements over the one I've included? If so I'll look into it ![]()
And I think people now about adding daemons to rc.conf, that's pretty obvious, isn't it?
Offline
Is there a command for powerthend similar to cpufreq-info?
I just switched to powerthend but have no idea if it's working?
Offline
With the script I proposed you have the "status" argument to check status, with the actual build script from AUR you have to do it with something like:
watch grep \"cpu MHz\" /proc/cpuinfoRamses, if you look at the script I proposed you'll see it's a complete one that installs the cpu governor module, get status of it, and let you control it more efficiently - the only bug I see is how it converts the speed:
/etc/rc.d/powerthend status
Daemon Running: Yes
Current Frequency: 8.25ghz
CPU Max: 2.20ghz
Scaling Max: 2.20ghz
CPU Min: 2.75ghz
Scaling Min: 2.75ghz
Avaliable Frequencies: 2.75ghz
5.50ghz
8.25ghz
1.10ghz
1.37ghz
1.65ghz
1.92ghz
2.20ghz
Current Driver: p4-clockmodAvailable frequencies should read:
Avaliable Frequencies: 275mhz
550mhz
825mhz
1.10ghz
1.37ghz
1.65ghz
1.92ghz
2.20ghzOffline
Pages: 1