New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 591730 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocking:
issue 547262



Sign in to add a comment

Missing Raiden notification when connecting two devices

Project Member Reported by tbuck...@chromium.org, Mar 3 2016

Issue description

From shrawan@google.com:

I tested this issue with two samus (connecting X and Y) on M-49 (7834.53.0, 49.0.2623.75).

On one samus (lets say X) it creates notification as expected (see attached screenshot in file name X_good).

On other Samus device (lets say Y) it don't create any notification (see attached screenshot and system logs  in file name Y_bad). But the power setting shows correctly the USB-Type C charging option.


Logs(system logs and screenshots) are uploaded at :
https://pantheon.corp.google.com/storage/browser/chromiumos-test-logs/bugfiles/crosp/547262/
 

Comment 1 by ka...@chromium.org, Mar 3 2016

Was there any pre-testing going on on the Samus Y device?
Can you powerwash and repeat the test? 
Cc: derat@chromium.org alecaberg@chromium.org
I've looked through the UI-related code and can't figure out how this could be possible. Guess it's time to flash some Samuses again.

shrawan, can you please provide details on the test setup?
Cc: osh...@chromium.org
Interesting, I can reproduce this 100% in 49.0.2623.59 but only when signed in with my corp account. Other notifications (like the low-power charger) are working.

Do we suppress notifications somehow for enrolled users?

Comment 4 by shrawan@google.com, Mar 3 2016

Cc: -osh...@chromium.org
I ran the test again on two samus after power-washing the device and not able to reproduce the issue when on Y I had just one profile logged in. I could see the notification on  both samus as expected.

Then I added one more profile on Y after which started seeing no-notification issue consistently on Y-Samus. 
Cc: -derat@chromium.org -alecaberg@chromium.org abodenha@chromium.org
Components: UI>Shell>Notifications
who does CrOS notification center stuff these days?

Comment 6 by shrawan@google.com, Mar 3 2016

Cc: ka...@chromium.org sontis@chromium.org helenzhang@chromium.org
Owner: jen...@chromium.org
There haven't been changes recently.

jennyz@ can you take a look?
This is still happening. It's very weird, it occurs with my enrolled device's primary account, but not with non-corp accounts or dev-mode devices. I've tried across a range of versions from 52-55 and haven't found a pattern.
Cc: derat@chromium.org

Comment 10 by derat@chromium.org, Sep 23 2016

I take it that the settings dialog suggests that the right information is being sent to Chrome, and that the problem is around displaying the notification, right?

I haven't looked at this code before, but:

a) TrayPower::OnPowerStatusChanged unconditionally calls MaybeShowDualRoleNotification (if --ash-hide-notifications-for-factory isn't set).
b) MaybeShowDualRoleNotification creates a DualRoleNotification and calls its Update method if PowerStatus::Get()->HasDualRoleDevices() returns true.
c) PowerStatus::HasDualRoleDevices() returns true if the protobuf's supports_dual_role_devices field is set to true and available_external_power_source contains at least one source where active_by_default is false.
d) DualRoleNotification::Update creates or updates the notification unless:
   i) one of the sources is a DEDICATED_CHARGER (i.e. active_by_default == true)
   ii) nothing changed

The logic for the "nothing changed" case is fairly complicated:

  // Check if the notification should change.
  bool change = false;
  if (PowerStatus::Get()->IsLinePowerConnected() != line_power_connected_) {
    change = true;
    line_power_connected_ = PowerStatus::Get()->IsLinePowerConnected();
  } else if (new_source && dual_role_source_) {
    if (new_source->description_id != dual_role_source_->description_id)
      change = true;
  } else if (new_source || dual_role_source_) {
    change = true;
  } else {
    // Notification differs for 0, 1, and 2+ sinks.
    if ((num_sinks_found < num_dual_role_sinks_ && num_sinks_found < 2) ||
        (num_sinks_found > num_dual_role_sinks_ && num_dual_role_sinks_ < 2)) {
      change = true;
    } else if (num_sinks_found == 1) {
      // The description matters if there's only one dual-role device.
      change = new_sink->description_id != dual_role_sink_->description_id;
    }
  }

I'm a little bit nervous about how all of these conditions are chained, and some (particularly "new_source && dual_role_source_") have nested if statements. For example, it looks like if the source hasn't changed, we may skip the check for sink changes. Maybe this is intentional, though.

Do other notifications (e.g. low-power charger) still show up on the problematic devices?
#10: Yes, and yes.

The code has been touched a couple times since I last looked, but at the time I remember having *no* idea how it was possible.
Status: Archived (was: Assigned)
@ketakid why was this archived?

Comment 14 by ketakid@google.com, Mar 18 2017

Labels: Pri-3
Status: Available (was: Archived)
Activating. Please assign to the right owner and the appropriate priority.
Cc: jen...@chromium.org
Owner: michae...@chromium.org
Status: Assigned (was: Available)
@michaelpg did you test this out a few weeks back?
Cc: michae...@chromium.org
Owner: tbuck...@chromium.org
Status: Available (was: Assigned)
#15: No, I was testing issue 693750. I'm mystified by both of these issues.
Project Member

Comment 17 by sheriffbot@chromium.org, Apr 16 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 18 by derat@chromium.org, Apr 16 2018

Status: WontFix (was: Untriaged)

Sign in to add a comment