pressing power button in kde shuts down computer immediately

Bug #508073 reported by Per Ångström on 2010-01-15
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
acpid (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: kdelibs5

In gnome, when I press the power button, I get a dialog where I can choose between options such as suspend, hibernate, shut down or restart. When I do the same in KDE, the computers powers down immediately without warning.

How to reproduce:
1) Log in to KDE.
2) Make sure you don't have unsaved data or other unfinished business on your computer.
3) Press the power button.

Expected behavior: A dialog should appear which would let you choose between options or cancel.
Current behavior: The computer powers down immediately.

ProblemType: Bug
Architecture: amd64
Date: Fri Jan 15 20:05:41 2010
DistroRelease: Ubuntu 10.04
Package: kdelibs (not installed)
ProcVersionSignature: Ubuntu 2.6.32-10.14-generic
SourcePackage: kdelibs
Tags: lucid
Uname: Linux 2.6.32-10-generic x86_64

Per Ångström (autark) wrote :
Jonathan Thomas (echidnaman) wrote :

Hi there!

Thanks for reporting this bug! Your bug seems to be a problem with the KDE program itself, and not with our KDE packages. While we appreciate your issue, it would be better if it was tracked at https://bugs.kde.org, so that the KDE developers can deal with this speedily and have direct communication with you as the reporter for more effective debugging.

Thanks!

affects: kde4libs (Ubuntu) → kdebase-workspace (Ubuntu)
Changed in kdebase-workspace (Ubuntu):
status: New → Invalid
Philip Muškovac (yofel) wrote :

hm, this actually sounds like https://bugs.kde.org/show_bug.cgi?id=180734

Jonathan Thomas (echidnaman) wrote :

Further discussion/debugging on IRC shows that this is probably a powerbtn.sh bug.

affects: kdebase-workspace (Ubuntu) → acpi-support (Ubuntu)
Changed in acpi-support (Ubuntu):
status: Invalid → Confirmed
Steve Langasek (vorlon) wrote :

> Further discussion/debugging on IRC shows that this is probably a powerbtn.sh bug.

That's not much help if you don't say what the bug is. powerbtn.sh in lucid is already configured to be a no-op if it detects klaptopdaemon or powerdevil running, so what's the bug here?

Also, powerbtn.sh is from acpid, not acpi-support; reassigning.

affects: acpi-support (Ubuntu) → acpid (Ubuntu)
Changed in acpid (Ubuntu):
status: Confirmed → Incomplete
Philip Muškovac (yofel) wrote :

I actually filed bug 508131 about this as I wasn't sure if it should be reassigned. I'll duplicate it. (You'll find the explenation of the bug there).

Jonathan Thomas (echidnaman) wrote :

Sorry, was in a bit of a rush to get the comment posted. So that people don't have to travel to the dupe, the bug is in detecting whether or not any power manager at all is running. Since it uses getXconsole from /etc/acpi/powerbtn.sh without sourcing it, it always fails to find a power manager and will always fall back to the shutdown command. Here's a debdiff based of of Philip's work to fix this.

Changed in acpid (Ubuntu):
status: Incomplete → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package acpid - 1.0.10-5ubuntu2

---------------
acpid (1.0.10-5ubuntu2) lucid; urgency=low

  * Source /usr/share/acpi-support/power-funcs in powerbtn.sh (LP: #508073)
 -- Jonathan Thomas <email address hidden> Fri, 15 Jan 2010 19:59:47 -0500

Changed in acpid (Ubuntu):
status: Triaged → Fix Released
Per Ångström (autark) wrote :

Works for me after apcid upgrade. Cheers!

Dave Walker (davewalker) wrote :

@Jonathan, Has this been forwarded to Debian?

Jonathan Thomas (echidnaman) wrote :

I haven't forwarded the fix, personally. It should be noted that this fix requires adding a dependency on acpi-support too, if anybody wants to forward this fix.

Tom Helner (duffman) wrote :

I am still experiencing this symptom on a fully up to date (acpid 1.0.10-5ubuntu2.1) Lucid upgrade.

What's happening is the following line in /etc/acpi/powerbtn.sh is failing because "pidof kded4" is returning 2 PIDs:

        ( test "$XUSER" != "" && test -x /usr/bin/qdbus && test -r /proc/$(pidof kded4)/environ && su - $XUSER -c "eval $(echo -n 'export '; cat /proc/$(pidof kded4)/environ |tr '\0' '\n'|grep DBUS_SESSION_BUS_ADDRESS); qdbus org.kde.kded" | grep -q powerdevil) ; then

This is not a regression in acpid 1.0.10-5ubuntu2.1. The test line in powerbtn.sh in both 1.0.10-5ubuntu2 & 1.0.10-5ubuntu2.1 are identical. This actually might be a symptom of another problem that I have not been able to fix yet. The reason I am getting 2 PIDs for kded4 is because 1 is defunct.

I am wondering if there is a better way to detect if KDE4 is running that is more robust than "pidof kded4". Pre-Lucid, Ubuntu was using "pidof ksmserver". I have also seen "ps -efww|grep kded4|grep $XUSER|grep -v grep|grep -v defunct" being suggested.

Steve Langasek (vorlon) wrote :

Tom, please file a separate bug report for this follow-on issue.

Tom Helner (duffman) wrote :

Looks like there already was another bug opened for my issue, thanks.
https://bugs.launchpad.net/ubuntu/+source/acpid/+bug/553557

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

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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