acpid steals powerbutton events from powerdevil

Bug #321100 reported by mrvanes
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
acpid (Ubuntu)
In Progress
Medium
Unassigned
Nominated for Jaunty by Tom Chiverton

Bug Description

Binary package hint: acpid

On my laptop (Dell Vostro 1400) when acpid is running, powerdevil doesn't see the powerbutton event. This means that I don't get the 'logout/restart/poweroff' dialog, but an immediate powerdown if I press the powerbutton. Ubuntu release: Jaunty.

Don't know if this a duplicate of https://bugs.launchpad.net/gnome-power/+bug/57872 but that one hasn't been touched for a while and is about gnome-power-manager instead of powerdevil (kde).

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thank you for your bug report. Could you please do the following:

1) Stop acpid (sudo /etc/init.d/acpid stop).
2) Run "sudo cat /proc/acpi/event"
3) Press your power button and paste any terminal output it to this bug report.

Thanks

Changed in acpid:
status: New → Incomplete
Revision history for this message
mrvanes (mrvanes) wrote :

# cat /proc/acpi/event
button/power PBTN 00000080 00000001
^C

There's a minor change in the original bug since recent updates:
I *do* see the logout/restart/poweroff dialog for a very short time now, I just don't have the choice...

So powerdevil probably sees the event, but acpid takes over after that.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks, that looks like an acpi-support bug

Changed in acpid:
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I'll take a look at this

Changed in acpi-support:
status: Confirmed → Triaged
assignee: nobody → chrisccoulson
status: Triaged → In Progress
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Ok, someone else might have to take a look at it instead. I thought it would be a trivial fix, but I don't know enough about KDE to implement it ;)

Changed in acpi-support:
assignee: chrisccoulson → nobody
status: In Progress → Triaged
Revision history for this message
Michael Marley (mamarley) wrote :

I know how to write bash scripts pretty well, so I will take a look at this.

Changed in acpi-support:
assignee: nobody → thefirstm
Revision history for this message
Michael Marley (mamarley) wrote :

OK, I think I have this working now. Since (at least in KDE4) PowerDevil does not have its own daemon, there is no way to check to see if PowerDevil is running. Instead, my modified script also checks to see if kded4 (which I believe is specific to KDE4) is running, and if it is, the script exits, allowing PowerDevil to handle the event. I attached the script. It would be nice if somebody could also test it on a Gnome system to make sure it doesn't interfere with that.

Changed in acpi-support:
status: Triaged → In Progress
Revision history for this message
mrvanes (mrvanes) wrote :

I can confirm that it fixes the problem! Thx.

Revision history for this message
Michael Marley (mamarley) wrote :

OK, this seems to be fixed now. Could someone with upload privileges upload it, please?

Changed in acpid:
assignee: thefirstm → nobody
Revision history for this message
mrvanes (mrvanes) wrote :

Recent updates in Jaunty overwrote my manual changes (apparently) and the problem is back. Could this fix please be uploaded into the repository please?

Revision history for this message
Michael Marley (mamarley) wrote :

I would if I could, but I can't. Sorry. We will have to wait for someone who has the privileges to upload it.

Revision history for this message
mrvanes (mrvanes) wrote :

I understand, but how are they notified?

Revision history for this message
Michael Marley (mamarley) wrote :

I can try sending a message to Chris Coulson, who was previously working on the bug. I think he has upload privileges.

Revision history for this message
Tom Chiverton (bugs-launchpad-net-falkensweb) wrote :

I made the same patch in the 8.10 version of this bug, but there's been no sign anyone cares about fixing that either.

Revision history for this message
Tom Chiverton (bugs-launchpad-net-falkensweb) wrote :

Re, attached replacement script.
Based on this test not printing 'kde':
if pidof gnome-power-manager kpowersave > /dev/null || (pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop kded kded loadedModules | grep -q klaptopdaemon | pidof kded4 > /dev/null) ; then echo "kde"; fi
I think maybe the test should be like this (note brackets and double bars):
if pidof gnome-power-manager kpowersave > /dev/null ||
  (pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop kded kded loadedModules | grep -q klaptopdaemon) || pidof kded4 > /dev/null ; then
    exit
fi

Revision history for this message
emikaadeo (emikaadeo) wrote :

Yes, this script really solved the situation here.
Please devs, upload this.

Revision history for this message
Malte S. Stretz (mss) wrote :

This is the same as bug 268734 and both have a (slightly different) patch. Not sure which to mark as a dup of the other :)

Revision history for this message
Malte S. Stretz (mss) wrote :

Here is the above change as a patch (from Tom Chiverton on bug 288639).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.