17

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 '18 at 12:28
25

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 your simply restart computer)

7
  • 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 '18 at 3:03
  • Thanks, solved the problem for me on 18.10.
    – vocasle
    Dec 27 '18 at 6:25
  • Thanks fixed it for me on Ubuntu 19.04
    – bibble235
    Jun 5 '19 at 2:43
  • Fixed it for me, running Manjaro KDE with 5.4 kernel Apr 11 '20 at 17:11
  • Thanks, fixed the issue for me on Arch Linux running Gnome
    – Wingsuit
    Jul 23 '20 at 8:32
2

Enable the setting use libusb backend in Android Studio in Settings > Build, Execution, Deployment > Debugger > Android Debug Bridge

That solved the popping / clicking noises while also fixing Xruns in Jack if I had adb running in the background.

Now I can play guitar and code at the same time.

Found this answer here: Pulseaudio lags horribly only when Android Studio is running

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.