Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
acpid stops on ac / battery event?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
r4di0_h34d
n00b
n00b


Joined: 14 Jan 2005
Posts: 19

PostPosted: Sun Mar 26, 2006 6:06 pm    Post subject: acpid stops on ac / battery event? Reply with quote

I'm following the power management guide (http://www.gentoo.org/doc/en/power-management-guide.xml). Everything seems in order, except that acpid is stopping after changing runlevels between ac and battery. Starting from battery or ac power, when the power source changes, acpid stops. Here are excerpts from the console, /var/log/acpid, and /var/log/messages (syslog) that show what happens after I plug/unplug the ac power from my laptop.

From ac to battery:
---- console
Code:

julia acpi # /etc/init.d/acpid start
 * Starting acpid ...   
 julia acpi # ps -C acpid
  PID TTY          TIME CMD
30295 ?        00:00:00 acpid
julia acpi #   
[ ok ]

---acpid log
Code:

[Sun Mar 26 12:52:06 2006] received event "ac_adapter AC 00000080 00000000"
[Sun Mar 26 12:52:06 2006] executing action "/etc/acpi/actions/pmg_switch_runlevel.sh ac_adapter AC 00000080 00000000"
[Sun Mar 26 12:52:06 2006] BEGIN HANDLER MESSAGES
 * Stopping acpid ...                                                     [ ok ]
[Sun Mar 26 12:52:06 2006] END HANDLER MESSAGES
[Sun Mar 26 12:52:06 2006] action exited with status 0
[Sun Mar 26 12:52:06 2006] executing action "/etc/acpi/default.sh ac_adapter AC 00000080 00000000"
[Sun Mar 26 12:52:06 2006] BEGIN HANDLER MESSAGES
[Sun Mar 26 12:52:06 2006] END HANDLER MESSAGES
[Sun Mar 26 12:52:06 2006] action exited with status 0
[Sun Mar 26 12:52:06 2006] exiting


---system log
Code:

Mar 26 12:52:06 julia logger: In pmg_switch_runlevel.sh...
Mar 26 12:52:06 julia logger: Switching to battery runlevel
Mar 26 12:52:06 julia logger: ACPI group ac_adapter / action ac_adapter is not defined


----console
Code:

julia acpi # ps -C acpid
  PID TTY          TIME CMD
julia acpi #



From battery to ac:
Code:

julia acpi # /etc/init.d/acpid start
 * Starting acpid ...                                                                     [ ok ]
julia acpi # ps -C acpid
  PID TTY          TIME CMD
30469 ?        00:00:00 acpid


---- acpid log
Code:

[Sun Mar 26 12:54:06 2006] received event "ac_adapter AC 00000080 00000001"
[Sun Mar 26 12:54:06 2006] executing action "/etc/acpi/actions/pmg_switch_runlevel.sh ac_adapter AC 00000080 00000001"
[Sun Mar 26 12:54:06 2006] BEGIN HANDLER MESSAGES
 * Stopping acpid ...                                                     [ ok ]
[Sun Mar 26 12:54:06 2006] END HANDLER MESSAGES
[Sun Mar 26 12:54:06 2006] action exited with status 0
[Sun Mar 26 12:54:06 2006] executing action "/etc/acpi/default.sh ac_adapter AC 00000080 00000001"
[Sun Mar 26 12:54:06 2006] BEGIN HANDLER MESSAGES
[Sun Mar 26 12:54:06 2006] END HANDLER MESSAGES
[Sun Mar 26 12:54:06 2006] action exited with status 0
[Sun Mar 26 12:54:06 2006] exiting


---- system log
Code:

Mar 26 12:54:06 julia logger: In pmg_switch_runlevel.sh...
Mar 26 12:54:06 julia logger: Switching to default runlevel
Mar 26 12:54:06 julia logger: ACPI group ac_adapter / action ac_adapter is not defined


---- console
Code:

julia acpi # ps -C acpid
  PID TTY          TIME CMD
julia acpi #


I can't figure out why acpid is stopping, because it looks like everything works alright. I copy-pased the pmg_switch_runlevel.sh script, so I'd hope it's correct. I'm running a t43, with the following acpid settings in kernel's .config

Code:


#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
# CONFIG_PM_LEGACY is not set
# CONFIG_PM_DEBUG is not set
CONFIG_SOFTWARE_SUSPEND=y
CONFIG_PM_STD_PARTITION="/dev/sda5"

#
# ACPI (Advanced Configuration and Power Interface) Support
#
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
CONFIG_ACPI_SLEEP_PROC_SLEEP=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=y
# CONFIG_ACPI_HOTKEY is not set
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_ASUS is not set
CONFIG_ACPI_IBM=m
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
# CONFIG_ACPI_CONTAINER is not set

#
# APM (Advanced Power Management) BIOS Support
#

#
# 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=y
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 is not set
# CONFIG_X86_POWERNOW_K6 is not set
# CONFIG_X86_POWERNOW_K7 is not set
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_GX_SUSPMOD is not set
CONFIG_X86_SPEEDSTEP_CENTRINO=y
CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
# CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE is not set
CONFIG_X86_SPEEDSTEP_ICH=y
# CONFIG_X86_SPEEDSTEP_SMI is not set
# CONFIG_X86_P4_CLOCKMOD is not set
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
# CONFIG_X86_LONGRUN is not set
# CONFIG_X86_LONGHAUL is not set

#
# shared options
#
CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y
CONFIG_X86_SPEEDSTEP_LIB=y
# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set


and the following modules loaded...
Code:


Module                  Size  Used by
ide_cs                  8836  1
pcmcia                 32404  3 ide_cs
firmware_class          8320  1 pcmcia
crc32                   4096  1 pcmcia
yenta_socket           25484  4
rsrc_nonstatic         10496  1 yenta_socket
pcmcia_core            36368  3 pcmcia,yenta_socket,rsrc_nonstatic
evdev                   7808  1
tg3                   104580  0
dummy                   2308  0
ibm_acpi               28544  0
usbhid                 36704  0
ehci_hcd               30600  0
uhci_hcd               31120  0
usbcore               118020  4 usbhid,ehci_hcd,uhci_hcd
cdrom                  38688  0
drm                    66196  0
nvram                   7560  0
ntfs                  223248  0
vfat                   11264  1
fat                    47388  1 vfat
snd_intel8x0           29852  0
snd_ac97_codec         93472  1 snd_intel8x0
snd_ac97_bus            1920  1 snd_ac97_codec
snd_seq                50192  0
snd_seq_device          6924  1 snd_seq
snd_pcm_oss            50080  0
snd_pcm                83080  3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer              22148  2 snd_seq,snd_pcm
snd_page_alloc          8712  2 snd_intel8x0,snd_pcm
snd_mixer_oss          17536  1 snd_pcm_oss
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Germany

PostPosted: Sun Mar 26, 2006 6:33 pm    Post subject: Reply with quote

acpid has to be in both runlevels battery and default, otherwise it is stopped when changing runlevels. Runlevel changes start every service in the new runlevel (except they're already started) and stop _every_ other. Therefore also manually started services are stopped if they're not in the runlevel /sbin/rc changes to.
Code:
rc-update add acpid default
rc-update add acpid battery

_________________
KDE
Back to top
View user's profile Send private message
r4di0_h34d
n00b
n00b


Joined: 14 Jan 2005
Posts: 19

PostPosted: Sun Mar 26, 2006 6:44 pm    Post subject: Reply with quote

that did it, thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum