I can't seem to reproduce this. I've tried with NetworkManager
0.9.8.8-0ubuntu5 with the /var/lib/ofono directory inexistent, with it
created, with it created and with subdirectories...

I've also tried another version I was working on; can't see it there
either...

And before testing all that I built NM with a patch to not try to bring
up a g_file_monitor for that path if it doesn't exist; and that
obviously also doesn't show the problem.

Is there any more you can add to this bug report, such as what version
of NM is running at the time, and whether ofono is also installed and
running (though I expect it's not, since you don't appear to have
/var/lib/ofono).

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

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

Status in “network-manager” package in Ubuntu:
  Triaged

Bug description:
  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.

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

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to