Contents
- Introduction
- Background
- Fixing
- Reverting changes
- Final Notes
[Introduction]
I have seen a couple people with this problem. If one unplugs their headphones and re-inserts them afterwards, the audio is muted and cannot be unmuted. I went through this problem on this thread. This tutorial aims to solve this problem by installing an alternate version of PulseAudio with fixed jack detection.
[Background]
PulseAudio, or simply "Pulse", is the default sound server on Ubuntu. A sound server is a service that runs in the background and helps deliver and manipulate audio. The reason this problem occurs is because the headphones "mode" that Pulse has is broken. It won't unmute. So when you plug in your headphones, and Pulse switches to that mode, it won't produce audio. In the next section we'll get to (hopefully) the solution.
[Fixing]
The easiest way to fix this is by installing the fixed PulseAudio sound server. First I'll give a short version for experienced users with a list of commands, then I'll give a step-by-step version for newer users with more details.
Short Version
Enter these commands in a terminal. Ensure you have no programs open to prevent data loss. Use the first command
Code:
sudo add-apt-repository ppa:diwic/jack-detection
sudo apt-get update && sudo apt-get upgrade
sudo reboot
cp -r ~/.pulse/presets ~/Desktop
rm -rf ~/.pulse
sudo reboot
cp -r ~/Desktop/presets ~/.pulse
If this is hard to understand, give the long version a shot.
Long version
Step 1: Open a terminal
Open a terminal emulator with this key combo: CTRL+ALT+T. Alternatively, depending on your desktop environment, you can either click on the application menu, go to accessories and click on "Terminal", or press the "Super" (Windows key or Command) key and type "Terminal."
Step 2: Add PPA and install new Pulse
For this next step you must add a PPA, or Personal Package Archive. A PPA is a repository hosted on the Internet that contains packages. Type this command in the terminal to add this PPA:
Code:
sudo add-apt-repository ppa:diwic/jack-detection
Now we must update the package lists and "upgrade" to the new PulseAudio. As a side-effect it also upgrades any other packages that need it, so be aware!
Code:
sudo apt-get update && sudo apt-get upgrade
Now you must reboot. Make sure you aren't working on anything, as we'll be rebooting several times during this process.
Step 3: Reconfigure PulseAudio
You may notice that the audio isn't working. The reason for this is Pulse hasn't been configured to work with the new version you've just installed. To rectify this problem, enter these commands.
If you've installed pulseaudio-equalizer and have set custom presets, you should back them up if you want to keep them:
Code:
cp -r ~/.pulse/presets ~/Desktop
This copies the presets folder to your desktop for safe-keeping. Now we have to delete PulseAudio's configuration so it can generate a new one:
Now restart the computer. You can do this from the terminal with: sudo reboot
The audio should be working and hopefully the jack detection works. To get your presets back:
Code:
cp -r ~/.pulse/presets ~/Desktop
And you can do what you want with the copy on your desktop. I hope that this fixed your problem! If it didn't, we can undo the changes in the next section.
[Reverting Changes]
You can undo the changes you made and be back to normal by entering these commands in the terminal, as always, make sure you're not working on anything:
Code:
cp -r ~/.pulse/presets ~/Desktop
sudo apt-get install ppa-purge
sudo ppa-purge ppa:diwic/jack-detection
sudo reboot
rmdir ~/.pulse
sudo reboot
cp -r ~/Desktop/presets ~/.pulse
[Final Notes]
So there's my guide! If it worked, I'm glad I could help. If it didn't, I hope the reversal guide did. Feel free to contribute to this tutorial. Leave suggestions, improvements, and ask for help if you need to. Thanks for reading!
Bookmarks