! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
make sending network manager sleep a runtime / config option
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-power-manager
Component:
General

Comments

Description Philip Lawatsch 2014-02-20 16:33:41 CET
Hi,

Please add a config option to disable sending the "Sleep" signal to NetworkManager even if nm support was enabled at compile time.

I want to let systemd handle a few things that require my network connection before sending the machine to sleep (like logging out of my jabber accounts and unmounting some network shares). Sadly the power manager sends a sleep signal to nm way before any of my systemd services have a chance to run and thus the connection is already down.

Adding a checkbox in the extended settings part of the power manager settings dialog to simply disable any nm interaction would be a nice solution for my use case. That way I can avoid having to carry a patch against my distributions package (they enable nm support).

If such a feature would be accepted I would be willing to try and provide some patches.

kind regards
Comment 1 Eric Koegel editbugs 2014-04-21 07:46:50 CEST
Created attachment 5446 
Add a option for network manager sleep

This patch should add that option. Let me know if this is what you were looking for. Also, feel free to submit patches in the future, more help is always apperciated :)
Comment 2 Philip Lawatsch 2014-04-22 19:28:15 CEST
Hi,

Yes, this is exactly what I wanted, thanks a lot!
I back ported the patch it to 1.2 and tested it with that. Worked fine!
Comment 3 Eric Koegel editbugs 2014-04-28 09:29:49 CEST
Thanks for testing it, pushed to master in http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=345ec22154f6e922394f5d9e228a611048eee172
Comment 4 Guido Berhoerster 2014-06-06 16:34:04 CEST
Why would you bypass NM like that via systemd, that seems just plain wrong as NM has a script dispatch facility for this exact purpose which works for any case where the network goes down, not just sleep/hibernate. In fact distros actually supply such scripts, e.g. to unmount SMB and NFS shares when the network goes down.
I think such hackes should not be exposed in the settings UI, if people start to fiddle with systemd units it is probably not too much too ask to enable this setting directly via xfconf.

Bug #10702

Reported by:
Philip Lawatsch
Reported on: 2014-02-20
Last modified on: 2014-06-06

People

Assignee:
Eric Koegel
CC List:
2 users

Version

Version:
Unspecified

Attachments

Additional information