LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 08-03-2007, 05:30 PM   #1
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 287Reputation: 287Reputation: 287
how to enable battery level monitor in slack12?


Using zenwalk got me interested in slackware, so I am trying to learn slackware. I installed slack12 on a laptop. I can't find a way to enable a battery monitor in xfce or kde. After doing some googling it seems you need a kernel with acpi support. I am using the 2.6.21.5-huge-smp kernel (uname -r shows 2.6.21.5-smp). I tried gkrellm, but it does not start a battery monitor. Do I need to install or compile a new kernel for battery monitor support? Or can I just modprobe something to get it to work?

Also, what is the best way to update slackware? Where are the mirrors for updates?
Any advice appreciated, thanks!
 
Old 08-03-2007, 05:34 PM   #2
thegoofeedude
Member
 
Registered: Aug 2004
Distribution: Slackware 13.37, 14.1
Posts: 70

Rep: Reputation: 16
I second the question! In KDE, there is this message:
Quote:
Your computer seems to have a partial ACPI installation. ACPI was probably enabled, but some of the sub-options were not - you need to enable at least 'AC Adaptor' and 'Control Method Battery' and then rebuild your kernel.
Do we really have to recompile the kernel to get ACPI going?
 
Old 08-03-2007, 05:57 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Your best bet is to grab the latest kernel and the current .config file and compile it how you want it. http://alien.slackbook.org/dokuwiki/...kernelbuilding is a great resource for how to do it.
 
Old 08-03-2007, 06:13 PM   #4
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Original Poster
Rep: Reputation: 287Reputation: 287Reputation: 287
Thanks Xavier. Is that the only way to get laptop battery support? Don't any of the slack12 kernels have this?
Also, if I do compile a new kernel, what do I select to get acpi support? Can you make suggestions for a kernel for a laptop?
Also, an unrelated question: how do you go about updating slackware and choosing a mirror?
 
Old 08-03-2007, 06:24 PM   #5
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware 14.0
Posts: 1,874

Rep: Reputation: 49
For what it's worth, with the 2.6.21.5 huge, I simply "modprobe battery" and use the XFCE4 battery monitor taskbar plugin.

edit: I just fired up gkrellm and the battery state & level shows there as well. modprobe the battery module and you should be all set.

Last edited by 2Gnu; 08-03-2007 at 06:28 PM.
 
Old 08-03-2007, 06:28 PM   #6
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
The ACPI stuff comes compiled as modules on default huge Slackware kernel, you've to load the modules with: /sbin/modprobe ac && /sbin/modprobe battery
To make them load on boot, add those lines to /etc/rc.d/rc.local

Edit: 2Gnu won heh. By the way, if you can make some spare time, I'd recommend you to try compiling your own kernel, it's a good learning experience (you'll probably curse a lot during the process heh).

Last edited by gbonvehi; 08-03-2007 at 06:30 PM.
 
Old 08-03-2007, 06:29 PM   #7
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Original Poster
Rep: Reputation: 287Reputation: 287Reputation: 287
Quote:
Originally Posted by 2Gnu
For what it's worth, with the 2.6.21.5 huge, I simply "modprobe battery" and use the XFCE4 battery monitor taskbar plugin.
I tried doing that. The command returns without errors, but when I right-click on the panel and select "add new item" the bsttery monitor is not listed.
 
Old 08-03-2007, 06:32 PM   #8
Pratt
Member
 
Registered: Apr 2005
Location: Between Colombia and Germany
Distribution: Slackware Current
Posts: 78

Rep: Reputation: 15
I had to download the plugin from the official website

http://goodies.xfce.org/projects/pan...battery-plugin
 
Old 08-03-2007, 06:34 PM   #9
dennisk
Member
 
Registered: May 2004
Location: Southwestern USA
Distribution: CentOS
Posts: 279

Rep: Reputation: 30
No, you don't have to recompile to get the battery monitor, but you do need to create an initrd with these ACPI modules:

Quote:
ac, acpi, battery, button, dock, fan, processor, thermal, video
and if you're booting the generic kernel ext3, as well assuming that your file system. It's all detailed in the READMEs and isn't that hard to do. Use the LILO utility found in KDE if you prefer to stay away from the command line when editing lilo.conf.

Dennisk

Last edited by dennisk; 08-03-2007 at 06:35 PM.
 
Old 08-03-2007, 07:20 PM   #10
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Original Poster
Rep: Reputation: 287Reputation: 287Reputation: 287
Thanks for the suggestions. I installed the battery monitor for xfce (version 0.5, since it was newest) but it doesn't seem to be working. It just shows 50% when it should be full.
Dennisk, I can modprobe battery and modprobe ac, but when I try to modprobe acpi I get:

bash-3.1# modprobe acpi
FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.21.5-smp/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ko): No such device

I am on 2.6.21.5-smp (huge smp kernel). Does this my kerel doesn't have acpi? If I look in /lib/modules/2.6.21.5-smp/kernel/cpu/cpufreq/ I do have acpi-cpufreq.ko listed there. Can I enable it?
 
Old 08-03-2007, 09:14 PM   #11
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Original Poster
Rep: Reputation: 287Reputation: 287Reputation: 287
Got it working now! I rebooted, did "modprobe battery" checked all the check boxes in properties dialog of xfce battery monitor and now it works! Thanks guys.
I still don't know why "modprobe acpi" returns with errors, but at least the battery monitor works.
 
Old 08-03-2007, 09:24 PM   #12
samwise17
Member
 
Registered: Jul 2007
Location: Sydney
Distribution: Arch,Slackware,Puppy
Posts: 87

Rep: Reputation: 15
I modprobed battery, ac, thermal etc in /etc/rc.d/rc.modules and the kde battery monitor is working.
However I dont think i needed to modprobe acpi.
I quote from the comments in rc.modules:
Quote:
#If a kernel supports ACPI it will always be built in, not a module.
You also might want to look at starting /proc/sys/vm/laptop-mode in /etc/rc.d/rc.local. Theres a post about that somewhere here.

As for updating, look at the slapt-get project. Or just do it manually using pkgtools.

If your learning slackware, I recommend reading the slackbook-2.0. I cant remember where I downloaded it from but you should be able to google it. It has some out-of-date stuff but is good for the basics.

Last edited by samwise17; 08-03-2007 at 09:31 PM.
 
Old 08-04-2007, 11:59 AM   #13
Nikosis
Member
 
Registered: Dec 2005
Location: In front of the monitor
Distribution: Slackware
Posts: 310

Rep: Reputation: 59
Hi

modprobe ac
modprobe battery
modprobe processor
modprobe thermal

Now you should have in your Power Contron -> Laptop battery -> ACPI Config
Enable CPU throttling

Last edited by Nikosis; 08-04-2007 at 12:20 PM.
 
Old 08-04-2007, 12:56 PM   #14
thegoofeedude
Member
 
Registered: Aug 2004
Distribution: Slackware 13.37, 14.1
Posts: 70

Rep: Reputation: 16
Thank you guys for the tips! I thought it might be some modules, but I didn't know their names. I'm so glad I don't have to recompile a new kernel :-)

Sweet.
 
Old 08-04-2007, 01:56 PM   #15
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,455

Rep: Reputation: Disabled
Quote:
Originally Posted by thegoofeedude
I thought it might be some modules, but I didn't know their names.
You could find this out with the command "modprobe -l | grep acpi". "modprobe -l" lists all of the available modules. You might be interested in fan and button as well.

Brian
 
  


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
laptop battery level monitor luisMxQsw Linux - Hardware 1 02-17-2006 11:55 AM
Battery Level; Wireless jeopardyracing Linux - Laptop and Netbook 6 09-16-2004 12:08 PM
problem with the battery level BlackBook Linux - Laptop and Netbook 2 03-27-2004 06:18 AM
Battery monitor not showing battery level? morrolan Linux - Laptop and Netbook 4 03-18-2004 04:42 AM
Battery level meter wzzrd Linux - Hardware 6 05-01-2003 03:09 PM


All times are GMT -5. The time now is 10:54 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration