LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-24-2006, 10:35 AM   #1
stitchman
Member
 
Registered: Dec 2005
Distribution: Slackware 13.1
Posts: 82

Rep: Reputation: 15
Laptop: Goodbye XP, Hello Slack!


Hey everyone. Yesterday I decided to finally just give in and I hosed XP off of my laptop. I managed to get slack 10.2 with the 2.6.13 kernel running, and I have X and my wireless card running smooth as butter. I was wondering though if anyone could point me in the direction of programs that deal with laptop stuff like battery monitoring and CPU frequency scaling. I am basically a beginner user so I don't have a working knowledge of most things "Linux". If anyone has any tips for getting the most out of laptops (slacktops?) please do, I will be most greatful.
 
Old 04-24-2006, 11:45 AM   #2
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Rep: Reputation: 30
I know that KDE has a nice battery monitor and some other goodies. May want to check with that. Gnome also has some decenet software. What other programs do you need? Open Office is a great package too.
 
Old 04-24-2006, 01:20 PM   #3
kite
Member
 
Registered: Aug 2003
Location: Shenzhen, China
Distribution: Slackware
Posts: 306

Rep: Reputation: 47
cpufreq-selector can let you change CPU frequence if you have necessary kernel options selected for cpufreq. If you use gnome, there is a handy applet for it. Here I can select 600Mhz, 800Mhz, 1Ghz, 1.2Ghz, 1.4Ghz, 1.5Ghz by mouse click (IBM X31 laptop).
 
Old 04-24-2006, 01:33 PM   #4
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
stitchman I'm really glad to read that!!!

on my slacktop I use cpudynd to manage cpufreq and suspending unused drives (cd-roms or hard drives)

for battery and general system monitoring I use gkrellm, I think (I'm not sure) it actually comes with Slackware

I used to rely system monitoring on superkaramba themes like this one though I dropped because I felt it more resource-hungry

I think I got really out-of-topic, I should get myself a really-freakin-big coffee and continue my ordinary slackare-ish programming

Godspeed, people
 
Old 04-24-2006, 03:57 PM   #5
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
For KDE, which you most likely have running with Slack 10.2, the laptop battery monitor that comes with it is ok but I've had problems with it in later versions of KDE. I find gkrellm works better and also includes the system and hardware monitors.

CPU frequency scaling requires certain kernel options enabled and then you have to install a utility, such as the ones mentioned by kite and raska, to actually do the scaling.

A couple of tips that I've learned:
1. Use a lightweight window manager if using the battery.
2. Use dark colors for the desktop theme if using the battery.
3. I've found that for general usage (office, internet, non-intense games) ramdisks and swap space are not necessary.
4. Keep the system logs small and rotated regularly
5. Keep the /tmp clean
6. Non-Linx related: don't recharge the battery with the laptop in an enclosed space. I learned the hard way.

Slack on !
 
Old 04-24-2006, 04:34 PM   #6
kriton12
Member
 
Registered: Oct 2002
Posts: 81

Rep: Reputation: 16
Yeah, you need to compile in support for ACPI in the kernel if it's not already done. Also as far as speed stepping the processor goes, naturally your processor has to have this capability, then you need to compile that into the kernel as well and get a program running as a daemon to monitor and applie the changes for you (as others have previously said). Good luck!
 
Old 04-24-2006, 09:38 PM   #7
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 934

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
I use the ondemand governor built into the kernel. I think it works great. You can tweak the performance through the /sys directory. Here's some info from my kernel config:

Code:
$cat config | grep CPU | grep FREQ
# CPU Frequency scaling
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=y
# CONFIG_CPU_FREQ_STAT_DETAILS is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
# CPUFreq processor drivers
CONFIG_X86_ACPI_CPUFREQ=y
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
I also created an rc script to run at bootup, called from rc.local to switch to the ondemand governor:

Code:
#!/bin/sh
#
# This slows down the processor and sets some parameters
#

echo "Switching to ondemand governor..."
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo 10 > \
  /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_down_factor
echo 100000 > \
  /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
I think this way is great, because all the frequency changing is done via the kernel. Not much overhead (I think). You can also do some other fancy stuff. My cpu ranges from 600 to 1300MHz. I also run Folding@Home, which uses spare cycles and runs as a nice program. Ondemand (by default-can be changed by writing to /sys/.../ondemand/ignore_nice) ignores nice process in it's decision making process for stepping up the cpu. You can also set the min. speed, so I bump it up to 800 MHz. My computer still stays cool, but continues to utilize the cpu when playing games or compiling software.
 
Old 04-25-2006, 12:48 AM   #8
-=Graz=-
Member
 
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358

Rep: Reputation: 31
Definately compile 'ACPI' and associated goodies into your kernel. I use the 'ondemand' governor as well when plugged into mains and 50% of the time when running off battery. Ondemand is great as it will up the frequency when required (thus keeping your laptop cool temperature wise most of the time too). This also means the fan wont be running all the time. The only downside with the ondemand governor is it ups from lowest freq to highest in less than a second and then slowly drops back down to lowest again..
The 'Conservative' governor is meant to work better for battery operated devices and slowly increases and decreases accordingly. ondemand is definately better than just being stuck on the minimum state all the time though (which is what happens if you dont have ACPI enabled)

once you have ondemand installed and ready to go you can enable each boot by entering
echo -n ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
into /etc/rc.d/rc.local

i find that it is a pretty good all rounder. I then use the KDE power manager thing to do manual changes if required.
You can also specify rules so the system will change between governors, these from memory are found in:
/etc/cpufreqd.conf (i could never get the KDE way to work)

You can also have a dig in /sys (if you are using ACPI)
/sys/devices/system/cpu/cpu0/cpufreq will show you which governor you are currently running and its various states.
any of the files in hear you can type #cat filename from the console to see its contents.

I spent ages muking around with all the governors and various userspace programs (like cpuspeedy) and ended up just settings for ondemand as it works very well.

*** Hehehe, Slacktops eh... thats good. I love my slacktop!!

Last edited by -=Graz=-; 04-25-2006 at 12:50 AM.
 
Old 04-25-2006, 01:11 AM   #9
kite
Member
 
Registered: Aug 2003
Location: Shenzhen, China
Distribution: Slackware
Posts: 306

Rep: Reputation: 47
I think if AC adaptor is plugged, we should use ondemand mode, but while AC adaptor is unplugged, userspace plus cpufreq-selector etc should be chosen, so that you can set the lowest freq by hand (provided that you are not compiling anything with only battery power :-) ). What do you think?
 
Old 04-25-2006, 01:27 AM   #10
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 934

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
I think ondemand is fine. My laptop (slacktop) has been on for 6 hours. 91.5% of the time has been spent in the low state. During this time I have upgraded to current, issued updatedb, and have been compiling a very small program over and over and... you get the point. Usually it spends 97 to 99.5% of the time in the lowest state.

As far as slowly going down, it is slow, compared to how fast it steps up. My current sampling rate is 100000. The down factor is 10. If I understand it right, this means when it has the ability to drop to a lower state, it checks every 0.1 ms. That's plenty fast for me.

Of course, you're free to use whatever combination of frequency selectors you want. I'm just defending my choice.
 
Old 04-25-2006, 01:40 AM   #11
-=Graz=-
Member
 
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358

Rep: Reputation: 31
kite, yeah this is how i went at the start but then opted to just use ondemand unless i say otherwise (at least this way i wont do a manual set to something quite high and then forget)
As far as what you said drumz, yes i agree - the machine would spend most of its time in the lowest state.. I seem to just always be trying to teach myself something new and end up using it quite a bit.. i found that as soon as i load an app or do anything that requires any power it bumps up to 1.8Ghz from the 600mhz...
it does not seem to read anything i enter in /etc/cpufreqd.conf - is there another file i should be looking at?

i found a nice way to monitor what it is doing whilst testing is to do this:
watch grep \"cpu MHz\" /proc/cpuinfo
and keep it 'above all windows' in your xwindows...
 
Old 04-25-2006, 12:09 PM   #12
stitchman
Member
 
Registered: Dec 2005
Distribution: Slackware 13.1
Posts: 82

Original Poster
Rep: Reputation: 15
Wow thanks for all of the responces. Upon reflection I think I asked the wrong question, or rather I have refined it. When I installed the 2.6.13 kernel I assumed ACPI was already enabled. Checking out some of the responces I recieved I noticed that /sys/devices/system/cpu/cpu0/cpufreq does not exist, so I guess my new question is, how do I enable ACPI on my kernel? I have never compiled a kernel before but I suppose there is a first time for everything. All of your responces were great by the way, and also for reference, I use Fluxbox, I like simplicity and speed.

EDIT: I think when I do get ACPI working I would like to use the ondemand feature, I like the idea of just using something in the kernel instead of yet-another-program to handle it.

Last edited by stitchman; 04-25-2006 at 12:11 PM.
 
Old 04-25-2006, 12:35 PM   #13
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 934

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
The only way I know of to modify the settings is through /sys.

If you're using xconfig, CPU Frequency scaling is under Power Management Options. You need to check "'ondemand' cpufreq policy governor" and "ACPI Processor P-States Driver". Then you need to check the correct box below for your computer. For mine, it's "Intel Enhanced Speedstep", which includes the Pentium M processors.
 
Old 04-25-2006, 12:59 PM   #14
stitchman
Member
 
Registered: Dec 2005
Distribution: Slackware 13.1
Posts: 82

Original Poster
Rep: Reputation: 15
Ok I dont think i have cpufreq enabled in my kernel If it isn't a headache could someone set me down the right path to enable it? If this is just a kernel compiling question my apologies, I've never compiled one myself before.
 
Old 04-26-2006, 02:54 AM   #15
komuthan
Member
 
Registered: Sep 2005
Distribution: Slackware 10.2
Posts: 58

Rep: Reputation: 15
The cpu freq scalling and acpi options are compiled as module in slackware test kernel 2.6.13 comes with slack 10.2
You can load these modules onboot time with editing rc.modules
I using cpufreqselector and cpuspeedy for freq scalling
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Switched to Slack 10.2 Goodbye, Bill Gates! cwwilson721 Slackware 21 12-29-2005 02:27 AM
well, looks like I'll be saying goodbye.... Basslord1124 General 12 03-11-2005 07:32 AM
Goodbye, Linux esher2292 General 8 06-13-2004 10:26 AM
Goodbye Debia londonboi Debian 39 05-11-2004 05:07 AM
Goodbye, NVIDIA! jspenguin General 2 12-21-2003 08:51 PM

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

All times are GMT -5. The time now is 05:25 AM.

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