1

I have a laptop on Ubuntu 18.04 and when I want to do anything like play music on Firefox or even Discord, I hear absolutely no sound and it randomly freezes for more than 10 seconds on both apps. But audio works for the system and Ubuntu's video player.

Actually, the freezes aren't so annoying but the sound issue is really bothering.

When I run Pulse-Audio volume Control, it shows a windows on a white background saying:Establishing connection to PulseAudio. Please wait... But in reality it does nothing. And Ubuntu's audio options doesn't show any sound device!

When I try to play a .ogg file, it doesn't play and the console displays two warnings:

Media resource [...] could not be decoded. [...]
Media resource [...] could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_MEDIASINK_ERR (0x806e000b)
Details: OnMediaSinkAudioError

And when I open Ubuntu's logs, I get some similar errors everywhere:

[pulseaudio] pid.c: Daemon already running.
[pulseaudio] main.c: User-configured server at {...}unix:/run/user/1000/pulse/native, which appears to be local. Probing deeper.
[Child 11097, MediaDecoderStateMachine #1] WARNING: Decoder=7f31e8ef8400 Decode error: NS_ERROR_DOM_MEDIA_MEDIASINK_ERR (0x806e000b) - OnMediaSinkAudioError: file /build/firefox-clezVp/firefox-70.0.1+build1/dom/media/MediaDecoderStateMachine.cpp, line 3305
[Child 11097, MediaDecoderStateMachine #1] WARNING: Decoder=7f31e8ef8400 [OnMediaSinkAudioError]: file /build/firefox-clezVp/firefox-70.0.1+build1/dom/media/MediaDecoderStateMachine.cpp, line 3636
[Child 11097, MediaDecoderStateMachine #1] WARNING: 7f31e7fd8600 OpenCubeb() failed to init cubeb: file /build/firefox-clezVp/firefox-70.0.1+build1/dom/media/AudioStream.cpp, line 305
[Child 11097, MediaDecoderStateMachine #1] WARNING: 7f31e7fd8600 OpenCubeb() failed to init cubeb: file /build/firefox-clezVp/firefox-70.0.1+build1/dom/media/AudioStream.cpp, line 305

Looks like something's wrong with Firefox's media decoder script and Pulse-Audio daemon.

Here is what I tried:

  • Restarting Firefox (didn't worked)
  • Rebooting my computer (didn't worked)
  • Re-installing Firefox (worked but rebooting made it not working)

Also I don't want to re-install everytime I reboot (since it would be everyday)

Finally, I recently found which it affects also Discord, it means that Firefox may not be the culprit but Pulse-Audio's daemon. With Discord, it makes hundreds of errors in the logs:

AVC apparmor="DENIED" operation="open" profile="snap.gnome-system-monitor.gnome-system-monitor" name="/run/systemd/sessions/2" pid=5368 comm="gnome-system-mo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

I tried nothing yet for Discord.

It's strange because I already had sound working well good but there I've no sound at all, not even from a wrong device.

  • Go into settings > sound... what is the output > output device? – John Mee Nov 25 '19 at 20:59
1

If it really is a problem with Firefox only, the first thing to try would be to uninstall and reinstall it and try again. Maybe that will already fix it.

If not you might want to try to erase all temporary and profile data such as in /home/[your username]/.mozilla/firefox/. But CAUTION: This will erase your history and saved passwords as well. They will be GONE if you don't have a backup. So pleas BACKUP EVERYTHING in that folder before you erase and reinstall.

So, since this did not do the trick, lets analyse your error message:

AVC apparmor="DENIED" operation="open" profile="snap.gnome-system-monitor.gnome-system-monitor" name="/run/systemd/sessions/2" pid=5368 comm="gnome-system-mo" requested_mask="r" denied_mask="r" fsuid=1000 ouid=

AVC apparmor is the security framework telling you that it denied opening the snap (installer alternative to apt) profile for the gnome system monitor. I don't know about the other tags, but would guess that denied_mask="r" also tells you that a simple read ("r") was denied.

So the question is: does your gnome system monitor work? Was it turned on? Does reinstalling change something? Maybe use apt instead of snap?

I am sorry for not being able to provide a conclusive answer. Maybe you ask an expert on AVC apparmor. Otherwise this remote maintenance will continue in a trial and error fashion.

Hope that helps anyway ^^

| improve this answer | |
  • 1
    I re-installed Firefox, and it worked fine. However, all data were gone, for me it was okay but for other it may be an issue. If anyone wants to do same without loosing data, backup everything and it'll be okay. :) – Léolol DB Nov 27 '19 at 19:07
  • Nice. Happy to read that =D – ace28 Nov 28 '19 at 15:05
  • Finally, after a reboot, we got same thing, sound stopped working. – Léolol DB Nov 28 '19 at 21:47
  • I updated my answer. Hope that helps. (Please tell me if you got notified of the edit as well.) – ace28 Dec 4 '19 at 10:59
  • I think I don't understand because, the only thing I know being called Gnome System Monitor is an app that is also called Task Manager on Windows :) If it was right, it works, and that's all I know (^v^) – Léolol DB Dec 4 '19 at 19:59
0

Just give a Pulse Audio a fresh start

rm -r ~/.pulse ~/.pulse-cookie ~/.config/pulse

pulseaudio -k

It should back to normal or force the start pulseaudio --start

| improve this answer | |
  • It could have be good however my laptop is a bit stubborn so it doesn't work and I have that in output: ``` rm: cannot remove '/home/USER/.pulse': No such file or directory rm: cannot remove '/home/USER/.pulse-cookie': No such file or directory ``` – Léolol DB Dec 4 '19 at 19:49
  • rm -r ~/.config/pulse should work – JoKeR Dec 4 '19 at 22:46
0

I also noticed that Ubuntu wasn't able to switch on stand-by mode. So by attempting to go on stand-by and immediately login, it would switch to stand-by mode and rebooting reveals that everything works fine now!!!

By the way you can have the "user account" logged-in even on standby just by logging just after putting on stand-by. It will stand-by just after logging-in.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.