Failed to load module "canberra-gtk-moduleanberra-gtk-module" (sic)

Bug #888779 reported by skierpage
60
This bug affects 13 people
Affects Status Importance Assigned to Milestone
libcanberra (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Since upgrading to Kubuntu 11.10 , when I run various GTK applications (Firefox, SeaMonkey, even the utility canberra-gtk-play) from the command line I get the terminal output
   Failed to load module "canberra-gtk-moduleanberra-gtk-module"

Note the misspelling. Despite the error, sounds seem to play. E.g.
% canberra-gtk-play -f /usr/share/sounds/pop.wav
Gtk-Message: Failed to load module "canberra-gtk-moduleanberra-gtk-module
(and I hear the sound).

strace shows the app really trying to load that garbled library name: after opening /lib/x86_64-linux-gnu/libnss_files.so.2 and /etc/passwd, the GTK apps all try to load libcanberra-gtk-moduleanberra-gtk-module.so from a bunch of locations starting with /home/skierpage/.gtk-2.0/2.10.0/x86_64-pc-linux-gnu/modules/ , and eventually print this message. But it's some runtime thing; using `ldd` I can't find any reference to *nberra-gtk-module in these programs and libraries, and I'm not sure how to debug runtime library loading. I do have package libcanberra-gtk3-module Version: 0.28-0ubuntu11 installed (a dependency of libnotify4 ?) but that provides a slightly different GTK*3* library name /usr/lib/gtk-3.0/modules/libcanberra-gtk3-module.so

Google finds two other people in the world with this exact error, http://blog.mcmoyer.com/gnome-3-and-crashing (using Fedora and Gnome 3) and http://irclogs.ubuntu.com/2011/04/28/%23ubuntu-ru.txt (a Russian I think on ubuntu 11.04). Weird!

Revision history for this message
skierpage (skierpage) wrote :

I couldn't find anything in /usr/bin, but then I tried `grep -r nberra` /etc`. I have
  /etc/X11/Xsession.d/52libcanberra-gtk3-module_add-to-gtk-modules
  /etc/X11/Xsession.d/52libcanberra-gtk-module_add-to-gtk-modules:
both adding "canberra-gtk-module" to GTK_MODULES, and sure enough

  % echo $GTK_MODULES
  canberra-gtk-moduleanberra-gtk-module

That explains why GTK apps are trying and failing to load this garbled library!

(BUG!) I don't see how the environment variable gets garbled every time I restart, perhaps there's a race condition (in the X display manager?) loading the two sourced Xsession(5) files?

It turns out I have both
  i A libcanberra-gtk3-module - translates Gtk3 widgets signals to event sounds
  i libcanberra-gtk-module - translates Gtk+ widgets signals to event sound
installed. (BUG?) Do these packages conflict? `aptitude show` says each conflicts with itself, which seems weird, but I'm no packaging expert.

It sounds like Debian upstream may be getting rid of the Xsession files that fiddle with GTK_MODULES in libcanberra-0.28-3, see bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622992

To sum up, the workaround is probably to uninstall one of the libcanberra-gtk{,3}-module packages, but as usual there may be other bugs lurking: the corruption of GTK_MODULES and a packaging issue.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libcanberra (Ubuntu):
status: New → Confirmed
Revision history for this message
Alex Wauck (awauck) wrote :

This bug is preventing me from running Banshee. It should be noted that I started out with an Ubuntu Oneiric beta installation and then installed kubuntu-desktop at some point after release. I also went on a Gnome-killing spree after encountering some strange problems where certain Gnome stuff didn't get along with KDE. Unfortunately, I cannot remember exactly what I removed or exactly what the problem was. I don't think any of that is the cause of the problem, though, since I can't imagine how it would cause the observed misspelling.

Revision history for this message
Alex Wauck (awauck) wrote :

Hm...I guess this isn't what prevents me from running Banshee; that seems to be an oxygen-gtk failure.

Revision history for this message
PascalKHH (pascal-hh) wrote :

same problem with imule and chromium-browser under kde 4.7.2

Revision history for this message
skierpage (skierpage) wrote :

Alex,Pascal, others
If you're going to report this problem, I suggest you provide more info. In a terminal enter
    echo $GTK_MODULES
and copy and paste the result, then
   find /etc/X11 -iname '*canberr*' -ls
and copy and paste the result.

I uninstalled libcanberra-gtk-module so now I only have one of the files in /etc/X11/Xsession.d, and now I have a non-garbled GTK_MODULES environment variable containing
  canberra-gtk-module

For some reason Gnome programs are not looking for libcanberra-gtk-module.so in /usr/lib/gtk-3.0/modules , so when I run any Gnome app I now get the similar terminal output
  Gtk-Message: Failed to load module "canberra-gtk-module"
I just ignore the error message. If you think you need libcanberra's "implementation of the XDG Sound Theme and Name Specifications, for generating event sounds on free desktops" then see bug 872172 for possible fixes by installing various packages or fiddling with GTK_PATH.

Revision history for this message
linjunhalida (linjunhalida) wrote :

Same issue.

I installed ubuntu 12.04, and change to kubuntu 12.04 by install kubuntu desktop package.

Then I download eclipse from eclipse official website, after run eclipse, it remind me this error message.

Everything works fine currently.

Revision history for this message
Peter Edwards (kzq-peter-x8o) wrote :

This appears to be related to using zsh as your shell

in 52libcanberra-gtk3-module_add-to-gtk-modules and 52libcanberra-gtk-module_add-to-gtk-modules,
Change:
GTK_MODULES="$GTK_MODULES:canberra-gtk-module"
to
GTK_MODULES="${GTK_MODULES}:canberra-gtk-module"

Revision history for this message
Roman A. Taycher (rtaycher) wrote :

Note I tried Peter's solution and it worked. I use zsh as a login shell.

Revision history for this message
rubo77 (rubo77) wrote :

confirmed on Kubuntu 13.10 and Peter's solution worked too. I use zsh as a login shell too

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.