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

Issue 837274 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

caroline: powerd warns about being unable to disable touchscreen wakeup

Project Member Reported by derat@chromium.org, Apr 26 2018

Issue description

I see this in powerd.LATEST after booting a ToT caroline device:

[0425/211435:INFO:udev.cc(392)] Adding device /sys/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-6/i2c-ATML0001:00/input/input7 with tags usable_when_laptop usable_when_tablet wakeup wakeup_disabled inhibit role_internal_touchscreen
[0425/211435:INFO:udev.cc(392)] Adding device /sys/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-6/i2c-ATML0001:00/input/input7/event7 with tags usable_when_laptop usable_when_tablet role_internal_touchscreen
...
[0425/211435:INFO:input_device_controller.cc(284)] Configuring devices for mode "laptop"
[0425/211435:INFO:input_device_controller.cc(215)] Un-inhibiting /sys/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-6/i2c-ATML0001:00/input/input7
...
[0425/211435:WARNING:input_device_controller.cc(199)] No power/wakeup sysattr available for /sys/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-6/i2c-ATML0001:00/input/input7

Is the warning message an issue? Here's the corresponding powerd code:
                                     
194 void InputDeviceController::SetWakeupFromS3(const system::TaggedDevice& device,
195                                             bool enabled) {
196   std::string parent_syspath;
197   if (!system::udev_util::FindWakeCapableParent(device.syspath(), udev_,
198                                                 &parent_syspath)) {
199     LOG(WARNING) << "No " << kPowerWakeup << " sysattr available for "
200                  << device.syspath();
201     return;
202   }
203   LOG(INFO) << (enabled ? "Enabling" : "Disabling") << " wakeup for "
204             << device.syspath() << " through " << parent_syspath;
205   udev_->SetSysattr(parent_syspath, kPowerWakeup,
206                     enabled ? kWakeupEnabled : kWakeupDisabled);
207 }

Despite this failing, the touchscreen doesn't wake from S3.

Is it safe for powerd to assume that if a device (and its ancestors) don't have a power/wakeup node, then the device won't wake from S3? If so, I can probably suppress this warning when |enabled| is false.
 
Sure. This is a safe failure. We can suppress the warning. Only there to debug scenarios where system goes into dark resume unexpectedly 

Comment 2 by derat@chromium.org, Apr 26 2018

Thanks, but I don't see the connection to dark resume. Isn't this method trying to configure whether input events from the device will wake from S3 or not?
NeverMind. Did not read the description properly. But still think suppressing the  warning when |enabled| is false should be a good idea.

Comment 4 by derat@chromium.org, May 2 2018

Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, May 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/bec7aae69bddbf9d8e842a979c20a66c7e378082

commit bec7aae69bddbf9d8e842a979c20a66c7e378082
Author: Daniel Erat <derat@chromium.org>
Date: Thu May 03 11:47:35 2018

power: Avoid "No power/wakeup sysattr available" warning.

Make powerd avoid logging a "No power/wakeup sysattr
available" warning when it was only planning to disable
wakeups.

BUG= chromium:837274 
TEST=deployed to caroline and verified that warning is no
     longer logged when powerd starts

Change-Id: I93c23e0df93f055b357694ba2835943af761e9bc
Reviewed-on: https://chromium-review.googlesource.com/1036857
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Ravi Chandra Sadineni <ravisadineni@chromium.org>

[modify] https://crrev.com/bec7aae69bddbf9d8e842a979c20a66c7e378082/power_manager/powerd/policy/input_device_controller.cc

Comment 6 by derat@chromium.org, May 3 2018

Status: Fixed (was: Started)

Sign in to add a comment