New issue
Advanced search Search tips

Issue 717681 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

mushrome: Display goes dim despite activity, brightness keys don't work

Project Member Reported by jamescook@chromium.org, May 2 2017

Issue description

chrome --mus on link, Chrome r468701, self-built test image 60.0.3088.0

* Use the browser for a while
* Display dims, despite activity
* Brightness keys don't change brightness

It's possible the keys not working is  issue 717676 

It's possible the user activity detector isn't hooked up properly for --mus.

Dan, feel free to reassign.

 

Comment 1 by derat@chromium.org, May 2 2017

Do you see user activity getting reported in /var/log/power_manager/powerd.LATEST?

This was working after my change in issue 626899, but maybe it broke.
I'm not sure what "normal" looks like in that log file. Without --mus I see things like this in powerd.LATEST:

[0503/083311:INFO:activity_logger.cc(20)] User activity reported
...
[0503/083459:INFO:activity_logger.cc(20)] User activity stopped; last reported 20 sec ago
...
[0503/083531:INFO:activity_logger.cc(20)] User activity reported

However, with --mus I don't see those things. Maybe user activity is hooked up for --mash but not --mus.

Comment 3 by derat@chromium.org, May 4 2017

Status: Started (was: Assigned)
I think that this is the path that user activity takes right now:

a) ws reports user activity via the UserActivityMonitor mojo interface
b) aura::UserActivityForwarder registers as an observer and forwards activity to ui::UserActivityDetector
c) ui::UserActivityDetector reports activity periodically to ui::UserActivityObservers
d) ui::UserActivityPowerManagerNotifier implements ui::UserActivityObserver and calls chromeos::PowerManagerClient::NotifyUserActivity
e) chromeos::PowerManagerClient forwards activity to powerd over D-Bus (which causes those log messages you quoted)

I'm seeing the same thing as you -- activity is reported to powerd with I run with --mash, but not with --mus.

Here's the place where we wire up UserActivityForwarder:

  // The connector is unavailable in some tests.
  if (config == Config::MASH && shell_delegate_->GetShellConnector()) {
    ui::mojom::UserActivityMonitorPtr user_activity_monitor;
    shell_delegate_->GetShellConnector()->BindInterface(ui::mojom::kServiceName,
                                                        &user_activity_monitor);
    user_activity_forwarder_ = base::MakeUnique<aura::UserActivityForwarder>(
        std::move(user_activity_monitor), user_activity_detector_.get());
  }

I think we should probably be doing this for Config::MUS as well, right?

Comment 4 by sky@chromium.org, May 4 2017

Yes, I think this should be enabled for Config::MUS too.
Project Member

Comment 5 by bugdroid1@chromium.org, May 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/036f91b9734b64b10996ea894eb863dd2d66657d

commit 036f91b9734b64b10996ea894eb863dd2d66657d
Author: derat <derat@chromium.org>
Date: Fri May 05 00:33:18 2017

ash: Instantiate UserActivityForwarder for --mus.

This class forwards user activity from ws to the
pre-servicification activity-handling mechanism, so it needs
to be used for --mus in addition to --mash. Check for
aura::Env::Mode::MUS to handle both modes.

BUG= 717681 
TEST=put --mus, --mash, and neither in /etc/chrome_dev.conf
     and check that user activity is reported in
     /var/log/power_manager/powerd.LATEST after hitting a
     key

Review-Url: https://codereview.chromium.org/2863623005
Cr-Commit-Position: refs/heads/master@{#469546}

[modify] https://crrev.com/036f91b9734b64b10996ea894eb863dd2d66657d/ash/shell.cc

Comment 6 by derat@chromium.org, May 5 2017

Status: Fixed (was: Started)

Comment 7 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 8 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)
Components: -Internals>MUS Internals>Services>WindowService

Sign in to add a comment