Fixing “Failed to Load Module Canberra-GTK-Module” Error

GTK, an abbreviation for GNOME Toolkit, is an open-source and feature-rich development toolkit used for creating GUI applications. It’s free and open-source and offers a rich set of UI tools for creating stunning and immersive desktop applications and UI elements for desktop environments and window managers. With GTK, you can develop standalone desktop apps to complete application suites.

If you have been running Linux for a while, you might have bumped into the “failed to load module canberra-gtk-module” error on the terminal. This occurs on Linux desktops and, as you can infer, is caused by a missing GTK module known as the canberra-gtk-module.

So, what is this module and how can the error be fixed? Let’s find out.

What Is Canberra-gtk-module?

The canberra-gtk-module is a GTK module that is part of the Libcanberra library, which is an implementation of the XDG Sound Theme and is responsible for playing event sounds.

Ever noticed a conspicuous sound produced when you plug on and unplug a power cable on your system? Or when you connect a flash drive? Or when a program pop-up appears on the screen? This is the functionality that libcanberra provides. It enables short and crisp sounds in response to a system event. The Canberra GTK module integrates sound alerts with UI events such as button clicks, pop-ups, etc.

These system sounds are essential in providing feedback on what’s happening to your system. For example, if the power cable is disconnected, the system sound alerts you to plug it back.

Failed to load module “canberra-gtk-module

The primary reason for the occurrence of this error is the missing canberra-gtk-module. The error can also be caused when a GTK-based app requires the module but cannot load it for some reason.

The error is typically encountered when launching a GTK-based GUI application from the terminal and the above reasons happen. Having seen what results in this error, let us now focus on how you can go about resolving it.

Fix “failed to load module canberra-gtk-module” Error

The solution to this error is to install all the missing Canberra GTK modules on your Linux system. To do this, you need to install the libcanberra-gtk-module package on your Linux system. Thankfully most modern distributions provide the package of their respective repositories.

Install Libcanberra Module in Linux

On Ubuntu or Debian systems, first, update the local package index.

$ sudo apt update

Then install the Libcanberra library which provides all the modules required.

$ sudo apt install libcanberra-gtk-module libcanberra-gtk3-module -y

On Red Hat systems such as Fedora, RHEL, and Rocky Linux, update the local DNF cache.

$ sudo dnf makecache

Then install the Libcanberra library as shown.

$ sudo dnf -y install libcanberra-gtk3

On Arch-based Linux distros, run the following command.

$ sudo pacman -Sy libcanberra 

The above commands should resolve any issues with do with the error.

Conclusion

As you have seen, the cause of the “failed to load module canberra-gtk-module” error is the missing libcanberra-gtk-module modules which can easily be installed using your distribution’s package manager.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Winnie Ondara
My name is Winnie, a Linux enthusiast and passionate tech writer in Linux and DevOPs topics. I enjoy keeping abreast with the latest technologies in the Linux ecosystem and trying out new tools provided by the FOSS community.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

3 Comments

Leave a Reply
  1. It no longer functions on Ubuntu versions 23.* or 24.04. libcanberra has been effectively deprecated on Wayland-based systems. Despite being installed by default, it now only leads to confusing and irrelevant errors.

    Reply
    • @Keith,

      Thank you for your comment. It’s true that libcanberra is deprecated on Wayland-based systems, which includes the newer versions of Ubuntu like 23.* and 24.04. As you mentioned, it can cause confusing and irrelevant errors.

      To resolve these issues on Ubuntu 23.* and 24.04, you can try removing libcanberra if it’s causing problems:

      sudo apt remove libcanberra-gtk-module libcanberra-gtk3-module
      

      Alternatively, if you still need the functionality provided by libcanberra, you can install the necessary packages to ensure compatibility:

      sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
      

      However, if you’re using Wayland, it’s often best to rely on more up-to-date libraries and frameworks designed to work seamlessly with it.

      Thanks again for bringing this to our attention!

      Reply
      • I do not understand what you’re saying.

        I have the packages you mentioned installed on Ubuntu 24, but I still see that error in the syslog:

        firefox[6710]: Failed to load module "canberra-gtk-module"
        

        What’s wrong?

        Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.