No playback sound in Audacity 3.1.3 (snap) on Xubuntu 20.04 (focal) [SOLVED]

Hello…!!

I tried to install audacity from the software centre on the Xubuntu operating system, but the process got stuck somewhere and I closed the software centre. Later I tried to install it using the terminal as a snap package and ran the following commands.

mohit@acerA515:~$ sudo snap install audacity
[sudo] password for mohit: 
error: snap "audacity" has "install-snap" change in progress

mohit@acerA515:~$ snap changes
ID   Status  Spawn                   Ready                   Summary
76   Done    yesterday at 22:25 IST  yesterday at 22:27 IST  Install "shotcut" snap from "latest/stable" channel
77   Doing   yesterday at 22:28 IST  -                       Install "audacity" snap from "latest/stable" channel

mohit@acerA515:~$ sudo snap abort 77

mohit@acerA515:~$ sudo snap install audacity
error: snap "audacity" has "install-snap" change in progress

mohit@acerA515:~$ snap changes
ID   Status   Spawn                   Ready                   Summary
76   Done     yesterday at 22:25 IST  yesterday at 22:27 IST  Install "shotcut" snap from "latest/stable" channel
77   Undoing  yesterday at 22:28 IST  -                       Install "audacity" snap from "latest/stable" channel

mohit@acerA515:~$ snap changes
ID   Status  Spawn                   Ready                   Summary
76   Done    yesterday at 22:25 IST  yesterday at 22:27 IST  Install "shotcut" snap from "latest/stable" channel
77   Error   yesterday at 22:28 IST  today at 09:45 IST      Install "audacity" snap from "latest/stable" channel

mohit@acerA515:~$ snap changes
ID   Status  Spawn                   Ready                   Summary
76   Done    yesterday at 22:25 IST  yesterday at 22:27 IST  Install "shotcut" snap from "latest/stable" channel
77   Error   yesterday at 22:28 IST  today at 09:45 IST      Install "audacity" snap from "latest/stable" channel

mohit@acerA515:~$  sudo snap install audacity
audacity 3.1.3 from Daniel Llewellyn (diddledani) installed

mohit@acerA515:~$  lsb_release -a 
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal

mohit@acerA515:~$

When I opened the Audacity application it asked me to give permission for ALSA and I ran the following command as suggested

mohit@acerA515:~$ sudo snap connect audacity:alsa
[sudo] password for mohit: 

mohit@acerA515:~$

After running the above command I opened the application and got an error stating “error opening sound device”. So I closed the application and started the application again. This time there was no error, but when I load an MP3 file and try to play it I get no sound. At the top right I can see the horizontal sound bars bouncing with the music being played but it seems as if I had my system put on mute.

Following is the output when I open the application from the terminal.

mohit@acerA515:~$  audacity 
ln: failed to create symbolic link '/home/mohit/snap/audacity/971/.config/gtk-2.0/gtkfilechooser.ini': File exists
Testing for explicit PulseAudio choice...
Testing for ALSA permissions...
...and using ALSA.

(process:273993): Gdk-CRITICAL **: 11:10:55.539: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed

(process:273993): Gdk-CRITICAL **: 11:10:55.539: _gdk_pixmap_new: assertion '(drawable != NULL) || (depth != -1)' failed
/root/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/e419d9154337f54ac2c5cc53c5142e9073a52daa/source_subfolder/src/gtk/bitmap.cpp(827): assert ""IsOk()"" failed in ConvertToImage(): invalid bitmap
/root/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/e419d9154337f54ac2c5cc53c5142e9073a52daa/source_subfolder/src/common/image.cpp(2172): assert ""IsOk()"" failed in SetMaskColour(): invalid image
/root/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/e419d9154337f54ac2c5cc53c5142e9073a52daa/source_subfolder/src/common/image.cpp(2223): assert ""IsOk()"" failed in SetMask(): invalid image
/root/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/e419d9154337f54ac2c5cc53c5142e9073a52daa/source_subfolder/src/common/image.cpp(1853): assert ""IsOk()"" failed in GetWidth(): invalid image
/root/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/e419d9154337f54ac2c5cc53c5142e9073a52daa/source_subfolder/src/common/image.cpp(1860): assert ""IsOk()"" failed in GetHeight(): invalid image
/root/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/e419d9154337f54ac2c5cc53c5142e9073a52daa/source_subfolder/src/common/image.cpp(2112): assert ""IsOk()"" failed in GetAlpha(): invalid image
/root/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/e419d9154337f54ac2c5cc53c5142e9073a52daa/source_subfolder/src/common/image.cpp(2232): assert ""IsOk()"" failed in HasMask(): invalid image
/root/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/e419d9154337f54ac2c5cc53c5142e9073a52daa/source_subfolder/src/common/image.cpp(1986): assert ""IsOk()"" failed in GetData(): invalid image

(process:273993): GdkPixbuf-CRITICAL **: 11:10:55.539: gdk_pixbuf_new_from_data: assertion 'data != NULL' failed

(process:273993): Gdk-CRITICAL **: 11:10:55.539: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed

(process:273993): Gdk-CRITICAL **: 11:10:55.539: IA__gdk_drawable_get_display: assertion 'GDK_IS_DRAWABLE (drawable)' failed

(process:273993): Gdk-CRITICAL **: 11:10:55.539: IA__gdk_cursor_new_from_pixbuf: assertion 'GDK_IS_DISPLAY (display)' failed

(process:273993): GLib-GObject-CRITICAL **: 11:10:55.539: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

I tried to search online and did some googling but couldn’t find any solution. Thanks for any help.
:slight_smile: :slight_smile:

When encountering a problem like that, it’s better to try and find out why it fails rather than ignoring it. The deb version from the Ubuntu / Debian repository should work (I use it on Xubuntu 20.04).

I don’t know the current state of the Snap version, but we have received multiple reports of problems with it.

I’d suggest that you do your best to remove all versions of Audacity, and clean / fix your computer as best you can, then reboot and start again.

I’d suggest using the command line rather than the Software Center as the terminal provides feedback about what is actually happening.
To install Audacity from the command line:

  1. Don’t forget to reboot - Normally you wouldn’t need to, but in this case it’s a very good idea.
  2. Launch a Terminal
  3. In the terminal window, enter:
sudo apt update
sudo apt upgrade
  1. If step 3 fails, make a note of all error messages and stop.
  2. If step 3 succeeds, continue with:
sudo apt install audacity
  1. Accept all default options and let the installation complete

Thank you for your reply. I will try all your troubleshooting steps and get back to you with the results. Thank you. :smiley: :smiley:

Re Snap package:

There are several issues (currently open) regarding audio devices in the Snap version of Audacity.
This is there “issues” page: Issues · diddlesnaps/audacity · GitHub

Bugs relating to audio devices:

I removed the snap and rebooted my system. After updating the packages I installed audacity, the normal, old, terminal way, and it is working. Awesome. Thanks for your help. :wink:

Super :smiley:
Thanks for the update. I’ll close this topic as “solved”.