PyAudio Killed My Headphone Jack?

New to Debian (Or Linux in general)? Ask your questions here!

PyAudio Killed My Headphone Jack?

Postby cableties » 2019-10-19 04:05

The following are notes about an issue I solved. I present them here because the issue and solution are both interesting.

Code: Select all
# On a Asus Q325 (2017 laptop)
# Headphones stopped playing sound.
# Main speakers still work.
# Headphones click quietly at 5 hz with a spring/discharging sound every 12s.
# Clicking occurs regardless of audio levels
# Only exception to this is that muting or unmuting sound causes the spring/discharging sound to occur in 4/10 cases
# Keeping sound muted does not prevent clicks and discharge sounds.
# Windows (on the same hardware, dual booting) has no issues with audio (on either main speakers or through the headphone jack), so this rules out a hardware issue.
# This never happened between 8/15/17 and 10/17/19 and always happens after 10/18/19
# Did install audio related packages immediately before issue started, so this is a huge coincidence

# 10/17/19
# Packages installed before issue started
sudo aptitude install pocketsphinx
python3 -m pip install --upgrade pip setuptools wheel
sudo aptitude install swig3.0
sudo aptitude install swig-sphinxbase
sudo pip3 install --upgrade pocketsphinx
sudo pip3 install SpeechRecognition
sudo pip3 install pyaudiotools
sudo aptitude install portaudio19-dev # note, required libjack-jackd2-dev to be installed
sudo pip3 install pyaudiotools
sudo pip3 install PyAudio

# 10/18/19
# Noticed after reboot that headphone jack stopped working

# Thought it might be related to audio tools I installed
sudo aptitude remove portaudio19-dev

# Tried resetting alsa and pulseaudio
sudo pulseaudio -k
sudo alsactl restore

# Tried rebooting, but no success

#Thought issue may be related to libjack and pulseaudio conflicting, so I wanted to try removing
sudo aptitude remove libjack-jackd2-0
# said that gstreamer depends on it. Nevermind.

# Decided to get rid of wine32:i386 because a lot of i386 applications depend on it, and I'm not using any of them.
sudo aptitude remove wine32:i386
sudo aptitude remove zlib1g:i386
sudo aptitude purge libc6:i386
sudo aptitude purge libgl1-mesa-dri:i386
sudo aptitude purge libglu1-mesa:i386
sudo aptitude purge libgssapi-krb5-2:i386
sudo aptitude purge libogg0:i386
sudo aptitude purge libpulse0:i386
sudo aptitude purge libsasl2-modules:i386
sudo aptitude purge libsensors4:i386
sudo aptitude purge libssl1.1:i386
sudo aptitude purge libvdpau-va-gl1:i386
sudo aptitude purge libvdpau1:i386
sudo aptitude purge libwrap0:i386
sudo aptitude purge libxau6:i386

# I no longer have any i386 packages, not that i thought this would work, but it's nice to have that cleaned up and this issue is a good excuse.
# Tried rebooting
# Headphone jack sound worked!
# What?

My approach to solving this issue was "try anything and everything till the issue is fixed," which never solves anything. But in this specific case that approach did work, I just don't understand why, which is the problem with it. So I come to you with a question. What did I actually do that solved my headphone issues?
User avatar
Posts: 22
Joined: 2012-02-06 08:02
Location: Tucson, AZ

Re: PyAudio Killed My Headphone Jack?

Postby Head_on_a_Stick » 2019-10-19 08:57

I blame pip.

Which version of Debian is this?
User avatar
Posts: 12140
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: PyAudio Killed My Headphone Jack?

Postby cableties » 2019-10-21 05:48

Head_on_a_Stick wrote:I blame pip.

Which version of Debian is this?

This is Debian 9.11. And actually the issue has come back, so I will uninstall my Pip modules to see what the effect is.
User avatar
Posts: 22
Joined: 2012-02-06 08:02
Location: Tucson, AZ

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 10 guests