Public bug reported:

I was looking at what's sucking power on the Trusty desktop and found
that NetworkManager is polling every 4 seconds adding an inotify watch
on /var/lib/ofono (which does not exist on the desktop - isn't that a
phone related component?).

Anyhow, strace on one of the threads of NetworkManager shows:

sudo strace  -p 710
Process 710 attached
restart_syscall(<... resuming interrupted call ...>) = 0
inotify_add_watch(8, "/var/lib/ofono", 
IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR)
 = -1 ENOENT (No such file or directory)
poll([{fd=9, events=POLLIN}, {fd=8, events=POLLIN}], 2, 3996) = 0 (Timeout)
inotify_add_watch(8, "/var/lib/ofono", 
IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR)
 = -1 ENOENT (No such file or directory)
poll([{fd=9, events=POLLIN}, {fd=8, events=POLLIN}], 2, 3995) = 0 (Timeout)
inotify_add_watch(8, "/var/lib/ofono", 
IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR)
 = -1 ENOENT (No such file or directory)
poll([{fd=9, events=POLLIN}, {fd=8, events=POLLIN}], 2, 3995) = 0 (Timeout)
inotify_add_watch(8, "/var/lib/ofono", 
IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR)
 = -1 ENOENT (No such file or directory)

So:

1. The polling is rather heavy - every 4 seconds? Is that really necessary?
2. Surely we can avoid repeatedly adding a watch on a directory that does not 
exist.  Are there better ways than doing this so frequently, especially because 
it does not seem relevant on my desktop install.

Anyhow, can this be investigated, it's one of the final big causes of
wakeups on an idle desktop image.

** Affects: network-manager-applet (Ubuntu)
     Importance: High
         Status: New

** Changed in: network-manager-applet (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1289532

Title:
  NetworkManager is polling every 4 seconds on the Desktop looking for
  /var/lib/ofono

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/1289532/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to