Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 628698 - sys-power/acpid powerbtn.sh does shutdown the system although KDE5 is handling the power button
Summary: sys-power/acpid powerbtn.sh does shutdown the system although KDE5 is handlin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andriy Utkin (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2017-08-23 09:50 UTC by Jan-Matthias Braun
Modified: 2018-05-11 00:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to the ebuild to apply the patch for powerbtn.sh (ebuild_patch.patch,351 bytes, patch)
2017-08-23 09:51 UTC, Jan-Matthias Braun
Details | Diff
The patch for files/ adding org_kde_powerdevil to $PMS. (acpid-2.0.28-add-kde5-powerdevil.patch,518 bytes, text/plain)
2017-08-23 09:52 UTC, Jan-Matthias Braun
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Matthias Braun 2017-08-23 09:50:15 UTC
The current executable for kde 5 seems to be org_kde_powerdevil, which is not in the list of known desktop power management executables. Thus, acpid executes shutdown -h now.
Comment 1 Jan-Matthias Braun 2017-08-23 09:51:50 UTC
Created attachment 490200 [details, diff]
Patch to the ebuild to apply the patch for powerbtn.sh
Comment 2 Jan-Matthias Braun 2017-08-23 09:52:49 UTC
Created attachment 490202 [details]
The patch for files/ adding org_kde_powerdevil to $PMS.
Comment 3 Jan-Matthias Braun 2017-08-23 09:54:17 UTC
Ok, patch attached. This simply adds the executable name. I might be wrong about the role of powerdevil, but as I understood it, it should be the correct executable for the purpose.
Comment 4 Navid Zamani 2018-02-16 02:08:13 UTC
With the patch, and Plasma 5 running, the (physical) power button now doesn’t do anything at all anymore. (And without the patch, it shuts down, but without KDE being in control.)
Comment 5 Michael Moon 2018-02-26 09:24:20 UTC
My power button is a little too conveniently located so I set it to only lock the screen.

After a recent update, this bug affected me - power button issued shutdown despite being set to lock screen in kde settings.

I independently discovered the same solution as the reporter and added org_kde_powerdevil to the daemon match list ($PMS) in powerbtn.sh.

I have not tested what happens if my kde settings say to shut down on button press with the patch in place.
Comment 6 Jan-Matthias Braun 2018-03-07 12:01:35 UTC
(In reply to Navid Zamani from comment #4)
> With the patch, and Plasma 5 running, the (physical) power button now
> doesn’t do anything at all anymore. (And without the patch, it shuts down,
> but without KDE being in control.)

If powerdevil is configured correctly, I would think that this would be another bug, as then the fault lies with powerdevil.
For me, the power button is still working nicely with this patch included and power devil configured to suspend the system.
Comment 7 Andriy Utkin (RETIRED) gentoo-dev 2018-05-09 14:57:35 UTC
WIP in developer review: https://github.com/andrey-utkin/gentoo/commits/acpid-wip-20180502
Sorry for huge delay. Will commit soon.
Comment 8 Andriy Utkin (RETIRED) gentoo-dev 2018-05-11 00:08:03 UTC
sys-power/acpid-2.0.29-r1.ebuild (now in tree) applies the suggested patch and should fix the issue.

Also I sent Gentoo patches to upstream maintainer Ted Felix.