[SRU]There is no available audio entry in sound settings after execute suspend in 'Performance mode'

Bug #1887610 reported by Hui Wang on 2020-07-15
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HWE Next
Undecided
Unassigned
OEM Priority Project
Critical
Shengyao Xue
pulseaudio (Ubuntu)
Status tracked in Groovy
Bionic
High
Hui Wang
Eoan
Undecided
Unassigned
Focal
Undecided
Unassigned
Groovy
Critical
Hui Wang

Bug Description

[Impact]
On some I+N machines (inlcuding lenovo and dell machines), after
setting the graphic mode to perofermance mode, and open the gnome
sound seting, run suspend/resume test, the audio devices will
disappear from UI, instead a dummy audio shows on the UI, and from
then on, the audio can't work anymore.

[Fix]
The root cause is after resuming, the pulseaudio try to recover the
PCM device, but at that moment, the devices nodes at /dev/snd/ are
not accessible yet sometimes, it will make snd_pcm_open fail and
the pulseaudio will calll unload_module to unload alsa audio card.
I cherrpicked a fix from upstream, the fix adds retry and pa_msleep(),
this will retry the snd_pcm_open() a couple of times if it fails.

[Test Case]
Install the pulseaudio wit this fix, set the graphic mode to
performance mode, open the sound setting, then run suspend/resume 90
times, after test check the audio devices on the UI, the speaker,
digital mic are still on the UI, and they could work well.

[Regression Risk]
Low, this SRU just add retry and pa_msleep(), if the snd_pcm_open()
doesn't fail, this patch will not introduce any change, if snd_pcm_open()
fails, it just retry a couple of times, so it will not introduce the
regression in theory.

Hui Wang (hui.wang) on 2020-07-15
Changed in pulseaudio (Ubuntu):
importance: Undecided → Critical
summary: - No audio entry in sound settings after suspend and resume [Performance
- mode]
+ There is no available audio entry in sound settings after execute
+ suspend in 'Performance mode'
tags: added: oem-priority originate-from-1883046 sutton

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

Changed in pulseaudio (Ubuntu Bionic):
status: New → Confirmed
Changed in pulseaudio (Ubuntu Eoan):
status: New → Confirmed
Changed in pulseaudio (Ubuntu Focal):
status: New → Confirmed
Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Hui Wang (hui.wang) wrote :

@sponsor-team,

This is the debdiff for focal. And let's SRU this fix to groovy and focal first, because our oem project is waiting for the fix to be landed to focal.

And since groovy is not released yet, I don't provide the debdiff for groovy, and I already pushed the fix to git repo (groovy branch, focal branch, eoan branch and bionic branch).

Hui Wang (hui.wang) on 2020-07-15
description: updated
summary: - There is no available audio entry in sound settings after execute
+ [SRU]There is no available audio entry in sound settings after execute
suspend in 'Performance mode'
Hui Wang (hui.wang) on 2020-07-16
tags: added: originate-from-1867844
tags: removed: originate-from-1867844
Sebastien Bacher (seb128) wrote :

Upload to G and F, do you want to target B as well there?

Changed in pulseaudio (Ubuntu Groovy):
status: Confirmed → Fix Committed
Changed in pulseaudio (Ubuntu Eoan):
status: Confirmed → Won't Fix
Changed in pulseaudio (Ubuntu Focal):
status: Confirmed → Fix Committed
Hui Wang (hui.wang) wrote :

Yes, please upload to B as well. thx.

Rex Tsai (chihchun) on 2020-07-16
Changed in oem-priority:
importance: Undecided → Critical
assignee: nobody → Shengyao Xue (xueshengyao)

Hello Hui, 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.5 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.

tags: added: verification-needed verification-needed-focal
Changed in oem-priority:
status: New → In Progress
Jpodjarny (jpodjarny) wrote :

I lost my sound after update:
orge2@jorge-Mate-20-4:~$ pactl --version
pactl 13.99.1
Compilado con libpulse 13.99.0
Linked con libpulse 13.99.0
jorge2@jorge-Mate-20-4:~$ pactl list short sinks
0 auto_null module-null-sink.c s16le 2ch 44100Hz SUSPENDED
jorge2@jorge-Mate-20-4:~$ lspci | grep Audio
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)

jorge2@jorge-Mate-20-4:~$ pacmd dump
### Configuration dump generated at Fri Jul 17 14:53:48 2020

### Configuration dump generated at Fri Jul 17 15:24:44 2020

load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore
load-module module-augment-properties
load-module module-switch-on-port-available
load-module module-switch-on-connect
load-module module-udev-detect
load-module module-alsa-card device_id="0" name="pci-0000_00_1b.0" card_name="alsa_card.pci-0000_00_1b.0" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"
load-module module-native-protocol-unix
load-module module-default-device-restore
load-module module-always-sink
load-module module-null-sink sink_name=auto_null sink_properties='device.description="Salida Ficticia"'
load-module module-intended-roles
load-module module-suspend-on-idle
load-module module-console-kit
load-module module-systemd-login
load-module module-position-event-sounds
load-module module-role-cork
load-module module-snap-policy
load-module module-filter-heuristics
load-module module-filter-apply
load-module module-x11-publish display=:0 xauthority=/home/jorge2/.Xauthority
load-module module-x11-cork-request display=:0 xauthority=/home/jorge2/.Xauthority
load-module module-x11-xsmp display=:0 xauthority=/home/jorge2/.Xauthority session_manager=local/jorge-Mate-20-4:@/tmp/.ICE-unix/1812,unix/jorge-Mate-20-4:/tmp/.ICE-unix/1812
load-module module-cli-protocol-unix

set-sink-volume auto_null 0x101b3
set-sink-mute auto_null no
suspend-sink auto_null yes

set-source-volume auto_null.monitor 0x10000
set-source-mute auto_null.monitor no
suspend-source auto_null.monitor yes

set-card-profile alsa_card.pci-0000_00_1b.0 off

set-default-sink auto_null
set-default-source auto_null.monitor

### EOF
jorge2@jorge-Mate-20-4:~$

Hui Wang (hui.wang) wrote :

@Jpodjarny,

Could you please run pa-info > audio-log.txt, then upload the audio-log.txt?

Hui Wang (hui.wang) wrote :

@Jpodjarny,

And please also upload the dmesg. BTW, how did you update, only update the pulseaudio or upgrade many packages? And what is the pulseaudio version now (checking it by running dpkg -s pulseaudio | grep Version).

Launchpad Janitor (janitor) wrote :

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

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

  * d/p/0033-alsa-make-the-unsuspend-more-robust.patch:
    - resolve cases where there is no available audio entry in sound
      settings after suspending in 'Performance mode' (LP: #1887610)

 -- Hui Wang <email address hidden> Wed, 15 Jul 2020 15:29:05 +0800

Changed in pulseaudio (Ubuntu Groovy):
status: Fix Committed → Fix Released

All autopkgtests for the newly accepted pulseaudio (1:13.99.1-1ubuntu3.5) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

openjdk-8/8u252-b09-1ubuntu1 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#pulseaudio

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Jpodjarny (jpodjarny) wrote :
Jpodjarny (jpodjarny) wrote :

And please also upload the dmesg. BTW, how did you update, only update the pulseaudio or upgrade many packages? And what is the pulseaudio version now (checking it by running dpkg -s pulseaudio | grep Version).
jorge2@jorge-Mate-20-4:~$ dpkg -s pulseaudio | grep Version
Version: 1:13.99.1-1ubuntu3.2lp1869819
jorge2@jorge-Mate-20-4:~$
I update from http://ppa.launchpad.net/kaihengfeng/fix-lp1869819/ubuntu
I'm sorry, I don't understand what you mean by "upload the dmesg. BTW", I know the command dmesq, what do you want me to do?

Jpodjarny (jpodjarny) wrote :

dmesg>demsg.txt

Hui Wang (hui.wang) wrote :

I planned to let you run "dmesg > dmesg.txt", then upload it to launchpad, but now no need to upload the dmesg.

Your issue has nothing to do with this SRU, this SRU will update the pulseaudio to 1:13.99.1-1ubuntu3.5 while the version on your machine is ubuntu3.2lp1869819.

And According to the log in the #15, there is no any problem:
The output is null or dummy because all output device are unavailable at that moment:
Default Sink: auto_null
  analog-output-lineout: Línea de salida (priority: 9000, latency offset: 0 usec, not available)
   Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
  analog-output-headphones: Auriculares analógicos (priority: 9900, latency offset: 0 usec, not available)
   Properties:
    device.icon_name = "audio-headphones"
   Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo

After you plugging in the headphone or lineout, the output device will not be null or dummy.

For input device, it is usb input, there is no problem too.

So how do you expect the audio to work?

Jpodjarny (jpodjarny) wrote :

A pair of headphones was always plugged at the front.
Now I connected speakers in the connector line on the back, and it works effectively.
The front headphones also work with the speakers connected behind. Apparently it requires a connector put on the back.
Thank you very much for your contribution, it has solved my problem.
Greetings from Argentina.
This text was automatically translated by google

Changed in pulseaudio (Ubuntu Bionic):
assignee: nobody → Hui Wang (hui.wang)
status: Confirmed → In Progress
importance: Undecided → High
Shengyao Xue (xueshengyao) wrote :

I can reproduce this issue with the original pulseaudio on a ThinkPad P14s, and after I opened focal-proposed channel and updated the pulseaudio package, this issue was fixed.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Launchpad Janitor (janitor) wrote :

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

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

  * d/p/0033-alsa-make-the-unsuspend-more-robust.patch:
    - resolve cases where there is no available audio entry in sound
      settings after suspending in 'Performance mode' (LP: #1887610)

 -- Hui Wang <email address hidden> Wed, 15 Jul 2020 17:52:36 +0800

Changed in pulseaudio (Ubuntu Focal):
status: Fix Committed → Fix 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.

Changed in oem-priority:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers