Bug 313693 - Running scripts before and afer suspending a system.
Summary: Running scripts before and afer suspending a system.
Status: RESOLVED UNMAINTAINED
Alias: None
Product: solid
Classification: Unmaintained
Component: powermanagement (show other bugs)
Version: 4.9.5
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dario Freddi
URL: http://forum.kde.org/viewtopic.php?f=...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-22 14:59 UTC by firewalker
Modified: 2018-09-04 15:41 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description firewalker 2013-01-22 14:59:11 UTC
It seems that there is not a way to run scripts before and after suspending a system. Something like /etc/pm/sleep.d/ pm-utils use.

Reproducible: Always

Steps to Reproduce:
Try to ad a script to excecute before suspending a system using KDE (Solid). E.g. using the Sleep button located at the start menu.


Expected Results:  
The user should be able to add a scripts before and after suspending a system.
Comment 1 Markus Hauschild 2013-03-02 12:23:15 UTC
This is really a major annoyance: If you have a NFS share mounted, put your laptop to sleep and go elsewhere KDE freezes on resume. If I could hook a simple script just before the suspend it would really help a lot!
Comment 2 Alex Fiestas 2013-03-03 17:54:58 UTC
Dario, should we implement this?
Comment 3 firewalker 2013-03-03 19:50:37 UTC
I don;t see any reason not to. It an essential feature. If it;s not to be implemented KDE could drop the current scheme and make use of pm-utils for example.
Comment 4 Oliver Henshaw 2013-03-04 18:00:28 UTC
The discussion of PrepareForSleep signals and delay locks at http://www.freedesktop.org/wiki/Software/systemd/inhibit may be interesting. Rough equivalents existed in previous versions of upower, but AIUI aren't as reliable.
Comment 5 Alex Fiestas 2013-03-05 19:46:06 UTC
I wouldn't mind having it implemented, though I think that these stuff belongs somewhere else (not in KDE).

Normal user won't make use of this, while advance user can create a hook directly in the system (/etc/pm-utils/ or any other place).

What do you think firewalker? is showing an interface for this really needed?
Comment 6 firewalker 2013-03-05 20:38:59 UTC
No. There is no need for an interface. Just a location where someone can place the scripts for "sleep" and "wake-up".
Comment 7 Jarda 2013-10-24 06:56:55 UTC
Is there anyting new about this issue? Give us at least possibility to use pm-suspend. KDE catches Sleep event and does it it's way without chance to run script. I see two solutions:
1) disable that KDE catch Sleep event and let it pass to acpid and pm-util
2) make KDE run it's own script before sleep and after wakeup
Comment 8 Alex Tsi 2014-01-06 21:38:05 UTC
What is going on with this feature?
I have hangs with kde suspend, which I can solve for pm-suspend by putting script in /etc/pm/sleep.d/.
But KDE's suspend really doesn't work for me. Is it still under development?
Comment 9 firewalker 2014-01-06 22:13:45 UTC
Probably it is left aside.
Comment 10 cprise 2014-07-08 21:12:41 UTC
I need pm-utils to be invoked also. Admins and power users should have this feature, and app/service developers should be able to hook in using sleep.d scripts (instead of creating a work-around specifically for KDE systems).
Comment 11 cprise 2014-07-08 21:15:43 UTC
*** This bug has been confirmed by popular vote. ***
Comment 12 Eugene 2015-05-17 10:46:42 UTC
This feature request is rather important in case you are having a numerous workplaces (office(s), home, public places etc).
I faced with problem of absence any way to configure network interface(s) and mount/dismount shares while open/close lid.
I've spent couple day to find such way before find this feature request and was very amazed of it and of ages of this ticket.
Absence of th is make KDE very similar to a windows in cases of fine tuning by scripts and/or config but not linux.
Comment 13 Andrew Crouthamel 2018-09-04 15:41:55 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug. Please try again with the latest version and submit a new bug to frameworks-solid if your issue persists. Thank you!