[soundnua]mic volume adjust bar is gray if you open sound-nua input tab earlier than plugging micphone

Bug #1291862 reported by Bin Li on 2014-03-13
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Undecided
Unassigned
Precise
Undecided
Unassigned
Trusty
Undecided
Unassigned
gnome-control-center
Confirmed
Medium
gnome-control-center (Ubuntu)
Low
Unassigned
Precise
Low
Unassigned
unity-control-center (Ubuntu)
Low
Unassigned
Precise
Undecided
Unassigned

Bug Description

gnome-control-center 1:3.4.2-0ubuntu0.13.1 in precise updates.
In laptop you can't reproduce this issue, cause there have 'Internal Microphone' already.
I find this issue in my PC, there are two jacks in front panel, input and output.

I made an screen-shot for it.

[Impact]
* User can't adjust the volume when open the 'sound setting' first.
* User still could adjust volume when there are no devices.

[Test Case]
* Install system on a PC(don't have input/output devices)and log in to Desktop
* Connect the headphone in front panel
* Open sound settings menu and click Input tab, you will find you can't adjust the volume.
* Remove all input/output devices, you will find that you still could adjust volume.

[Regression Potential]
* Currently no potential regression.

[Other Info]
* It's an high priority issue in OEM project.

Related branches

Bin Li (binli) wrote :
Sebastien Bacher (seb128) wrote :

thank you for your bug report, can you change that setting if you use e.g pavucontrol instead?

Changed in gnome-control-center (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Bin Li (binli) wrote :

I can change the setting when plug micphone before start 'gnome-control-center sound-nua'.
And also I can change it from pavucontrol.

The sound-nua couldn't call the update function to update input_bar.

Changed in gnome-control-center (Ubuntu):
status: Incomplete → New
Bin Li (binli) wrote :

This patch fix two issue, it resolve this issue, but I'm an newer for gnome-control-center, so mightbe there are better fix for this issue.
After add the input device, I called 'active_input_update', the input_bar could be adjusted.
The second fix is when we plug out the device, the input_bar is still enabled, we need disable it, but the label on input_bar is still the 'Front Microphone'.

Index: gnome-control-center-3.4.2/panels/sound-nua/gvc-mixer-dialog.c
===================================================================
--- gnome-control-center-3.4.2.orig/panels/sound-nua/gvc-mixer-dialog.c 2014-03-13 16:16:03.291570375 +0800
+++ gnome-control-center-3.4.2/panels/sound-nua/gvc-mixer-dialog.c 2014-03-13 16:35:51.883553147 +0800
@@ -1382,6 +1382,7 @@
                return;
        }
        add_input_ui_entry (dialog, in);
+ active_input_update (dialog, in);
 }

 static void
@@ -1445,6 +1446,7 @@
         found = find_item_by_id (GTK_TREE_MODEL (model), id, ID_COLUMN, &iter);
         if (found) {
                 gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+ gtk_widget_set_sensitive (dialog->priv->input_bar, FALSE);
         }
 }

Sebastien Bacher (seb128) wrote :

Thanks for the patch/suggest

David, could you review that?

Changed in gnome-control-center (Ubuntu):
assignee: nobody → David Henningsson (diwic)
Bin Li (binli) wrote :

After talked with Huiwang, we updated the patch.

When the input device list is null ,we reset the original value for label.

Index: gnome-control-center-3.4.2/panels/sound-nua/gvc-mixer-dialog.c
--- gnome-control-center-3.4.2.orig/panels/sound-nua/gvc-mixer-dialog.c 2014-03-13 16:16:03.291570375 +0800
+++ gnome-control-center-3.4.2/panels/sound-nua/gvc-mixer-dialog.c 2014-03-13 18:29:23.125618264 +0800
@@ -721,6 +721,10 @@
         model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->priv->input_treeview));

         if (gtk_tree_model_get_iter_first (model, &iter) == FALSE){
+ /* When there are no device we need disable the input bar and set the original name */
+ gtk_label_set_label (GTK_LABEL(dialog->priv->selected_input_label),
+ _("Settings for the selected device"));
+ gtk_widget_set_sensitive (dialog->priv->input_bar, FALSE);
                 g_warning ("The tree is empty => we have no devices so cannot set the active input");
                 return;
         }
@@ -1382,6 +1386,8 @@
                return;
        }
        add_input_ui_entry (dialog, in);
+ /* update input bar when new input device added */
+ active_input_update (dialog, in);
 }

 static void
@@ -1446,6 +1452,8 @@
         if (found) {
                 gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
         }
+ /* update input bar when input device removed */
+ active_input_update (dialog, in);
 }

 static void

Anders (eddiedog988) on 2014-03-13
Changed in oem-priority:
status: New → Confirmed
Changed in gnome-control-center (Ubuntu):
status: New → Confirmed
Ara Pulido (ara) wrote :

Bin, does this happen in Trusty?

Changed in gnome-control-center (Ubuntu):
status: Confirmed → Incomplete
Bin Li (binli) wrote :

Ara,

 I install the 14.04, and find there are use 'unity-control-center sound' for change sound setting.

 First run 'unity-control-center sound', and insert the microphone in front panel, the input bar could be adjusted. But when I plug out the microphone, the input bar is still enabled, and you can change the input level, in next time when you insert microphone again, you will find the input level was the latest change which is we changed without inserting microphone.

 And I found soucecode is similar with gnome-control-center sound-nua, I'll try to made a patch for trusty.

Changed in gnome-control-center (Ubuntu):
status: Incomplete → Confirmed
Bin Li (binli) wrote :

For trusty, I made a patch to disable input bar when there are no input devices.

Bin Li (binli) wrote :

For precise, I made an merge request for it.

  * Add fix-input-device-bar-status.patch (LP: #1285974)
    First enable input bar when an new input device is added, backport from
    unity-control-center.
    Second, disable input bar when there are not input devices.

Sebastien Bacher (seb128) wrote :

Thank you for the work, the change seems fine to me and it looks like it should apply to upstream GNOME (the code seems similar in https://git.gnome.org/browse/gnome-control-center/plain/panels/sound/gvc-mixer-dialog.c)

Could you forward the change to them (https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-control-center)

It also looks like you could apply the same fix for the output as well (not sure how frequent it is to get a machine without audio ouput but it looks like it would lead to the same issue)

Changed in unity-control-center (Ubuntu):
importance: Undecided → Low
Changed in unity-control-center (Ubuntu):
status: New → In Progress
Bin Li (binli) wrote :

Sebastien,

 Follow your advice, I report an bug to bgo. Thanks!

 https://bugzilla.gnome.org/show_bug.cgi?id=726686

Sebastien Bacher (seb128) wrote :

Thanks!

Changed in gnome-control-center:
importance: Undecided → Unknown
status: New → Unknown
Changed in gnome-control-center (Ubuntu):
assignee: David Henningsson (diwic) → nobody
status: Confirmed → Triaged
Changed in gnome-control-center:
importance: Unknown → Medium
status: Unknown → New
Sebastien Bacher (seb128) wrote :
Changed in unity-control-center (Ubuntu):
status: In Progress → Fix Released
status: Fix Released → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-control-center - 14.04.3+14.04.20140319-0ubuntu1

---------------
unity-control-center (14.04.3+14.04.20140319-0ubuntu1) trusty; urgency=low

  [ Sebastien Bacher ]
  * users: set the change password button to inactive by default (LP:
    #1290808)
  * users: don't make accountsservice calls when not needed (LP:
    #1293705)
  * users: don't display the ecryptfs-verify output on stdout

unity-control-center (14.04.3+14.04.20140317-0ubuntu2) trusty; urgency=low

  * Disable the input/output bar when no input/output devices (LP: #1291862)
 -- Ubuntu daily release <email address hidden> Wed, 19 Mar 2014 14:43:40 +0000

Changed in unity-control-center (Ubuntu):
status: Fix Committed → Fix Released
Sebastien Bacher (seb128) wrote :

Thanks for the work, could you update the precise SRU to match what got uploaded to trusty?

Thanks for uploading the fix for this bug report to -proposed. However, when reviewing the package in -proposed and the details of this bug report I noticed that the bug description is missing information required for the SRU process. You can find full details at http://wiki.ubuntu.com/StableReleaseUpdates#Procedure but essentially this bug is missing some of the following: a statement of impact, a test case and details regarding the regression potential. Thanks in advance!

Changed in gnome-control-center (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Low
Changed in unity-control-center (Ubuntu Precise):
status: New → Invalid
Bin Li (binli) wrote :

I've finished the SRU information, feel free to contact me if need any other information. Thanks!

description: updated
Changed in gnome-control-center (Ubuntu Precise):
status: Triaged → New
Ara Pulido (ara) on 2014-04-04
Changed in gnome-control-center (Ubuntu Precise):
status: New → Triaged
Changed in oem-priority:
status: Confirmed → In Progress

Hello Bin, or anyone else affected,

Accepted gnome-control-center into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/gnome-control-center/1:3.4.2-0ubuntu0.13.2 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 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

Changed in gnome-control-center (Ubuntu Precise):
status: Triaged → Fix Committed
tags: added: verification-needed
Bin Li (binli) wrote :

Brian,

 Sorry for late, I've updated the package to gnome-control-center 1:3.4.2-0ubuntu0.13.2, and it works fine. Thanks!

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

This bug was fixed in the package gnome-control-center - 1:3.4.2-0ubuntu0.13.2

---------------
gnome-control-center (1:3.4.2-0ubuntu0.13.2) precise; urgency=medium

  * Disable the input/output bar when no input/output devices (LP: #1291862)
 -- Bin Li <email address hidden> Wed, 02 Apr 2014 10:52:39 +0200

Changed in gnome-control-center (Ubuntu Precise):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for gnome-control-center has completed successfully and the package has now been 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 regresssions.

Ara Pulido (ara) on 2014-04-22
Changed in oem-priority:
status: In Progress → Fix Released
Changed in gnome-control-center:
status: New → Confirmed
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.