Maniphest T72920

Blender installed via snap blocks sound
Closed, Resolved

Assigned To
Brecht Van Lommel (brecht)
Authored By
Karl Werf (bwerf)
Jan 5 2020, 8:49 PM
Tags
  • BF Blender
  • Platform: Linux
  • Audio
Subscribers
Ankit Meel (ankitm)
Brecht Van Lommel (brecht)
Carlos Torrealba (calrrox)
Davide Prati (edapx)
Karl Werf (bwerf)
Oleg Yegorov (OlegoroV)
Richard Antalik (ISS)

Description

System Information
Operating system: Tried on two different machines with Ubuntu 19.10 resp Kubuntu 19.10
Graphics card: VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07) resp Geforce 970

Blender Version
Broken: 2.81 downloaded via snap. Up to date as of this writing.
Worked: 2.81 and 2.81a downloaded via website.

Short description of error
When starting blender all sound break in ubuntu, the moment I close blender again the playback starts again.

Exact steps for others to reproduce the error
Install blender from snap (snap install blender --classic)
Open console and run journalctf -f (to easier see problem, not necessary for repro, I added my output as quotes below)
Start blender

jan 05 19:38:20 <computer_name> blender_blender.desktop[2690]: /run/user/1000/snap.blender/gvfs/ non-existent directory
jan 05 19:38:20 <computer_name> blender_blender.desktop[2690]: Read prefs: /home/<username>/.config/blender/2.81/config/userpref.blend
jan 05 19:38:20 <computer_name> blender_blender.desktop[2690]: ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
jan 05 19:38:20 <computer_name> blender_blender.desktop[2690]: AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': Device or resource busy
jan 05 19:38:21 <computer_name> blender_blender.desktop[2690]: found bundled python: /snap/blender/34/2.81/python

Open settings in gnome and try playing a sound (settings->Sound->output->test)

jan 05 19:36:29 <computer_name> pulseaudio[2362]: E: [alsa-sink-ALC269VC Analog] alsa-sink.c: Error opening PCM device front:0: Device or resource busy
jan 05 19:36:29 <computer_name> pulseaudio[2362]: W: [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended.
jan 05 19:36:29 <computer_name> pulseaudio[2362]: E: [alsa-sink-ALC269VC Analog] alsa-sink.c: Error opening PCM device front:0: Device or resource busy
jan 05 19:36:29 <computer_name> pulseaudio[2362]: W: [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended.
jan 05 19:36:29 <computer_name> pulseaudio[2362]: E: [alsa-sink-ALC269VC Analog] alsa-sink.c: Error opening PCM device front:0: Device or resource busy
jan 05 19:36:29 <computer_name> pulseaudio[2362]: W: [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended.
jan 05 19:36:29 <computer_name> gnome-control-c[11236]: Failed to play sound: Invalid state

Revisions and Commits

rB Blender

Event Timeline

Karl Werf (bwerf) created this task.Jan 5 2020, 8:49 PM
Karl Werf (bwerf) renamed this task from Blender snap blocks sound to Blender installed via snap blocks sound.Jan 5 2020, 9:07 PM
Karl Werf (bwerf) changed the subtype of this task from "Report" to "Bug".Jan 5 2020, 10:25 PM
Robert Guetzkow (rjg) added a project: Platform: Linux.Jan 5 2020, 10:36 PM
Karl Werf (bwerf) updated the task description.Jan 5 2020, 11:31 PM
Karl Werf (bwerf) updated the task description.Jan 5 2020, 11:40 PM
Richard Antalik (ISS) changed the subtype of this task from "Bug" to "Report".Jan 15 2020, 1:07 PM
Richard Antalik (ISS) added a subscriber: Richard Antalik (ISS).

Please don't assign subtype, this is up to developer to decide.

Also I assumed this was already triaged because of this.

Richard Antalik (ISS) added a project: Audio.Jan 15 2020, 1:08 PM
Carlos Torrealba (calrrox) added a subscriber: Carlos Torrealba (calrrox).Apr 19 2020, 10:50 PM
Brecht Van Lommel (brecht) merged a task: T76616: ALSA unable to open slave.May 10 2020, 3:47 PM
Brecht Van Lommel (brecht) added subscribers: Oleg Yegorov (OlegoroV), Ankit Meel (ankitm).
Brecht Van Lommel (brecht) added subscribers: Davide Prati (edapx), Brecht Van Lommel (brecht).
Brecht Van Lommel (brecht) added a comment.May 12 2020, 9:47 PM

Some background on the problem here:
https://github.com/ubuntu/snapcraft-desktop-helpers/commit/ddad10782637a1073142f904ba18e1473abe004a
https://forum.snapcraft.io/t/reusable-alsa-lib-part/3556
https://snapcraft-alsa.readthedocs.io/en/latest/index.html
https://snapcraft.io/docs/audio-playback-interface

Basically, only PulseAudio is available by default, and require some fiddling with environment variables to work.

ALSA and OSS are not available and trying to use them seems to block sound in other apps. There are some ways to make ALSA work by bundling our own build of the ALSA library, but that seems overly complicated. We now just rely on PulseAudio working for sound and explicitly disable ALSA and OSS.

Brecht Van Lommel (brecht) closed this task as Resolved by committing rB829dce524dbb: Fix T72920: Snap package fails to play audio and blocks audio in other apps.May 12 2020, 9:55 PM
Brecht Van Lommel (brecht) claimed this task.
Brecht Van Lommel (brecht) added a commit: rB829dce524dbb: Fix T72920: Snap package fails to play audio and blocks audio in other apps.
Davide Prati (edapx) added a comment.May 12 2020, 10:02 PM

Is the fix going into the next release? or will the snap package be patched?

Brecht Van Lommel (brecht) added a comment.EditedMay 12 2020, 11:26 PM

It will be fixed in the next release (2.83).