LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-31-2008, 02:11 PM   #1
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Rep: Reputation: 33
Configuring CPU Throttling


Hi,
I am currently running a slackware system off of my laptop. I have tried to set it up so that as soon as i remove my AC adapter the CPU throttles down. However, the only way i can get this to semi-work is when i start the laptop up with out the power cord, but then it is stuck at 50% throttled. I was wondering if there is anyway to do this on the fly without having to go to the Power management tab in KDE to manually change it.
Thanks.
 
Old 01-31-2008, 03:02 PM   #2
CrEsPo
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware 12
Posts: 184

Rep: Reputation: 30
Are you familiar with scripting If not I can fool around later, but the idea is to grab the state of the AC Adapter and then depending on the state you can run a command which will change the CPU throttle.

Determing the state of the AC Adapter:

Code:
 cat /proc/acpi/ac_adapter/ACAD/state 
state:                   on-line
As you can see the state is on-line meaning it's plugged in. You can create the script in two ways: Look for the adapter to be "on-line" or look for the adapter to be "off-line" (not I'm not 100% if it'll be "off-line" just an assumption). Once the script is made and tested you can run it on a schedule (using cron), say every 5 minutes or 10 minutes, and it'll proceed to check if the adapter is present and then throttle based on the state.
 
Old 01-31-2008, 03:22 PM   #3
ludist
Member
 
Registered: Nov 2005
Location: Greece
Distribution: Slackware
Posts: 172

Rep: Reputation: 21
I don't know if it's easy to install kpowersave.

You can also work with ACPI daemon. Endless possibilities but difficult...
 
Old 01-31-2008, 07:12 PM   #4
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Original Poster
Rep: Reputation: 33
@CrEsPo: I am not too familiar with scripting, however the second state is "off line".

@ludist: right now i am playing around with the KDE power management so i haven't tried anything else.
 
Old 02-01-2008, 02:27 AM   #5
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Just install cpufreqd.
 
Old 02-01-2008, 03:28 AM   #6
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,352

Rep: Reputation: 75
I do not know if it will help you but I do have my Athlon set up to drop to 50% depending on demand


Uncomment in the conf file ( sorry I am away from my PC and cannot remmber the name)

/sbin/modprobe powernow-k8
/sbin/modprobe cpufreq-ondemand

put in rc.local

if [ -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ]; then
echo -n "Setting Scaling Governor : "
echo -n ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand"
fi
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable CPU throttling on RHEL 5 ykwok Red Hat 1 04-06-2009 03:16 PM
Intel Celeron CPU throttling Libra RHR Linux - Hardware 4 07-19-2007 02:56 PM
CPU throttling lcaley Linux - Hardware 14 01-06-2007 05:14 AM
CPU Throttling Fix forSuSE 10.0 p_kelchen SUSE / openSUSE 0 01-09-2006 08:20 AM
acpi cpu-throttling in a bsd shadowhunter *BSD 0 01-15-2004 10:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration