After unplug headphones and plug them again no sound can be heard

Bug #1876065 reported by Roman Konieczny
172
This bug affects 38 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
High
Kai-Heng Feng
Focal
Fix Released
High
Kai-Heng Feng
Groovy
Fix Released
High
Kai-Heng Feng

Bug Description

* Impact
Sound isn't automatically redirected to headphones when those are connected to a jack interface

* Test case
Disconnect the headsets
Start your webbrowser/music player/video player and play some sound
Connect the headsets to the jack interface

-> the sound should be directly redirected to the plugged headsets

* Regression potential
Check that audio routing when connecting/disconnecting devices to the hack entry is working correctly

----

After startup with headset plugged in they play sound nicely - no issue. When they are unplugged, the sound is switched to the speaker (laptop) - all good. However, when I plug the headset back there is no sound. I see the app on pavucontrol, the volume is fine - everything looks fine except there is no sound. I dumped output of "pactl list" command on startup (headset plugged), after unplugging the headset, and when it is plugged back. From the comparison of these outputs, it looks like the source has got muted after the headset is plugged.

Source #1
 State: RUNNING
 Name: alsa_input.pci-0000_00_1f.3.analog-stereo
 Description: Built-in Audio Analog Stereo
 Driver: module-alsa-card.c
 Sample Specification: s16le 2ch 44100Hz
 Channel Map: front-left,front-right
 Owner Module: 7
 Mute: yes

Attached three outputs:
headset-in.txt - after startup with headset plugged - all fine.
headset-out.txt - after unplugged headset - sound through the speaker - all fine.
headset-back.txt - after plugged headset back - no sound.

Any help greatly appreciated.

Regards,
Roman

Revision history for this message
Roman Konieczny (kromek-gmail) wrote :
Revision history for this message
Roman Konieczny (kromek-gmail) wrote :

Forgot to add my system details:

Dell Lattitude E5570.

Sound card:
  product: 100 Series/C230 Series Chipset Family HD Audio Controller
  vendor: Intel Corporation

System: Ubuntu Budgie 20.04 with pulseaudio version 13.99.1.

Linux 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

tags: added: focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
Hui Wang (hui.wang) wrote :

Looks like the fix of this bug (https://bugs.launchpad.net/oem-priority/+bug/1869819) introduced this regression.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
Anuhbav Mishra (kingkabali) wrote : Re: [Bug 1876065] Re: After unplug headphones and plug them again no sound can be heard

Hi There!

Your PPA worked for me. Thanks a lot for this.

Regards,
Anubhav

On Fri, May 1, 2020 at 11:45 PM Kai-Heng Feng <email address hidden>
wrote:

> Please test PPA here:
> https://launchpad.net/~kaihengfeng/+archive/ubuntu/fix-lp1869819
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1875032).
> https://bugs.launchpad.net/bugs/1876065
>
> Title:
> After unplug headphones and plug them again no sound can be heard
>
> Status in pulseaudio package in Ubuntu:
> Confirmed
>
> Bug description:
> After startup with headset plugged in they play sound nicely - no
> issue. When they are unplugged, the sound is switched to the speaker
> (laptop) - all good. However, when I plug the headset back there is no
> sound. I see the app on pavucontrol, the volume is fine - everything
> looks fine except there is no sound. I dumped output of "pactl list"
> command on startup (headset plugged), after unplugging the headset,
> and when it is plugged back. From the comparison of these outputs, it
> looks like the source has got muted after the headset is plugged.
>
> Source #1
> State: RUNNING
> Name: alsa_input.pci-0000_00_1f.3.analog-stereo
> Description: Built-in Audio Analog Stereo
> Driver: module-alsa-card.c
> Sample Specification: s16le 2ch 44100Hz
> Channel Map: front-left,front-right
> Owner Module: 7
> Mute: yes
>
> Attached three outputs:
> headset-in.txt - after startup with headset plugged - all fine.
> headset-out.txt - after unplugged headset - sound through the speaker -
> all fine.
> headset-back.txt - after plugged headset back - no sound.
>
> Any help greatly appreciated.
>
> Regards,
> Roman
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1876065/+subscriptions
>

Revision history for this message
黄闫 (prayerholmes) wrote :

@Kai-Heng Feng

Mine is okay,too. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1873384

A little suggestion: can you make a pop-up dialogue like ubuntu to choose headphone/headset/mic? It will makes a lot easier to use headphone/headset for KDE and Xfce4 users.

Thanks a lot. Now I can use my headset's mic.

Revision history for this message
Roman Konieczny (kromek-gmail) wrote :

Hi Kai-Heng,

Your repo works!
I didn't expect my problem will be addressed that fast.
Thanks a lot for a super quick response and fix - that is great!

Cheers,
Roman

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Kai-Heng, can you prepare a SRU for focal with your fix?

Changed in pulseaudio (Ubuntu):
importance: Undecided → High
assignee: nobody → Kai-Heng Feng (kaihengfeng)
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "pulseaudio_13.99.1-1ubuntu4.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It probably needs fixing in groovy first.

Changed in pulseaudio (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, I tweaked the diff to apply the change to the existing patch, no need to stack fixes when the issue comes from a previous change, and I've uploaded to groovy and focal

Changed in pulseaudio (Ubuntu):
status: In Progress → Fix Committed
description: updated
Mathew Hodson (mhodson)
tags: added: regression-release
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Roman, or anyone else affected,

Accepted pulseaudio into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pulseaudio/1:13.99.1-1ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in pulseaudio (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Roman Konieczny (kromek-gmail) wrote :

Hi,

I tested the package contained in the proposed repo (v13.99.1).
I plugged and unplugged the jack several times. It worked well. Worked fine also after reboot.

I am now again a happy user of my headset :D

Thanks,
Roman

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for testing, marking as verified!

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Mathew Hodson (mhodson)
Changed in pulseaudio (Ubuntu Focal):
importance: Undecided → High
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

FYI, the upload to focal-proposed was superseded by https://usn.ubuntu.com/4355-1/. Please rebase your changes on that and reupload.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Rather than superseding 1:13.99.1-1ubuntu4 in groovy-proposed, I instead based the changes in 1:13.99.1-1ubuntu5 on top of 1:13.99.1-1ubuntu4 to address the CVE that was fixed in https://usn.ubuntu.com/4355-1/.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes the proposed update 1:13.99.1-1ubuntu3.1 got lost and overwritten by update 1:13.99.1-1ubuntu3.2

Sorry about that. Please repropose it as 1:13.99.1-1ubuntu3.3

tags: added: verification-failed-focal verification-needed
removed: verification-done verification-done-focal
tags: added: regression-update verification-failed
removed: verification-needed
Revision history for this message
Rajasekharan N (rajasekharan) wrote :

I think the regression made my audio/internal speakers as Dummy Output. See bug #1878327.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Actually it's not a regression for anyone who wasn't already testing proposed.

tags: removed: regression-update
Changed in pulseaudio (Ubuntu Focal):
status: Fix Committed → Triaged
status: Triaged → In Progress
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Daniel, please review this debdiff, thanks!

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Rajasekharan N (rajasekharan) wrote :

@Daniel van Vugt (vanvugt)

Pardon my ignorance. I am a novice.

I am trying to install it from the git for the past one day as per the guidance here: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/PulseAudioFromGit/

However, I am unsuccessful. I couldn't install it. Else, I could have got back with the result for bug 1878327.

Currently, I am waiting for it to move to Pre-released updates to test it or for the release of a patch by Kai-Heng Feng (kaihengfeng).

If you (or anyone here) can give me a hint on how to install it from git, I will be more than happy to be a part of your team and to come back here and tell you the outcome with my machine.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Git is only for developers. Please wait for the official update.

Revision history for this message
Rajasekharan N (rajasekharan) wrote :

@Daniel van Vugt (vanvugt)

A personal computer, laptop or desktop, at home is the most wanted thing in the lockdown in this corona season to work from home. A puter without audio is next to good for nothing.

Since updating mine to 20.04 LTS on April 24, I have been running wall to post. Facing a lot of hardship to keep things straight without the audio working.

If you could tell us the probable date of official update or pre-released update, it will be a ray of hope, a light at the end of the tunnel.

Revision history for this message
Luis Alberto Pabón (copong) wrote :

You can manually select the output to use from gnome-settings until the fix lands.

Revision history for this message
Rajasekharan N (rajasekharan) wrote :

@Luis Alberto Pabón (copong)

It is shown as "Dummy Output" there also.

Hitting 'Software Updater' every now and then, with the eyes wide open, to see if any Pre-Released Update has reached, particularly anything in connection with the PulseAudio!

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

I pushed a new package to the PPA, please use it for now:
https://launchpad.net/~kaihengfeng/+archive/ubuntu/fix-lp1869819

Revision history for this message
Rajasekharan N (rajasekharan) wrote :

@Kai-Heng Feng (kaihengfeng)

Added the PPA, updated, and rebooted the system.

Still showing as "Dummy Output.'

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Sorry, I re-uploaded a new one with version is greater than the current one. Please test that instead.

Revision history for this message
Rajasekharan N (rajasekharan) wrote :

I'm able to get only this version: pulseaudio 1:13.99.1-1ubuntu3.2.

The following are seen as pending:

i386 build of pulseaudio 1:13.99.1-1ubuntu3.2lp1869819 in ubuntu focal RELEASE
Pending (2510)
amd64 build of pulseaudio 1:13.99.1-1ubuntu3.2lp1869819 in ubuntu focal RELEASE
Pending (2510)

Pardon me if I am going wrong somewhere.

Revision history for this message
Rajasekharan N (rajasekharan) wrote :

PPA statistics

Activity

3 updates added during the past month.

Currently 0 packages building and 1 package waiting to build.

Revision history for this message
Rajasekharan N (rajasekharan) wrote :

@Kai-Heng Feng (kaihengfeng)

Downloaded the patch and updated the PulseAudio.

The internal speakers, both the headphone jacks and the internal mic, all are working fine now. (Didn't test the external mic jack.)

Thanks a gazillion.

I can return the borrowed laptop to my neighbor and start working with mine.

You are a god-sent angel to save me from trouble. May God bless you.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Roman, or anyone else affected,

Accepted pulseaudio into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pulseaudio/1:13.99.1-1ubuntu3.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in pulseaudio (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
removed: verification-failed verification-failed-focal
Revision history for this message
Rajasekharan N (rajasekharan) wrote :

I am an affected soul. See bug 1876238 and bug 1878327 which were marked as duplicate.

I had earlier tested the patch from Kai-Heng Feng's (kaihengfeng) PPA, and it was working fine.

I had enabled to receive Pre-released updates. I downloaded the proposed update (1:13.99.1-1ubuntu3.3), applied it, and tested the update.

The internal speakers, both the headphone jacks and the internal mic, all are working fine now.

Unplugged the headphones and plugged them again and again. Sound can be heard.

Sound is getting automatically redirected to the headphones when connected to jack interfaces and back to the internal speakers when headphones are unplugged.

Tested/tried multiple times and is working fine every time.

Thank you.

Revision history for this message
Andycds (andycds) wrote :

After I enabled "Proposed" and update pulseaudio, the problems seems to be fixed.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Thanks for verification.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Vasilis (vasilis-vlachoudis) wrote :

There still one problem.

When I plug in the headphones (with 3 pins no-mic or 4 pins with mic) it switches the Input to "Microphone (plugged-in)" and strangely enough there is no sound at all on the headphones.

If I change the microphone setting to anything "Internal Microphone (plugged in)" or the "Headset Microphone (plugged-in)" I get sound on the headphones

Revision history for this message
Sam Weston (cablespaghetti) wrote :

This seems to have fixed the issue on my Dell XPS 15 9560. Thanks! However if I leave my headphones plugged in, the speakers are selected after a reboot, but that's a separate issue...

Changed in pulseaudio (Ubuntu Focal):
assignee: nobody → Kai-Heng Feng (kaihengfeng)
Revision history for this message
Chris Halse Rogers (raof) wrote :

The focal SRU appears to have FTBFS on RISCV, while previous versions built fine there. Is someone looking at the build failure?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

The error:
tests/volume-test.c:151:F:volume:volume_test:0: Assertion 'md <= 1' failed

Where can I found riscv qemu image?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

You might just need to disable -ffast-math. It's unclear if this is an old issue or a new one so please use this new bug https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/908

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Chris, the current security update that is currently in focal-updates is missing the risv64 build so that isn't a regression compared to the current situation, could that update be unblocked and we will look at fixing the test issues in the next upload

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:13.99.1-1ubuntu6

---------------
pulseaudio (1:13.99.1-1ubuntu6) groovy; urgency=medium

  * debian/patches/git_config_upgrade.patch:
     -stream-restore: Forget pre-14.0 stream routing, old configurations are
      incompatible and create routing issues where e.g the speaker despite
      having headset selected (lp: #1866194)
  * debian/rules:
    - enable --enable-stream-restore-clear-old-devices
  * debian/rules:
    - don't let tests fail build on riscv

 -- Sebastien Bacher <email address hidden> Wed, 03 Jun 2020 17:28:51 +0200

Changed in pulseaudio (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:13.99.1-1ubuntu3.3

---------------
pulseaudio (1:13.99.1-1ubuntu3.3) focal; urgency=medium

  * debian/patches/gitlab_jack_identifier.patch:
    - fix a regression introduced by the change which was leading to
      headphones not being activated when connected (LP: #1876065)

 -- Kai-Heng Feng <email address hidden> Thu, 14 May 2020 11:50:47 +0800

Changed in pulseaudio (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for pulseaudio has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.