GNOME Bugzilla – Bug 487357
gedit is polling ~/.recently-used.xbel thus waking up the CPU
Last modified: 2007-10-18 15:18:57 UTC
Please describe the problem: According to powertop gedit is waking up the CPU every 5 seconds while doing completely nothing. An "strace -tt -p <pid-of-gedit>" shows that it is stat64()ing the file .recently-used.xbel in the user's home directory: [william@localhost ~]$ strace -tt -p 2410 Process 2410 attached - interrupt to quit 20:59:03.717296 gettimeofday({1192586343, 717811}, NULL) = 0 20:59:03.718018 read(3, 0x9b0ae58, 4096) = -1 EAGAIN (Resource temporarily unavailable) 20:59:03.718436 gettimeofday({1192586343, 718658}, NULL) = 0 20:59:03.718827 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=12, events=POLLIN|POLLPRI}, {fd=13, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN}, {fd=10, events=POLLIN|POLLPRI}], 8, 1620) = 0 20:59:05.339285 gettimeofday({1192586345, 339449}, NULL) = 0 20:59:05.339647 stat64("/home/william/.recently-used.xbel", {st_mode=S_IFREG|0664, st_size=18610, ...}) = 0 20:59:05.340276 read(3, 0x9b0ae58, 4096) = -1 EAGAIN (Resource temporarily unavailable) 20:59:05.340675 gettimeofday({1192586345, 340809}, NULL) = 0 20:59:05.341046 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=12, events=POLLIN|POLLPRI}, {fd=13, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN}, {fd=10, events=POLLIN|POLLPRI}], 8, 4998) = 0 20:59:10.339287 gettimeofday({1192586350, 339454}, NULL) = 0 20:59:10.339724 stat64("/home/william/.recently-used.xbel", {st_mode=S_IFREG|0664, st_size=18610, ...}) = 0 20:59:10.340291 read(3, 0x9b0ae58, 4096) = -1 EAGAIN (Resource temporarily unavailable) 20:59:10.340676 gettimeofday({1192586350, 340807}, NULL) = 0 20:59:10.341039 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=12, events=POLLIN|POLLPRI}, {fd=13, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN}, {fd=10, events=POLLIN|POLLPRI}], 8, 4998) = 0 20:59:15.339264 gettimeofday({1192586355, 339501}, NULL) = 0 20:59:15.339705 stat64("/home/william/.recently-used.xbel", {st_mode=S_IFREG|0664, st_size=18610, ...}) = 0 20:59:15.340276 read(3, 0x9b0ae58, 4096) = -1 EAGAIN (Resource temporarily unavailable) 20:59:15.340669 gettimeofday({1192586355, 340803}, NULL) = 0 20:59:15.341040 poll( <unfinished ...> Process 2410 detached Steps to reproduce: Every time you start gedit while doing nothing and there is no even a file loaded into the app. Actual results: gedit wakes up the CPU every 5 seconds keeping the system from saving power Expected results: gedit should use a notification mechanism to know that the recent files thing have changed and update the GUI accordingly, this way it wouldn't wake up the CPU while the user is not using the app at all. Does this happen every time? yes Other information: This is on an updated Rawhide system (Fedora 8 Test 3), the relevant packages are: gedit-2.20.1-1.fc8 gtk2-2.12.0-6.fc8 glib2-2.14.1-1.fc8
gedit just uses gtkrecent api. Moving to gtk.
Well, this bug is now being tracked in #487375 by Emmanuele Bassi *** This bug has been marked as a duplicate of 487375 ***