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 694134 - g-s-d sets an inotify watch on ~/.local/share/sounds, which normally does not exist.. and causes polling
g-s-d sets an inotify watch on ~/.local/share/sounds, which normally does not...
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: general
3.6.x
Other Windows
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-18 23:26 UTC by Arjan van de Ven
Modified: 2013-05-17 14:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make the sound theme directory if it does not exist yet (452 bytes, patch)
2013-02-18 23:26 UTC, Arjan van de Ven
committed Details | Review
0001-sound-Make-directories-with-mode-0700-not-0600.patch (1.11 KB, patch)
2013-02-20 14:50 UTC, Colin Walters
accepted-commit_now Details | Review

Description Arjan van de Ven 2013-02-18 23:26:39 UTC
Created attachment 236685 [details] [review]
Make the sound theme directory if it does not exist yet

technically this is a workaround for a bug in glib.. but that's been open since 2008 with no real fix in sight.

g-s-d puts a watch on ~/.local/share/sounds, which normally does not exist.
glib will then start polling the disk every 4 seconds to see if it ever appears... causing unneeded disk activity and power consumption.

I've attached a simple patch to just make the directory that we're about to watch for this.. and that solves the whole issue for g-s-d.
Comment 1 Bastien Nocera 2013-02-19 07:46:38 UTC
Fixed to apply to master, and backported along with simplification code to gnome-3-6.
Comment 2 Colin Walters 2013-02-20 14:50:03 UTC
Created attachment 236936 [details] [review]
0001-sound-Make-directories-with-mode-0700-not-0600.patch

[PATCH] sound: Make directories with mode 0700, not 0600

Otherwise spectacular failure occurs if the sound plugin wins the race
to make ~/.local and it ends up with 0600, which nothing can write to.
Comment 3 Colin Walters 2013-02-20 14:52:38 UTC
See also https://bugzilla.gnome.org/show_bug.cgi?id=694269
Comment 4 Bastien Nocera 2013-02-20 17:38:27 UTC
Review of attachment 236936 [details] [review]:

++
Comment 6 Iain Lane 2013-05-17 10:11:04 UTC
Can you push b97a62f56d7f3187c9ab516c8f3c2aa6785665c6 to gnome-3-6 too please?
Comment 7 Bastien Nocera 2013-05-17 14:13:21 UTC
Done.