Skip to contentSkip to conversation

acpi on gentoo

repost Nigel 3 participants 4 messages Mar 11, 2007 ACPI

lore
Share & tools
lore

Nigel

author
#0 lore raw

Trying again to see if anyone had any other ideas.

In addition:
The acpid daemon is running.
The same machine when booted into windows will automatically go to powersave mode when the power cable is removed.

TIA
Nigel.

original post (4th March):

Hello,

I have been trying to get acpid to receive events on gentoo without any success. I an on kernel 2.6.17 (with rev 10 gentoo patched)
acpid: 1.0.4-r4
Toshiba Tecra M3

I have been following the guide at:
http://www.gentoo.org/doc/en/power-management-guide.xml

I'm on 2.6.17

So, whatever they suggested to compile in the kernel or as a module that is what I have done.

When I look at /var/log/acpi no events are being generated.

With this test :
on_ac_power && echo AC available || echo Running on batteries

It shows "AC available" when the ac is plugged in, take the cable out, and it shows "Running on batteries"

Code:

# acpitool -e
  Kernel version : 2.6.17   -    ACPI version : 20060127
  -----------------------------------------------------------
  Battery #1     : present
    Remaining capacity : 39441 mWh, 82.47%, 00:27:29
    Design capacity    : 50760 mWh
    Last full capacity : 47822 mWh, 94.21% of design capacity
    Capacity loss      : 5.788%
    Present rate       : 18295 mW
    Charging state     : charging
    Battery type       : rechargeable, Li-ION
    Model number       : G71C0004G810
    Serial number      : 0100027803
  Battery #2     : slot empty

AC adapter : on-line
Fan : off

  CPU type               : Intel(R) Pentium(R) M processor 2.13GHz
  CPU speed              : 800.000 MHz
  Cache size             : 2048 KB
  Bogomips               : 1600.29
  Processor ID           : 0
  Bus mastering control  : yes
  Power management       : yes
  Throttling control     : no

Limit interface : no

  Active C-state         : C3
  C-states (incl. C0)    : 4
  Usage of state C1      : 10 (0.0 %)
  Usage of state C2      : 161443 (35.8 %)
  Usage of state C3      : 144440 (32.1 %)

Thermal info :

wakeup devices :

I can modify this:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor and the processor speed with follow the governor which I set.

I can also run: acpitool -l 4
for example, and dim the lcd display.

Also, I have th battery indicator applet in gnome, this also changes correctly with respect to having the power connected, or not.

Most things seem to work as they should, except acpid is not receiving events.

Code:

 # ls -R /proc/acpi/
/proc/acpi/:
ac_adapter  dsdt                 event  info            processor
battery     embedded_controller  fadt   power_resource  toshiba

/proc/acpi/ac_adapter:
ADP1

/proc/acpi/ac_adapter/ADP1:
state

/proc/acpi/battery:
BAT1 BAT2

/proc/acpi/battery/BAT1:
alarm info state

/proc/acpi/battery/BAT2:
alarm info state

/proc/acpi/embedded_controller:

/proc/acpi/power_resource:

/proc/acpi/processor:
CPU0

/proc/acpi/processor/CPU0:
info limit power throttling

/proc/acpi/toshiba:
fan keys lcd version video

Modules at run time :
Code:

 # lsmod
Module                  Size  Used by
cisco_ipsec           545996  0
snd_pcm_oss            16992  0
snd_mixer_oss          12928  1 snd_pcm_oss
snd_seq_oss            23872  0
snd_seq_midi_event      5184  1 snd_seq_oss
snd_seq                37456  4 snd_seq_oss,snd_seq_midi_event
snd_seq_device          5708  2 snd_seq_oss,snd_seq
snd_intel8x0           24924  0
snd_ac97_codec         78496  1 snd_intel8x0
snd_ac97_bus            1792  1 snd_ac97_codec
snd_pcm                54472  3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec
snd_timer              15236  2 snd_seq,snd_pcm
snd_page_alloc          6728  2 snd_intel8x0,snd_pcm
toshiba_acpi            4756  0
speedstep_centrino      5456  1
processor              16896  1 speedstep_centrino
ipw2200               140268  0
nvidia               4541396  12
sky2                   28740  0

The AC and battery modules are compiled in kernel as the guide suggests.

# acpi_available; echo $?
0

# grep -i "^config_acpi" .config
CONFIG_ACPI=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_FAN=m
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_THERMAL=m
CONFIG_ACPI_TOSHIBA=m
CONFIG_ACPI_BLACKLIST_YEAR=0
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
# lsof |grep "/proc/acpi/event"
acpid     13843       root    3r      REG        0,3        0 4026532088 /proc/acpi/event

Even if I run strace against acpid I can't seen anything happening.

One interesting though, if I do : modprobe button
then every 30 seconds or so I get:
received event "battery BAT1 00000080 00000001"

Even when i do rmmod button I still keep getting these events. The only way to go back to "normal" behaviour is to reboot.

Any suggestions as to what might be my problem here ?

TIA
Nigel.

#1 lore raw
Quoted 8 lines · Nigel

Trying again to see if anyone had any other ideas.

In addition:
The acpid daemon is running.
The same machine when booted into windows will automatically go to powersave mode when the power cable is removed.

what condition is your battery in? It makes sense if battery power is very low. If battery is still full, then it sounds like a bug. You need to test the latest base kernel before entering a acpi bug into bugzilla.kernel.org.

Quoted 9 lines

One interesting though, if I do : modprobe button
then every 30 seconds or so I get:
received event "battery BAT1 00000080 00000001"

Even when i do rmmod button I still keep getting these events. The only way to go back to "normal" behaviour is to reboot.

Any suggestions as to what might be my problem here ?

I guess your battery power level is low.

author
#2 lore raw

response inline

Luming Yu said on 11/3/2007 3:12 PM:

Quoted 11 lines · Nigel
Quoted 8 lines

Trying again to see if anyone had any other ideas.

In addition:
The acpid daemon is running.
The same machine when booted into windows will automatically go to powersave mode when the power cable is removed.

what condition is your battery in? It makes sense if battery power is very low.

Battery #1 : present
Remaining capacity : 47822 mWh, 100.0%
Design capacity : 50760 mWh
Last full capacity : 47822 mWh, 94.21% of design capacity
(similar output was included in the original post)

Regardless of battery condition should I not still get an event for removing and reinserting the power cable? (Obviously waiting for a minute or two in-between )

Quoted 3 lines

If battery is still full, then it sounds like a bug. You need to test the latest base kernel before entering a acpi bug into bugzilla.kernel.org.

It works just fine on 2.6.19-r5 (gentoo)
Whilst is *may* have been a bug, the issue should no longer exist on a newer kernel.

Quoted 11 lines
Quoted 10 lines

One interesting though, if I do : modprobe button
then every 30 seconds or so I get:
received event "battery BAT1 00000080 00000001"

Even when i do rmmod button I still keep getting these events. The only way to go back to "normal" behaviour is to reboot.

Any suggestions as to what might be my problem here ?

I guess your battery power level is low.

Nope, that's not it.
Don't really get your logic either. *Only* when a certain module is loaded and after that *only* a reboot stops these messages means that the battery is low?

Quoted 2 lines

</

So, I take it that my choice is limited to using the newer kernel ?
I would normally not hesitate to use the newer kernel but my employer's vpn client is limited to 2.6.17

Nigel.

#3 lore raw
Quoted 47 lines · Nigel

response inline

Luming Yu said on 11/3/2007 3:12 PM:

Quoted 11 lines · Nigel
Quoted 8 lines

Trying again to see if anyone had any other ideas.

In addition:
The acpid daemon is running.
The same machine when booted into windows will automatically go to powersave mode when the power cable is removed.

what condition is your battery in? It makes sense if battery power is very low.

Battery #1 : present
Remaining capacity : 47822 mWh, 100.0%
Design capacity : 50760 mWh
Last full capacity : 47822 mWh, 94.21% of design capacity
(similar output was included in the original post)

Regardless of battery condition should I not still get an event for removing and reinserting the power cable? (Obviously waiting for a minute or two in-between )

Quoted 3 lines

If battery is still full, then it sounds like a bug. You need to test the latest base kernel before entering a acpi bug into bugzilla.kernel.org.

It works just fine on 2.6.19-r5 (gentoo)
Whilst is *may* have been a bug, the issue should no longer exist on a newer kernel.

Quoted 11 lines
Quoted 10 lines

One interesting though, if I do : modprobe button
then every 30 seconds or so I get:
received event "battery BAT1 00000080 00000001"

Even when i do rmmod button I still keep getting these events. The only way to go back to "normal" behaviour is to reboot.

Any suggestions as to what might be my problem here ?

I guess your battery power level is low.

Nope, that's not it.
Don't really get your logic either. *Only* when a certain module is loaded and after that *only* a reboot stops these messages means that the battery is low?

Quoted 2 lines

</

Quoted 8 lines

So, I take it that my choice is limited to using the newer kernel ?
I would normally not hesitate to use the newer kernel but my employer's vpn client is limited to 2.6.17

Nigel.
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

2.6.19-rc5 has EC driver almost re-written (drivers/acpi/ec.c). Please check if putting it into 2.6.17 works/helps. You may also try to put an 2.6.20/21-rc version of the same file... It has even more changes.

Regards,
Alex.