Monday, January 14, 2008

Gentoo series: Acpid failed to start at booting

Ive noticed that my acpid service failed to be start at boot. To figure it out, i try to restart the services again.

localhost ~ # /etc/init.d/acpid restart
* Caching service dependencies ... [ ok ]
* Starting acpid ...
acpid: can't open /proc/acpi/event: Device or resource busy [ !! ]

After searching some information at google , ive found out that the error occurs because the conflict between hald and acpid. They both want the events, hald gets there first, and won't share them.So if hald loaded first then acpid wont get the event. (from this discussion at gentoo forum)

so here we go, tracing the truth :)

localhost ~ # /etc/init.d/hal
localhost ~ # /etc/init.d/hald stop
* Stopping NetworkManager ... [ ok ]
* WARNING: you are stopping a boot service.
* Stopping Automounter ... [ ok ]
* Stopping Hardware Abstraction Layer daemon ... [ ok ]
localhost ~ # /etc/init.d/acpid restart
* Starting acpid ... [ ok ]
localhost ~ # /etc/init.d/hald start
* Starting Hardware Abstraction Layer daemon ... [ ok ]

Ok, it seems everythings went ok, the two services are running well. The theory are i decide to edit the hald init script, So it depends on acpid, and will run acpid first before hald. ok, here we go

open the init script (if ure not sure baout this, do backup your original init script)
localhost ~ # vi /etc/init.d/hald
--- truncated ---
depend() {
need dbus
use logger acpid
after coldplug dns nscd acpid #adding acpid
--- truncated ---

Then, see what happens?

localhost ~ # /etc/init.d/acpid stop
* Caching service dependencies ... [ ok ]
* Stopping acpid ... [ ok ]
localhost ~ # /etc/init.d/hald start
* Starting acpid ... [ ok ]
* Starting Hardware Abstraction Layer daemon ... [ ok ]
localhost ~ #

It will start acpid first before starting hald, and the error is gone and acpid are succesfully started. :)

Or you could change the runlevel of acpid from default to boot (hald still with default runlevel), use rc-update show to see your runlevel

#rc-update del acpid default
#rc-update add acpid boot

ok, thats all, hope it helps :), the gentoo logs also updated already >


  1. It is:
    rc-update del acpid default

    and not defaults

    Thanks for this help since my gentoo installation suffers the same problem ;-)

  2. Thanks! that worked also for me

  3. @anonymous: thx for the correction :)
    @raymundoiii: ur welcome

  4. Thats it solved my problem...