System audio problems while Android emulator is running

20,547

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)

Share:
20,547

Related videos on Youtube

Max
Author by

Max

Updated on September 18, 2022

Comments

  • Max
    Max over 1 year

    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.

    • dobey
      dobey almost 6 years
      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.
  • Pete Doyle
    Pete Doyle over 5 years
    Thank you! Solved it for me on 18.04. Had to also reboot after pulseaudio -k before my music player started working again.
  • vocasle
    vocasle over 5 years
    Thanks, solved the problem for me on 18.10.
  • bibble235
    bibble235 almost 5 years
    Thanks fixed it for me on Ubuntu 19.04
  • Khongor Bayarsaikhan
    Khongor Bayarsaikhan about 4 years
    Fixed it for me, running Manjaro KDE with 5.4 kernel
  • Wingsuit
    Wingsuit almost 4 years
    Thanks, fixed the issue for me on Arch Linux running Gnome
  • mdryden
    mdryden over 3 years
    Fixed for me on pop os 20.04 as well.
  • basudev nayak
    basudev nayak over 3 years
    Thank you very much this solved my problem on ubuntu 20.04.1 LTS
  • Gabi Moreno
    Gabi Moreno over 2 years
    Amazing! It worked also on my Kubuntu with Ubuntu 20.04 3 LTS. I had to restart the computer as well. Thanks!
  • sam
    sam over 2 years
    i solved my problem on ARCH Linux by this
  • basudev nayak
    basudev nayak over 2 years
    Thank you so much Eduardo ... This fixed the problem :) I hope you have a great year ahead.
  • Outofdate
    Outofdate about 2 years
    Well, Eduardo, saved my sounds. Thanks!