acpid install fails (because of hal running)
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | acpid (Debian) |
Fix Released
|
Unknown
|
||
| | acpid (Ubuntu) |
High
|
Michael Vogt | ||
Bug Description
On upgrading from dapper to the edgy beta, the installer failed on the acpid update, because acpid fails to install, acpi-support cannot install, and therfore the required packages in the meta package ubuntu-desktop cannot be met.
The error is as follows:
Setting up acpid (1.0.4-5ubuntu4) ...
* Loading ACPI modules... [ ok ]
* Starting ACPI services... acpid: can't open /proc/acpi/event: Device or resource busy
invoke-rc.d: initscript acpid, action "start" failed.
dpkg: error processing acpid (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of acpi-support:
acpi-support depends on acpid (>= 1.0.4-1ubuntu4); however:
Package acpid is not configured yet.
dpkg: error processing acpi-support (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-desktop:
ubuntu-desktop depends on acpi-support; however:
Package acpi-support is not configured yet.
ubuntu-desktop depends on acpid; however:
Package acpid is not configured yet.
dpkg: error processing ubuntu-desktop (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
acpid
acpi-support
ubuntu-desktop
E: Sub-process /usr/bin/dpkg returned an error code (1)
If any other logs are required please specify.
TESTCASE:
1. Remove acpid
2. Restart hal
3. Install acpid
=> Failure
| Subhuman (jacknicoll) wrote : | #1 |
| Julien Humbert (julroy67) wrote : | #2 |
Yes, right, I had the same problem and this had fix it.
| Yves Junqueira (yves.junqueira) wrote : | #3 |
The postinst script is not indempotent. One possible fix is:
--- /tmp/acpid.postinst 2006-10-23 17:00:28.000000000 -0200
+++ acpid.postinst 2006-10-23 17:01:18.000000000 -0200
@@ -11,9 +11,9 @@
if [ -x "/etc/init.d/acpid" ]; then
update-rc.d acpid multiuser 10 21 >/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d acpid start || exit $?
+ invoke-rc.d acpid restart || exit $?
else
- /etc/init.d/acpid start || exit $?
+ /etc/init.d/acpid restart || exit $?
fi
fi
# End automatically added section
| Changed in acpid: | |
| status: | Unconfirmed → Confirmed |
| Risto H. Kurppa (risto.kurppa) wrote : | #4 |
Same problem here, acpid and acpi-support fail to configure..
"sudo killall hald "
and then
"sudo dpkg --configure -a"
didn't help..
| Risto H. Kurppa (risto.kurppa) wrote : | #5 |
| Florian Jensen (florian.jensen) wrote : | #6 |
This bug also exists during the upgrade from edgy to feisty.
The fix above works.
| Kacper Antosik (kiperz) wrote : | #7 |
It exists after updating from fiesty to gutsy, fix up did it job.
| Rudd-O (rudd-o) wrote : | #8 |
the fix didn't work for me. as a matter of fact I just uninstalled all acpi crap and I had to remove kubuntu-desktop metapackage as well.
I think this is because hal is opening /proc/acpi/event first. Or perhaps other process...
| Florian Jensen (florian.jensen) wrote : | #9 |
Same problem when upgrading from Feisty to Gutsy
root@Zeus:~# dpkg --configure -a
Setting up acpid (1.0.4-5ubuntu8) ...
* Loading ACPI modules... [ OK ]
* Starting ACPI services... invoke-rc.d: initscript acpid, action "start" failed.
dpkg: error processing acpid (--configure):
subprocess post-installation script returned error exit status 1
Setting up snmpd (5.3.1-6ubuntu2) ...
Starting network management services:
dpkg: error processing snmpd (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of acpi-support:
acpi-support depends on acpid (>= 1.0.4-1ubuntu4); however:
Package acpid is not configured yet.
dpkg: error processing acpi-support (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of powermanagement
powermanagemen
Package acpi-support is not configured yet.
dpkg: error processing powermanagement
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of kubuntu-desktop:
kubuntu-desktop depends on acpi-support; however:
Package acpi-support is not configured yet.
kubuntu-desktop depends on acpid; however:
Package acpid is not configured yet.
kubuntu-desktop depends on powermanagement
Package powermanagement
dpkg: error processing kubuntu-desktop (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
acpid
snmpd
acpi-support
powermanagemen
kubuntu-desktop
root@Zeus:~#
Same for me when upgrading from Feisty to Gutsy.
* Loading ACPI modules... [ OK ]
* Starting ACPI services... invoke-rc.d: initscript acpid, action "start" failed.
The workaround of stopping acpid manually before running 'dpkg --configure -a' worked for me.
I think that the issue should be addressed, because it is a stumbling stone for people who are upgrading their Kubuntu installation.
| Erik de Castro Lopo (erikd) wrote : | #11 |
Same problem on Gutsy to Hardy Heron upgrade.
Fixed by doing:
sudo /etc/init.d/acpid stop
sudo dpkg --configure -a
sudo /etc/init.d/acpid start
| Whit Blauvelt (whit-launchpad) wrote : | #12 |
Also the same problem on a Gutsy server fresh installation, although can't recall if acpi has been included in an upgrade within Gutsy since install. Fix just above worked.
| Popa Adrian Marius (mapopa) wrote : | #13 |
confirmed in hardy too
I have installed the server version and then
sudo apt-get install ubuntu-desktop
and at the end i had that error
so these lines worked for me (thanks Erik )
sudo /etc/init.d/acpid stop
sudo dpkg --configure -a
| Popa Adrian Marius (mapopa) wrote : | #14 |
here is the install error log for ubuntu-desktop
Errors were encountered while processing:
acpid
acpi-support
powermanagemen
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up acpid (1.0.4-5ubuntu8) ...
* Loading ACPI modules...
...done.
* Starting ACPI services...
invoke-rc.d: initscript acpid, action "start" failed.
dpkg: error processing acpid (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of acpi-support:
acpi-support depends on acpid (>= 1.0.4-1ubuntu4); however:
Package acpid is not configured yet.
dpkg: error processing acpi-support (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of powermanagement
powermanagemen
Package acpi-support is not configured yet.
dpkg: error processing powermanagement
dependency problems - leaving unconfigured
Errors were encountered while processing:
acpid
acpi-support
powermanagemen
| machak (machak) wrote : | #15 |
sudo dpkg --configure -a
Setting up acpid (1.0.4-5ubuntu8) ...
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | SS KK]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
-n: not really
-f: force
dpkg: error processing acpid (--configure):
subprocess post-installation script returned error exit status 1
Setting up pulseaudio (0.9.9-1ubuntu2) ...
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | SS KK]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
-n: not really
-f: force
dpkg: error processing pulseaudio (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
acpid
pulseaudio
| Daniel Hahler (blueyed) wrote : | #16 |
The simple reason for this appears to be that the acpid init script, invoked with "start" should not fail, if acpid is already running.
I'll provide a patch for this.
| Changed in acpid: | |
| assignee: | nobody → blueyed |
| importance: | Undecided → High |
| milestone: | none → ubuntu-8.04 |
| status: | Confirmed → In Progress |
| Daniel Hahler (blueyed) wrote : | #17 |
* debian/
"start". The action must not fail, if acpid is already running.
(LP: #63450)
Subscribed ubuntu-
| Changed in acpid: | |
| assignee: | blueyed → nobody |
| status: | In Progress → Triaged |
| Daniel Hahler (blueyed) wrote : | #18 |
While "start" should never fail for an init script, when the process is already running (which gets fixed above), the real problem appears to be hal running, when acpid gets installed (not upgraded).
I've taken the fix for this from Debian bug 380520 (http://
This appears to be the real reason for this bug, but I've left the --oknodo in there, which is a reasonable fix, too.
| description: | updated |
| Daniel Holbach (dholbach) wrote : | #19 |
Michael: can you please take a look at it? Is this change OK for dapper->hardy upgrades?
| Steve Langasek (vorlon) wrote : | #20 |
I believe this change is correct (and necessary), but I wouldn't like to be both the sponsor and the reviewer this close to release. Michael, does this look ok to you, or do you have concerns about a hal restart on the upgrade path, which I guess may be what Daniel was suggesting?
| Changed in acpid: | |
| assignee: | nobody → mvo |
| status: | Triaged → In Progress |
| Michael Vogt (mvo) wrote : | #21 |
Thanks for the patch.
I applied it and modified it to not start/stop hald on dapper->hardy upgrades. That works fine.
However on a testupgrade with gutsy->hardy and this package it hangs on
Setting up acpid (1.0.4-5ubuntu9) ...
Installing new version of config file /etc/init.d/acpid ...
* Stopping Hardware abstraction layer hald
...done.
* Starting Hardware abstraction layer hald
strace shows that it hangs in select() (this is in a kvm VM).
| Martin Pitt (pitti) wrote : | #22 |
This looks like a bit of a hack, but acceptable enough for hardy IMHO.
I cannot say anything about the hanging hal startup, that would need a hald --verbose=yes --daemon=no output.
| Michael Vogt (mvo) wrote : | #23 |
It looks like it fails with the following error:
00:17:09.508 [I] hald.c:669: hal 0.5.11rc2^M
00:17:09.508 [I] hald.c:734: Will not daemonize^M
00:17:09.508 [I] hald_dbus.c:5381: local server is listening at unix:abstract=
00:17:09.512 [E] ck-tracker.c:367: Error doing GetSeats on ConsoleKit: org.freedesktop
00:17:09.512 [E] ck-tracker.c:792: Could not get seats and sessions^M
00:17:09.512 [W] hald_dbus.c:5806: Could not initialize seats and sessions from ConsoleKit^M
00:17:09.520 [I] hald_runner.c:301: Runner has pid 10617^M
Runner started - allowed paths are '/usr/lib/
00:17:09.524 [I] hald_runner.c:182: runner connection is 0x80a5e28^M
00:17:09.524 [W] osspec.c:373: Unable to open /proc/mdstat: No such file or directory^M
[WARN 10616] polkit-
Not built with -rdynamic so unable to print a backtrace^M
*** [DIE] hald.c:main():785 : Could not init PolicyKit context: (null)^M
dpkg: error processing acpid (--configure):^M
subprocess post-installation script returned error exit status 1^M
| Michael Vogt (mvo) wrote : | #24 |
Hm, that might be a side effect of the following problem:
[95.6009] policykit: Configuring policykit
* Reloading system message bus config...^M
Error org.freedesktop
invoke-rc.d: initscript dbus, action "reload" failed.^M
^M
Michael Vogt [2008-04-16 22:26 -0000]:
> Hm, that might be a side effect of the following problem:
>
> [95.6009] policykit: Configuring policykit
> * Reloading system message bus config...^M
> Error org.freedesktop
> invoke-rc.d: initscript dbus, action "reload" failed.^M
That would be it, yes. Was this during an upgrade from dapper? Please
keep in mind that hal should not be restarted on upgrades from earlier
than gutsy. The current acpi patch from above restarts it
unconditionally, but you mentioned that you changed this?
| Michael Vogt (mvo) wrote : | #26 |
This is a gutsy->hardy upgrade, attached is the full log of the upgrade until the hang.
| Michael Vogt (mvo) wrote : | #27 |
There is something funny going on with dbus I think, when the hal start fails (I sent a ctrl-c), then I get later:
[99.0573] hal: Configuring hal
Setting up hal (0.5.11~
Installing new version of config file /etc/init.d/hal ...
Installing new version of config file /etc/hal/
Installing new version of config file /etc/dbus-
* Reloading system message bus config...
Error org.freedesktop
invoke-rc.d: initscript dbus, action "force-reload" failed.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_DK.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
* Starting Hardware abstraction layer hald
...done.
| Michael Vogt (mvo) wrote : | #28 |
Hrm, it looks like this is a problem with the unpack/configure ordering. hal in unpacked, but not configured yet when acpid gets configured it seems.
For testing I added a Pre-Depends on hal to ensure that it is configured when the postinst is run and then it works.
| Michael Vogt (mvo) wrote : | #29 |
I think we have the following options for a fix:
1) use the original acpid.postinst and just change it to ignore if it can not be restarted
2) add code to hald-addons-acpi so that we can sent it a signal that makes hald-addon-acpid close event_fd (/proc/acpi/event), sleep for some seconds and try to open /var/run/
| Michael Vogt (mvo) wrote : | #30 |
If we go with option (1) the acpid start problem will cure itself automatically on the next reboot because hald is patched to not try to open /proc/acpi/event if acpid is installed. Its less correct than (2) but really simple.
| Martin Pitt (pitti) wrote : | #31 |
I still don't quite understand this. Hal does not connect to the acpi socket if /usr/sbin/acpid exists. So the only situation where this breaks would be if hal starts up before acpid is even unpacked. This could be avoided with adding a dependency to acpid to hal, but if that's too ugly, maybe we can do something with Breaks: hal (<<...)?
| Michael Vogt (mvo) wrote : | #32 |
I forgot option (3): only restart hal if it is actually running. This is nice and simple and I will do that.
| Michael Vogt (mvo) wrote : | #33 |
Uploaded with a additional check for /var/run/
| Changed in acpid: | |
| status: | In Progress → Fix Committed |
| Launchpad Janitor (janitor) wrote : | #34 |
This bug was fixed in the package acpid - 1.0.4-5ubuntu9
---------------
acpid (1.0.4-5ubuntu9) hardy; urgency=low
[ Daniel Hahler ]
* debian/
This allows acpid to take /proc/acpi/event and hal will ignore this kernel
interface, when acpid is installed. (LP: #63450)
* debian/
"start". The action must not fail, if acpid is already running.
[ Michael Vogt ]
* debian/
(hal may hang forever because of a incompatible dbus)
* only restart if hal is actually running
-- Michael Vogt <email address hidden> Wed, 16 Apr 2008 16:12:12 +0200
| Changed in acpid: | |
| status: | Fix Committed → Fix Released |
| Dong Calmada (dongcalmada) wrote : | #35 |
I've upgraded from Gutsy to Hardy and had the same problem upgrading acpi stuff. I followed Erik de Castro Lopo's workaround and it fixed my problem. Genius!
| ricnar456 (ricardonarvaja) wrote : | #36 |
i upgrade fron gutsy to hard and have the same problem but the solutions not solve the problem.
ricnar456@
[sudo] password for ricnar456:
Sorry, try again.
[sudo] password for ricnar456:
* Stopping ACPI services... [ OK ]
ricnar456@
Configurando acpid (1.0.4-5ubuntu9) ...
* Stopping Hardware abstraction layer hald [ OK ]
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | sNN kNN]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
-n: not really
-f: force
dpkg: error al procesar acpid (--configure):
el subproceso post-installation script devolvió el código de salida de error 1
Configurando hotkey-setup (0.1-17ubuntu21) ...
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | sNN kNN]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
-n: not really
-f: force
dpkg: error al procesar hotkey-setup (--configure):
el subproceso post-installation script devolvió el código de salida de error 1
dpkg: problemas de dependencias impiden la configuración de ubuntu-desktop:
ubuntu-desktop depende de acpid; sin embargo:
El paquete `acpid' no está configurado todavía.
ubuntu-desktop depende de hotkey-setup; sin embargo:
El paquete `hotkey-setup' no está configurado todavía.
dpkg: error al procesar ubuntu-desktop (--configure):
problemas de dependencias - se deja sin configurar
Configurando cron (3.0pl1-100ubuntu2) ...
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | sNN kNN]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
-n: not really
-f: force
dpkg: error al procesar cron (--configure):
el subproceso post-installation script devolvió el código de salida de error 1
dpkg: problemas de dependencias impiden la configuración de acpi-support:
acpi-support depende de acpid (>= 1.0.4-1ubuntu4); sin embargo:
El paquete `acpid' no está configurado todavía.
dpkg: error al procesar acpi-support (--configure):
problemas de dependencias - se deja sin configurar
Configurando nvidia-
*******
*
* The update-modules command is deprecated and should not be used!
*
*******
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | sNN kNN]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
-n: not really
-f: force
dpkg: error al procesar nvidia-
el subproceso post-installation script devolvió el código de salida de error 1
Configurando pulseaudio (0.9.10-1ubuntu1) ...
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | sNN kNN]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
-n: not really
-f: force
dpkg: error al procesar pulseaudio (--configure):
e...
| Steve Langasek (vorlon) wrote : | #37 |
Ricardo,
Your problem is unrelated to this bug. You appear to have a non-Ubuntu version of the update-rc.d program installed, which is normally provided by the sysv-rc package. In Ubuntu, versions 2.86.ds1-
You should correct this by installing the sysv-rc package from the Ubuntu archive in place of the non-Ubuntu one you currently have installed.
| Changed in acpid: | |
| status: | Unknown → Fix Released |
See this page: (en español)
http://
Or this: (in english)
http://<email address hidden>
it comes down to updating sysv-rc file to the default and last version from ubuntu distro:
sudo apt-get install sysv-rc=
and if needed then:
sudo dpkg --configure -a
| Paul Abrahams (abrahams) wrote : | #39 |
That doesn't work because of the ubiquitous hal install problem:
root@lepiota:~# apt-get install sysv-rc=
Reading package lists... Done
Building dependency tree
Reading state information... Done
sysv-rc is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up hal (0.5.11~
* Reloading system message bus config... [ OK ]
* Starting Hardware abstraction layer hald invoke-rc.d: initscript hal, action "start" failed.
dpkg: error processing hal (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
hal
E: Sub-process /usr/bin/dpkg returned an error code (1)
| Buddhika (blaknath) wrote : | #40 |
Ricardo,
>Your problem is unrelated to this bug. You appear to have a non-Ubuntu version of the update-rc.d program >installed, which is normally provided by the sysv-rc package. In Ubuntu, versions 2.86.ds1-
>You should correct this by installing the sysv-rc package from the Ubuntu archive in place of the non-Ubuntu one >you currently have installed.
You have solved my problem. Thanks a lot :)


I have now found a fix for this, running:
"sudo killall hald "
and then
"sudo dpkg --configure -a"
This seems to fix the "device or resource busy" error and therefore allows acpid, acpi-support and ubuntu-desktop to install