[SRU]Not able to adjust Audio input UI volume after connecting headset

Bug #1853584 reported by hugh chao on 2019-11-22
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Critical
Unassigned
Bionic
Critical
hugh chao
gnome-control-center
New
Unknown
gnome-control-center (Ubuntu)
Low
Unassigned
Bionic
Undecided
Unassigned

Bug Description

[ Impact ]

Not able to adjust Audio input UI volume if this device doesn't have a internal mic, the volume bar will be gray.

[ Test Case ]

1. Boot ubuntu without any external headset connected.
2. Launch gnome-control-center and switch to Sound->Input tab.
3. Connect external headset, then you will find the input show up but can not adjust the volume.

[ Regression potential ]

Low. change is the workaround to active/deactivate some bugs which didn't report things in the right order. It will just have extra active/deactiveate actions in normal situation(which the machines don't have this issue).

Verified on built-in and non built-in input device machines , no regression found yet.

Package in this PPA: https://launchpad.net/~hugh712/+archive/ubuntu/mysru/+packages

----

Summary:Not able to adjust Audio input UI volume, it's gray

Steps to reproduce:
1. Plug 3 ring earphone with mic to appropriate jack

Expected result:
System can be recording audio from external mic

Actual result:
Not able to adjust Audio input UI volume, it's gray, and no volume detected in UI, but I can recording the input audio by checkbox

Failure rate:100%

Note.
1. There is no internal mic, just a mic jack on the machine, this issue will happen
2. gnome-control-center version : 1:3.28.2-0ubuntu0.18.04.2

Note:20.04, 19.10, 19.04 are immune on the bug

hugh chao (hugh712) on 2019-11-22
tags: added: oem-priority
description: updated
description: updated
summary: - Not able to adjust Audio input UI volume after connecting headset in
- "input tab"
+ [18.04]Not able to adjust Audio input UI volume after connecting headset
+ in "input tab"

1. Still can reproduce this issue in 18.04.3
2. can not reproduce this issue in 19.04 and 19.10

hugh chao (hugh712) on 2019-11-22
summary: [18.04]Not able to adjust Audio input UI volume after connecting headset
- in "input tab"
Changed in gnome-control-center:
status: Unknown → New

Thank you for your bug report. Closing since it works in newer Ubuntu series, we can add a Bionic target if a SRU is needed. It would require to first identify the buggy component/patch to backport.
Can you change the settings using pavucontrol or does that has the same problem?

Changed in gnome-control-center (Ubuntu):
importance: Undecided → Low
status: New → Invalid
status: Invalid → Fix Released
hugh chao (hugh712) wrote :

pavucontrol works good, I will try to backport this package to bionic, thanks.

Sebastien Bacher (seb128) wrote :

What package? Bionic does include pavucontrol already no?

If the pulseaudio tools works fine so it might be a gnome-control-center issue

hugh chao (hugh712) wrote :

@Sebastien

Yes, What I meant was gnome-control-center

hugh chao (hugh712) wrote :

@Sebastien,

please take a look of this patch

Changed in gnome-control-center:
status: New → Fix Released
Sebastien Bacher (seb128) wrote :

Thank for the patch, is that backport from some upstream work/what they did in newer version? Could you give some more explanations about what the patch is doing and why?

hugh chao (hugh712) wrote :

@Sebastien,

No, it's not from upstream, due to the code is quite different from upstream.

If there is only one input device with only one input port, and this input port is active_port, e.g. there is no internal mic, just a mic jack on the machine, this issue will happen.

For this kind of machines, if users plug mic in the jack, the function active_input_update() is called ahead of the function add_input_ui_entry(), then we will see "No devices in the tree, so cannot set the active output" from syslog, this issue will be reproduced.

On other machines, the add_input_ui_entry() is called ahead of active_input_update(), then there is no problem.

So for this patch, just checking if there is only one input item in the treeview, call active_input_update(). And call gtk_widget_set_sensitive() to gray out the input volume bar if there isn't any input item in the treeview.

Sebastien Bacher (seb128) wrote :

Ccing Robert who is one of the gnome-control-center maintainer. Robert, could you look if the patch makes sense to you?

Robert Ancell (robert-ancell) wrote :

@hugh - can you do this as a merge request on https://gitlab.gnome.org/GNOME/gnome-control-center ? It will be much easier to review there.

First thing to note, this can be simplified:

if (gtk_tree_model_iter_n_children (model, NULL) == 1)
          active_input_update (dialog, input);

Robert Ancell (robert-ancell) wrote :

I'd also change the second part of the patch to be clearer, i.e.

if (gtk_tree_model_iter_n_children (model, NULL) == 0)
                gtk_widget_set_sensitive (dialog->input_bar, FALSE);

The first part of the patch is a workaround for a bug elsewhere which is reporting things in the wrong order. The second part is a fix for a case that wasn't being handled correctly. So both seem correct to me.

Robert Ancell (robert-ancell) wrote :

If you make a merge request upstream, please make these changes as two separate commits.

Robert Ancell (robert-ancell) wrote :

Yes, that is the correct branch.

Changed in gnome-control-center:
status: Fix Released → New
hugh chao (hugh712) wrote :

@Robert,

Is there any chance you can review this mp in #15? many thanks

hugh chao (hugh712) on 2019-12-17
tags: added: originate-from-1806835
tags: added: stella
hugh chao (hugh712) on 2019-12-17
description: updated
hugh chao (hugh712) on 2019-12-24
description: updated
hugh chao (hugh712) on 2019-12-24
description: updated
hugh chao (hugh712) on 2019-12-25
tags: added: bionic
hugh chao (hugh712) on 2019-12-25
description: updated
hugh chao (hugh712) wrote :
summary: - [18.04]Not able to adjust Audio input UI volume after connecting headset
+ [SRU]Not able to adjust Audio input UI volume after connecting headset
hugh chao (hugh712) on 2020-01-13
description: updated
hugh chao (hugh712) on 2020-01-13
description: updated
hugh chao (hugh712) on 2020-01-13
Changed in oem-priority:
importance: Undecided → Critical
status: New → Triaged
Łukasz Zemczak (sil2100) wrote :

The regression potential field does not provide enough information. I will accept it into -proposed, but could you please include some regression potential analysis in the description before we start looking into releasing it to updates? Thank you!

Changed in gnome-control-center (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic

Hello hugh, or anyone else affected,

Accepted gnome-control-center into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-control-center/1:3.28.2-0ubuntu0.18.04.6 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 and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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.

hugh chao (hugh712) on 2020-01-13
description: updated
hugh chao (hugh712) wrote :

tried gnome-control-center 1:3.28.2-0ubuntu0.18.04.6 in a built-in speaker/microphone laptop[0], still works well, didn't find any Regression potential.

[0] https://support.hp.com/ro-en/document/c05994943

hugh chao (hugh712) wrote :

tried gnome-control-center 1:3.28.2-0ubuntu0.18.04.6 in a hp desktop mini machine[0], can fix this issue

[0] http://h20195.www2.hp.com/v2/GetDocument.aspx?docname=c06339658

hugh chao (hugh712) wrote :

tried gnome-control-center 1:3.28.2-0ubuntu0.18.04.6 in a hp Small Form Factor PC[0], can fix this issue

[0] https://www8.hp.com/us/en/desktops/product-details/21353680

hugh chao (hugh712) wrote :

tried gnome-control-center 1:3.28.2-0ubuntu0.18.04.6 in a LG Thin Client[0], can fix this issue

[0] https://www.lg.com/global/business/monitor/monitor-products/lg-CK500W

hugh chao (hugh712) on 2020-01-14
tags: added: verification-done-bionic
removed: verification-needed-bionic
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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