powers off instead of sleep under KDE4

Bug #1243399 reported by Tom Chiverton
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
acpid (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Looks like a regression of #268734 - it's exactly the same.

KDE4 power settings say to sleep when power button pressed, but instead the machine powers off - obvious data loss bug.

If I comment out the final line of /etc/acpi/powerbtn.sh and add 'touch /tmp/fail' then the file in /tmp/ is created and the machine sleeps as expected.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: acpi-support 0.142
ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3
Uname: Linux 3.11.0-12-generic i686
ApportVersion: 2.12.5-0ubuntu2
Architecture: i386
Date: Tue Oct 22 21:28:12 2013
MarkForUpload: True
SourcePackage: acpi-support
UpgradeStatus: No upgrade log present (probably fresh install)

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

Oh, and it's not #239191 because ~/.Xauthority is owned correctly:
$ ls -lah ~/.Xauthority
-rw------- 1 falken falken 55 Oct 22 21:18 /home/falken/.Xauthority
$

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in acpi-support (Ubuntu):
status: New → Confirmed
Revision history for this message
Antonis Kanouras (akanouras) wrote :

Same here.

/etc/acpi/powerbtn.sh tries to source /usr/share/acpi-support/power-funcs , which doesn't exist in any package under 13.10 (it did exist in 13.04), and run getXconsole() from it, which would set XUSER.

With XUSER not set, and "kded4" not included in the PMS variable, control will always reach the /sbin/shutdown line when only KDE sessions are running on the system.

Please find attached an updated version of the script, using logind for power manager detection instead.

Revision history for this message
Antonis Kanouras (akanouras) wrote :

Note that the above patch doesn't check if Powerdevil is loaded by the user's kded anymore. I can re-add that functionality if you think it's a worthwhile scenario to account for (personally I don't think it is - Powerdevil is a mature KDE technology nowadays).

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "powerbtn.sh patch for logind support" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
affects: acpi-support (Ubuntu) → acpid (Ubuntu)
Revision history for this message
Antonis Kanouras (akanouras) wrote :

The previous patch was generated from a tainted origin.
I'm attaching a new one with the process detection refactored into a separate function, and made more robust.

Steve Langasek (vorlon)
no longer affects: acpi-support (Ubuntu)
Revision history for this message
dino99 (9d9) wrote :

This version has expired long ago

Changed in acpid (Ubuntu):
status: Confirmed → Invalid
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.