LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-22-2007, 09:31 PM   #1
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Using modprobe.d to insert acpi modules


Not sure whether this question should be in another forum, but after some intensive googling I found hints that it's a Debian specific problem. Apart from that I won't go into the details of troubleshooting, but now that I've identified the problem I need a little help solving it.

Recently the battery indicator on the Gnome panel just quit working. The little icon is there but doing nothing. I think it happened when I upgraded to kernel 2.6.18-4.

It turns out that some of the acpi modules are not being loaded.
Code:
debian-lt:~# ls /lib/modules/2.6.18-4-686/kernel/drivers/acpi/
ac.ko         button.ko     fan.ko     ibm_acpi.ko   thermal.ko
asus_acpi.ko  container.ko  hotkey.ko  processor.ko  toshiba_acpi.ko
battery.ko    dock.ko       i2c_ec.ko  sbs.ko        video.ko
The only ones that show up on lsmod after a boot are: fan, processor, and thermal. I found out that in order for the battery indicator to work, I also needed ac and battery. Another (quite old) reference said I should also have button even tho I have no idea what it does. So I used modprobe to insert those three, and now things work. So far, so good.

The remaining problem is that when I reboot, I have to go thru it again. How do I get those modules inserted automatically during boot? I tried module-update, but that didn't work.

I don't know how fan, processor, and thermal got inserted. They must be compiled into the kernel. The only acpi module I can find reference to in /etc/modprobe.d is ibm_acpi.ko, although that does not show up in lsmod. I also don't understand the file:
Code:
debian-lt:~# cat /etc/modprobe.d/ibm_acpi.modprobe 
options ibm_acpi hotkey=enable,0xff9f experimental=1
Finally what are container.ko, hotkey.ko, dock.ko, i2c_ec.ko, sbs.ko, video.ko, (as well as button.ko) intended for? Should I also be inserting them?

Last edited by rickh; 03-22-2007 at 09:33 PM.
 
Old 03-22-2007, 10:22 PM   #2
cgjones
Member
 
Registered: Nov 2005
Location: Central New York
Distribution: Ubuntu
Posts: 405

Rep: Reputation: 31
Not sure if this will help or not, but you might want to check out /etc/init.d/acpid and /etc/default/acpid. On my testing system, these two files look like they handle loading the ACPI modules during boot.
 
Old 03-23-2007, 07:24 AM   #3
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Rickh,

/etc/default/acpid is the place to load the acpi modules you want, although it should also be able to be done within /etc/modprobe.d/. Here is the list from my /etc/default/acpid, and I have a functional battery monitor, also on a thinkpad:

Code:
MODULES="battery ac processor button fan thermal"
I also have this for /etc/modprobe.d/ibm_acpi.thinkpad:
Code:
options ibm_acpi hotkey=enable,0xff9f experimental=1
I believe using apt-get to install the thinkpad hotkey functions added that, it simply maps some of the special function keys to things, most likely the power and volume buttons.

Peace,
JimBass
 
Old 03-23-2007, 07:33 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Also check that /etc/init.d/acpid contains this line
Quote:
MODPROBE_OPTIONS="$MODPROBE_OPTIONS -q"
and not this one:
Quote:
MODPROBE_OPTIONS="$MODPROBE_OPTIONS -Q"
This was broken for me there is a bug in the bts. Putting it back to -q solved the problem of gnome applets, cpufreq,..

button: This is used for switching off your PC by pressing the OFF button directly. Very practical, no need to type halt,..
video: I think this is for energy saving, it stops your monitor after some time.

fan,button,thermal,.. were not loaded due to the bug I mentionned. Maybe it didn't get in etch.. then ignore.


Quote:
How do I get those modules inserted automatically during boot?
The critical thing ( fan + thermal) are (should.. they are on mine) loaded during Initrd in case the initrd goes in an endless loop and you are not in front of the box.

/usr/share/initramfs-tools/scripts/init-premount/

The rest is loaded by what JimBass said

Last edited by nx5000; 03-23-2007 at 07:57 AM.
 
Old 03-23-2007, 09:56 AM   #5
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
Thanks a lot, to all of you. Just when you think you're getting pretty good at this stuff, it's amazing how easy it is to encounter something that will confuse and humble you.
 
Old 03-23-2007, 10:27 AM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
True but.. well, we are talking of a complete OS here, not a small app!

Actually I am also looking for a long time at a link, doc, anything that describes the steps of the booting process.
 
Old 03-24-2007, 11:23 AM   #7
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
OK, It took me a couple days to get back to this.

@ nx5000:
Quote:
Also check that /etc/init.d/acpid contains this line
"MODPROBE_OPTIONS="$MODPROBE_OPTIONS -q"
and not this one:
"MODPROBE_OPTIONS="$MODPROBE_OPTIONS -Q"
That seems to have been my immediate problem. I noticed that in the same file on my desktop machine, it also had the upper case "Q" ... so I changed that one, too. Of course on that machine the battery incator does not exist, so nothing visible has changed. Was that a good idea?

Also, I notice that while the battery indicator states the percentage of charge remaining, it no longer gives an estimate of the time. Changing the properties of the panel icon does not affect that. This is a very minor issue, just makes me curious.
 
Old 03-24-2007, 11:34 AM   #8
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Well it was a bug so you should correct everywhere otherwise acpi might not work.
I'm surprised that this got into etch!
As this file is a configuration file, it doesn't get updated even during upgrades (i currently have package acpid version 1.0.4-7)

For the battery, no clue really. The only thing that you can check is that the information exported by the kernel is correct. Then it's up to the application to calculate it.

Code:
cat /proc/acpi/battery/C*/info
present:                 no          <-- Battery slot 1
present:                 yes                <-- Battery slot 2
design capacity:         4310 mAh
last full capacity:      4310 mAh
battery technology:      rechargeable
design voltage:          14800 mV
design capacity warning: 431 mAh
design capacity low:     44 mAh
capacity granularity 1:  100 mAh
capacity granularity 2:  100 mAh
model number:            Primary
serial number:           00001 2006/11/20
battery type:            LIon
OEM info:                Hewlett-Packard


cat /proc/acpi/battery/C*/state
present:                 no
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      4208 mAh  
present voltage:         16602 mV
That's my remote machine which is plugged..
There's no command for unplugging the cord so I can't check
 
Old 03-24-2007, 11:38 AM   #9
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
Quote:
Well it was a bug so you should correct everywhere otherwise acpi might not work. I'm surprised that this got into etch!
I doubt that it did. Since the freeze, I've been doing my regular dist-upgrades from Sid.
 
Old 03-24-2007, 11:42 AM   #10
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Ah ok I thought you were using etch.
I need to upgrade my eyes
 
  


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
modprobe: FATAL: Could not load /lib/modules/.../modules.dep Ankardo Debian 9 02-01-2011 05:09 PM
Update-modules: No longer managing /lib/modules/modprobe.conf? geekzen Debian 0 04-03-2004 06:49 PM
modprobe cant find modules but they are in /lib/modules/'uname blanny Linux - General 15 09-10-2003 11:05 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - General 1 01-24-2002 01:50 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - Newbie 2 01-24-2002 01:40 AM

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

All times are GMT -5. The time now is 11:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration