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

Issue 889643 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Adaptive screen brightness code needs to wait for powerd to be ready before making D-Bus calls

Project Member Reported by derat@chromium.org, Sep 26

Issue description

(forked from issue 889035)

chrome/browser/chromeos/power/ml/adaptive_screen_brightness_manager.cc (and any other code in Chrome that calls D-Bus services) needs to use dbus::ObjectProxy::WaitForServiceToBeAvailable to wait for powerd to be ready before making D-Bus method calls to it. Otherwise, we log spammy messages like this:

[2758:2758:0925/050136.334732:ERROR:object_proxy.cc(615)] Failed to call method: org.chromium.PowerManager.GetScreenBrightnessPercent: object_path= /org/chromium/PowerManager: org.freedesktop.DBus.Error.UnknownMethod: Method "GetScreenBrightnessPercent" with signature "" on interface "org.chromium.PowerManager" doesn't exist

Note that this message is logged automatically by //dbus.

I've done passes through Chrome in the past to try to fix all callers, but new code has been introduced since then. Cc-ing some other people to see if they have any ideas about ways we could change the API to make this less likely. In general, CallMethod() calls in c'tors and Init methods are suspicious.
 
Cc: jiameng@chromium.org
Owner: pdyson@chromium.org

Sign in to add a comment