Results 1 to 4 of 4

Thread: HOW-TO: Fix PulseAudio jack detection

  1. #1
    Join Date
    Mar 2008
    Location
    Oregon, USA
    Beans
    165

    Post HOW-TO: Fix PulseAudio jack detection

    Contents
    1. Introduction
    2. Background
    3. Fixing
    4. Reverting changes
    5. 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:
    Code:
    rm -rf ~/.pulse
    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!
    Last edited by rectec794613; April 28th, 2012 at 10:21 PM.
    Ubuntu is my past, present, and future. Gonna help it take over the world, someday.
    System specs: CPU - AMD Phenom II X4 830 @ 3.2GHz | GPU - AMD Radeon HD 6670 | MB - MSI 760GM-P23 | RAM - 4GB DDR3 1366 MHz | OS - Arch, Windows 7

  2. #2
    Join Date
    Aug 2007
    Location
    Donostia - San Sebastián
    Beans
    2
    Distro
    Kubuntu 7.04 Feisty Fawn

    Re: HOW-TO: Fix PulseAudio jack detection

    This didn't work for me, but i found another solution on one of the bugs reported for this problem:

    https://bugs.launchpad.net/ubuntu/+s...o/+bug/1104565

    "2) Use the latest drivers https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS"

  3. #3
    Join Date
    Mar 2008
    Location
    Oregon, USA
    Beans
    165

    Re: HOW-TO: Fix PulseAudio jack detection

    Quote Originally Posted by aitortxo View Post
    This didn't work for me, but i found another solution on one of the bugs reported for this problem:

    https://bugs.launchpad.net/ubuntu/+s...o/+bug/1104565

    "2) Use the latest drivers https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS"
    Hey aitortxo. This guide is a bit outdated. I've already discussed this with the owner of the PPA, David Henningsson, (an Ubuntu audio developer who works for Canonical) when I was notified that it hadn't been updated for Quantal. He said this problem was fixed starting with Precise. But if you still get the problem, he said you can
    just edit /etc/pulse/default.pa and comment out the row that says "load-module module-switch-on-port-available".
    I'm not sure how well this workaround works, as I don't use the laptop that gave me this jack detection problem anymore. Sorry if I can't help you more.
    Ubuntu is my past, present, and future. Gonna help it take over the world, someday.
    System specs: CPU - AMD Phenom II X4 830 @ 3.2GHz | GPU - AMD Radeon HD 6670 | MB - MSI 760GM-P23 | RAM - 4GB DDR3 1366 MHz | OS - Arch, Windows 7

  4. #4
    Join Date
    Mar 2008
    Location
    Oregon, USA
    Beans
    165

    Re: HOW-TO: Fix PulseAudio jack detection

    P.S. If there are enough people with this problem still, I think that would warrant a guide on the community wiki.
    Ubuntu is my past, present, and future. Gonna help it take over the world, someday.
    System specs: CPU - AMD Phenom II X4 830 @ 3.2GHz | GPU - AMD Radeon HD 6670 | MB - MSI 760GM-P23 | RAM - 4GB DDR3 1366 MHz | OS - Arch, Windows 7

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •