After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 704863 - Inhibition reason is useless
Inhibition reason is useless
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-07-25 12:46 UTC by Bastien Nocera
Modified: 2013-09-13 11:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sleep-monitor: Give better inhibition reason (1.10 KB, patch)
2013-07-25 12:47 UTC, Bastien Nocera
none Details | Review

Description Bastien Nocera 2013-07-25 12:46:42 UTC
This is what I see when I list the inhibitors:
$ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.ListInhibitors 
([('sleep', 'root', 'inhibited', 'delay', uint32 0, uint32 359), ('sleep', 'hadess', 'GNOME needs to lock the screen', 'delay', 1000, 699), ('handle-power-key:handle-suspend-key:handle-hibernate-key', 'hadess', 'GNOME handling keypresses', 'block', 1000, 699), ('sleep', 'GNOME Shell', 'GNOME precisa bloquear a tela', 'delay', 1000, 815)],)

As opposed to GNOME, NetworkManager gives a useless reason for inhibition, and I had to look at what the PID "359" was to discover what it was used for. 

From:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/src/nm-sleep-monitor-systemd.c?h=nm-0-9-8#n121
Comment 1 Bastien Nocera 2013-07-25 12:47:19 UTC
Created attachment 250109 [details] [review]
sleep-monitor: Give better inhibition reason
Comment 2 Dan Winship 2013-07-25 12:59:12 UTC
Comment on attachment 250109 [details] [review]
sleep-monitor: Give better inhibition reason

>+	                                                    "NetworkManager needs to turn off networks",

should be localized, right?
Comment 3 Bastien Nocera 2013-07-25 13:01:07 UTC
It doesn't appear in UI. gnome-settings-daemon doesn't translate it, but gnome-shell does. Up to you.
Comment 4 Jiri Klimes 2013-09-13 11:13:31 UTC
The reason was enhanced in the meanwhile, but I now used your text and added localization: bc4a8f51fb4b3573d3377b3c5a8f07f41007f10d