26

I didn't use to have this problem but lately, while I have Google's Android emulator running, my system audio (not talking about the emulator's audio) sounds very distorted and metallic. Sometimes it will work fine for a minute and then start to sound messed up again. As soon as I shut down the emulator, everything sounds fine. I'm having this problem whether I use speakers or headphones. I'm on Ubuntu 18.04 with the latest version of Android Studio.

Does anybody have any clue as to a fix or workaround?

Edit: As a workaround I'm starting the emulator from the terminal with

emulator -noaudio -avd my_avd

This seems to fix the sound issues but is obviously not an ideal solution.

1
  • 1
    I'm having a similar problem, but I am not sure what exactly is causing it. I started having this issue a few months ago on 16.04 HWE as well. I think it may be a bug in pulseaudio or alsa dealing with the pulseaudio integration. If nothing is playing when I start a VM (or some certain other apps), everything stays fine usually. If I have audio playing and start or stop the VM at the same time, audio becomes distorted, but is corrected usually when opening pavucontrol or system settings audio panel, or sometimes I will need to switching between digital/analog output.
    – dobey
    Jun 9, 2018 at 12:28

2 Answers 2

35

I did what was written on this link and it solved the problem for me.

In /etc/pulse/default.pa change load-module module-udev-detect to load-module module-udev-detect tsched=0

and in /etc/pulse/daemon.conf change ; default-sample-rate = 44100 to default-sample-rate = 48000

Finally, restart pulseaudio with pulseaudio -k (or you simply restart the computer)

13
  • 1
    Thank you! Solved it for me on 18.04. Had to also reboot after pulseaudio -k before my music player started working again.
    – Pete Doyle
    Nov 25, 2018 at 3:03
  • Thanks, solved the problem for me on 18.10.
    – vocasle
    Dec 27, 2018 at 6:25
  • Thanks fixed it for me on Ubuntu 19.04
    – bibble235
    Jun 5, 2019 at 2:43
  • Fixed it for me, running Manjaro KDE with 5.4 kernel Apr 11, 2020 at 17:11
  • Thanks, fixed the issue for me on Arch Linux running Gnome
    – Wingsuit
    Jul 23, 2020 at 8:32
1

it partially worked for me. I use a 25 inch monitor next to the notebook with my speakers connected to the monitor and with ubuntu 22.04.

When running both commands, I was no longer able to manually configure the speakers in the OS configuration menu and the sound only worked on the notebook (I didn't want that).

I deleted the second command (default-sample-rate = 48000) and kept the first one (load-module module-udev-detect tsched=0). After resetting pulseaudio it worked fine.

Detail: By default in the pulseaudio configuration of my PC, there was no 'default-sample-rate', not even in the old amount quoted in the post (default-sample-rate = 44100)

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.