Press power button after SetBacklightsForcedOff(true) and powerd_dbus_suspend |
||||
Issue descriptionon tot code, do the following with --ash-enable-tablet-power-button: (1) press-and-release power button to SetBacklightsForcedOff(true). (2) /usr/bin/powerd_dbus_suspend (3) press-and-release power button The first press-and-release power button cannot turn on the screen, the second can. If on laptop mode, the first key event can turn on the screen. Suspecting the reason: https://cs.chromium.org/chromium/src/ash/system/chromeos/power/tablet_power_button_controller.cc?q=tablet_power&sq=package:chromium&l=99 power_manager logs: ---------------------------- [1201/103758:INFO:daemon.cc(506)] Power button down [1201/103758:INFO:main.cc(240)] Launching "sync" [1201/103758:INFO:daemon.cc(1325)] Saw user activity [1201/103758:INFO:daemon.cc(506)] Power button up [1201/103758:INFO:daemon.cc(1394)] Received request to start forcing backlights off [1201/103758:INFO:display_power_setter.cc(80)] Asking Chrome to turn all displays off [1201/103758:INFO:internal_backlight_controller.cc(674)] Setting brightness to 0 (0%) over 0 ms [1201/103758:INFO:daemon.cc(1344)] Chrome is using normal display mode [1201/103808:INFO:daemon.cc(777)] On battery at 91% (displayed as 95%), 4.710/5.148Ah at 0.383A, 6h58m33s until empty (6h44m50s until shutdown) [1201/103815:INFO:daemon.cc(1183)] Got RequestSuspend message from :1.201 [1201/103815:INFO:suspender.cc(397)] Starting request 96862211 [1201/103815:INFO:daemon.cc(589)] Reading wakeup count from /sys/power/wakeup_count [1201/103815:INFO:daemon.cc(593)] Read wakeup count 851 [1201/103815:INFO:suspend_delay_controller.cc(139)] Announcing suspend request 96862211 with 2 pending delay(s) and 0 outstanding delay(s) from previous request [1201/103815:INFO:suspend_delay_controller.cc(88)] Got notification that delay 96862210 (shill) is ready for suspend request 96862211 from :1.11 [1201/103815:INFO:suspend_delay_controller.cc(88)] Got notification that delay 96862221 (chrome) is ready for suspend request 96862211 from :1.188 [1201/103815:INFO:suspend_delay_controller.cc(224)] Notifying observers that suspend is ready [1201/103815:INFO:suspender.cc(466)] Starting suspend [1201/103815:INFO:main.cc(259)] Running "/usr/bin/powerd_setuid_helper --action=mosys_eventlog --mosys_eventlog_code=0xa7" [1201/103816:INFO:main.cc(259)] Running "/usr/bin/powerd_setuid_helper --action=suspend --suspend_wakeup_count_valid --suspend_wakeup_count=851" [1201/103825:INFO:daemon.cc(690)] powerd_suspend returned 0 [1201/103825:INFO:main.cc(240)] Launching "/usr/bin/powerd_setuid_helper --action=mosys_eventlog --mosys_eventlog_code=0xa8" [1201/103825:INFO:suspender.cc(424)] Finishing request 96862211 successfully [1201/103825:INFO:daemon.cc(1325)] Saw user activity [1201/103825:INFO:daemon.cc(506)] Power button down [1201/103825:INFO:main.cc(240)] Launching "sync" [1201/103825:INFO:daemon.cc(506)] Power button up [1201/103825:INFO:daemon.cc(777)] On battery at 91% (displayed as 95%), 4.708/5.148Ah at 0.213A, 0s until empty (calculating) --------------------------------------- I think the reason is: Because we ignore the power button event which will resume the system. However, powerd resumes the system to the brightness zero? (because suspend happens when backlights are forced off). Also, powerd logs should have something like this: Setting resume brightness to XXX (xx%). It is missing here.
,
Dec 2 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/30955abfe3214c8fb4258b05a0db86848f1c592f commit 30955abfe3214c8fb4258b05a0db86848f1c592f Author: warx <warx@chromium.org> Date: Fri Dec 02 04:25:22 2016 Resuming from suspend should stop backlights forced off if they are BUG= 670402 TEST=manual device test, also add test coverage Review-Url: https://codereview.chromium.org/2544073002 Cr-Commit-Position: refs/heads/master@{#435854} [modify] https://crrev.com/30955abfe3214c8fb4258b05a0db86848f1c592f/ash/system/chromeos/power/tablet_power_button_controller.cc [modify] https://crrev.com/30955abfe3214c8fb4258b05a0db86848f1c592f/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc
,
Dec 2 2016
,
Aug 1 2017
,
Jan 22 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by derat@chromium.org
, Dec 2 2016> However, powerd resumes the system to the brightness zero? This is just happening because the backlights are still forced off, no? There's a "Received request to start forcing backlights off" message but nothing about stopping that, so powerd's going to keep doing it until you tell it to stop. "Resume brightness" is just a fast path to tell the kernel to restore a particular brightness level before userspace is awake when resuming. It turns the backlight on faster and makes the system look like it's resumed more quickly. The resume brightness here would be 0 (since that was the pre-suspend level), so it would be pointless. powerd doesn't bother setting it as a result: if (resume_percent >= 0.0) ApplyResumeBrightnessPercent(resume_percent); So powerd is behaving the way I'd expect it to here.