New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 144 users
Status: Verified
Owner:
Closed: Mar 2013
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Feature

Restricted
  • Only users with EditIssue permission may comment.



Sign in to add a comment
Support a docked mode for laptops
Reported by arscott@chromium.org, Nov 12 2012 Back to list
We have had some requests for a docked mode for laptops, whereby if you have a screen, keybaord and mouse plugged in you then:
- timeouts for dim/off/suspend are different
- you can shut the screen without the device suspending.

This bug is to track how popular it is.
 
Summary: Support a docked mode for laptops (was: NULL)
Comment 2 by bleung@chromium.org, Nov 12 2012
Cc: bleung@chromium.org
Two other requirements:
- never go to sleep or suspend as long as you are connected to AC power, and a monitor and input device (at least one of keyboard and mouse) are connected.
- If the machine does go to sleep, the user should be able to wake it up by moving the mouse or pressing a key on the keyboard.
All my desktop machines go to some variety of sleep or suspend, even though they are (by definition) connected to power, a monitor and an input device.  I don't see why we'd impose this additional requirement on docking mode.
Especially when we resume from suspend faster than most monitors do.  I see this on my chromebox today; it's always awake and taking input before my monitor is displaying anything.
Agreed. I was wrong.
Comment 7 by bleung@chromium.org, Nov 13 2012
I'll put down as a requirement that external USB input devices like mice, keyboards, touchpads, etc should wake the system when we are "docked."

This may be exceptionally hardware dependent though, as certain Chromebook systems (specifically Alex, Samsung Series 5) have the USB rails turned off during suspend.
Comment 8 by carton@google.com, Nov 30 2012
For my livingroom use-case, I need to wake the device from a Bluetooth keyboard.

The user may also want to receive calls/chats in GMail or Calendar alarm notifications.

I think there are a lot of cases where the crude heuristics around when to sleep don't DTRT.

Your "we resume from suspend faster than most monitors" is simply false if you include 3G wireless, which is required for the device to do anything useful, so if you continue on this path you'll need to leave the modem on in standby mode while the CPU falls asleep---something that should certainly be possible within the power envelope since phones do it.

Bigger-picture I think maybe you are moving in the wrong direction with the aggressive sleeping.  It's become sort of fundamentalist, but maybe the right direction is to stop having a sleep "mode", and have only one mode, "working" mode, like phones do, then look for ways to save power while still "working."  Most other appliances in a house also work this way: refrigerators do not fall asleep and then suddenly become cold when you want to pull food out of them, av equipment responds to wireless remotes always not just when "awake," etc.

Labels: Mstone-27
Owner: derat@google.com
Status: Assigned
Dan and I are talking about this for 27.
Comment 10 by derat@chromium.org, Feb 19 2013
Owner: derat@chromium.org
A similar mde to how Apple do it would be good:

external power on
keyboard and mouse present
#11: Yes, that's along the lines of what's been discussed (additionally: external display connected).
Project Member Comment 13 by bugdroid1@chromium.org, Mar 7 2013
Labels: OS-Chrome
Project Member Comment 14 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-Power -Mstone-27 Cr-OS-Kernel-Power M-27
Comment 15 by derat@chromium.org, Mar 19 2013
Labels: -M-27 M-28
Comment 16 by smkh...@gmail.com, Mar 21 2013
Need this ASAP.
Comment 17 by derat@chromium.org, Mar 21 2013
Labels: Restrict-AddIssueComment-EditIssue
Comment 18 by derat@chromium.org, Mar 25 2013
Blocking: chromium:223184
Comment 19 by derat@chromium.org, Mar 25 2013
Cc: marc...@chromium.org osh...@chromium.org
Status: Started
When the user closes the lid while the system is in docked mode, I think that Chrome needs to turn off the internal panel while leaving the external display on and resize the framebuffer.  This contradicts  issue 148365 , though.  Oshima, any thoughts about how this should be resolved?
The bug is about when you set the brightness to zero. It's ok to turn off internal
display when the lid is closed. (I do need small change in chrome because chrome
behaves slightly different when you have internal display, but that's small issue)
Is there any issue in this behavior?


Comment 21 by derat@chromium.org, Mar 25 2013
We might need two similar-but-different modes, then: "internal-off-but-not-really-because-brightness-set-to-zero, external-on" and "internal-off-for-docked-mode, external-on".  Right now there's a single "internal-off, external-on" mode that powerd requests from Chrome, but I don't think that Chrome has any way of determining whether the panel should really be turned off.

Thinking about this some more, I wonder whether there's actually still a need for keeping the external display on (rather than turning all displays off) when the user reduces the brightness to zero.  I believe that that was initially added as a surrogate for docked mode.  It'd be cleanest to make DISPLAY_POWER_INTERNAL_OFF_EXTERNAL_ON actually do what it says and just use DISPLAY_POWER_ALL_OFF for zero brightness.
Cc: kuscher@chromium.org
+alex

> Thinking about this some more, I wonder whether there's actually still a need for keeping the external display on (rather  than turning all displays off) when the user reduces the brightness to zero.

Good point. I think your behavior makes perfect sense when idle. Only question is "brightness-zero by hand" mode,
which I never used myself. Alex, what would be a good use case for this? Can we kill this
"zero brightness oninternal, on external" mode?
Comment 23 by derat@chromium.org, Mar 26 2013
Cc: zelidrag@chromium.org
zel fyi

Summarizing discussion between Oshima, Alex, and me this morning: When the user manually sets the brightness to 0, we'll continue to turn the internal panel off while leaving external displays on (actually, this is broken at the moment; the external displays turn off after a short delay).  Unlike what we do currently, we'll resize the framebuffer so we don't potentially leave windows sitting around on the now-off panel.
Comment 24 by derat@chromium.org, Mar 27 2013
Labels: -Pri-2 -M-28 Pri-1 M-27
This is blocking an M-27 bug.
Comment 25 by derat@chromium.org, Mar 28 2013
Labels: -M-27 M-28
Moving back to 28 based on more discussion.
Comment 26 by derat@chromium.org, Mar 28 2013
Blocking: -chromium:223184
Project Member Comment 27 by bugdroid1@chromium.org, Mar 28 2013
Project: chromiumos/platform/power_manager
Branch : master
Author : Daniel Erat <derat@chromium.org>
Commit : a68de03d452e8e883de3d83a2d412a5cf110a981

Code Review +2: Ryan Harrison
Verified    +1: Daniel Erat
Change-Id     : I37ee647d6bbc96b0f52d4c54f39cc26c341f7d0d
Reviewed-at   : https://gerrit.chromium.org/gerrit/46640

power: Refactor DBusHandler class.

This renames the class's files from util_dbus_handler.* to
dbus_handler.*, makes it use thunks instead of putting
implementation in static methods, removes a bunch of
redundant "DBus" strings from method, type, and variable
names, unifies its method call and signal handler to
eliminate some copy-and-pasted code, and makes its
name-owner-changed code take a regular callback instead of a
function pointer.

It also makes the Daemon class, rather than Suspender,
register for name-owner-changed notifications.
DisplayPowerSetter needs to receive notification when Chrome
is restarted so it can resend the desired state (this will
be done in a following change).

BUG= chromium:218387 
TEST=unit tests pass; also did manual testing and verified
     that signals, method calls, and name-owner-changed
     notifications are handled as before

Commit-Queue: Daniel Erat <derat@chromium.org>

A  common/dbus_handler.cc
A  common/dbus_handler.h
M  common/module.mk
D  common/util_dbus_handler.cc
D  common/util_dbus_handler.h
M  powerd/powerd.cc
M  powerd/powerd.h
M  powerd/suspender.cc
M  powerd/suspender.h
M  tools/module.mk
M  tools/suspend_delay_sample.cc
Project Member Comment 28 by bugdroid1@chromium.org, Mar 29 2013
Project: chromiumos/platform/power_manager
Branch : master
Author : Daniel Erat <derat@chromium.org>
Commit : d88c0d8a5e0d55073fc435b3f7a24247703ae764

Code Review +2: Mitsuru Oshima
Verified    +1: Daniel Erat
Change-Id     : I71a3ebc9c82e04c64bcc74655d5a0b4e95efd2a2
Reviewed-at   : https://gerrit.chromium.org/gerrit/46817

power: Turn backlight on when external display is unplugged.

This ensures that the internal backlight is on after an
external display is disconnected.  It also moves the
handling of other cases where the backlight should be forced
on, such as session state change or power button being
pressed, into InternalBacklightController.

BUG= chromium:218387 
TEST=added unit tests

Commit-Queue: Daniel Erat <derat@chromium.org>

M  powerd/backlight_controller.h
M  powerd/external_backlight_controller.cc
M  powerd/external_backlight_controller.h
M  powerd/external_backlight_controller_unittest.cc
M  powerd/internal_backlight_controller.cc
M  powerd/internal_backlight_controller.h
M  powerd/internal_backlight_controller_unittest.cc
M  powerd/keyboard_backlight_controller.cc
M  powerd/keyboard_backlight_controller.h
M  powerd/keyboard_backlight_controller_unittest.cc
M  powerd/policy/input_controller.cc
M  powerd/powerd.cc
M  powerd/powerd_unittest.cc
Project Member Comment 29 by bugdroid1@chromium.org, Mar 30 2013
------------------------------------------------------------------------
r191509 | oshima@chromium.org | 2013-03-30T16:09:50.142414Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/pref_names.h?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/ash/display/display_controller_unittest.cc?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/ash/display/display_controller.cc?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/ash/display/display_controller.h?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/ash/ash.gyp?r1=191509&r2=191508&pathrev=191509
   A http://src.chromium.org/viewvc/chrome/trunk/src/ash/display/display_pref_util.h?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/ash/extended_desktop_unittest.cc?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/chromeos/display/output_configurator.h?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/chromeos/display/display_preferences_unittest.cc?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/ash/display/mouse_cursor_event_filter_unittest.cc?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/chromeos/display/display_preferences.cc?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/chromeos/display/display_preferences.h?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/ash/display/display_manager_unittest.cc?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/ash/display/display_manager.cc?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/ash/test/display_manager_test_api.cc?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/ash/display/display_manager.h?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/ash/wm/workspace/workspace_window_resizer_unittest.cc?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/pref_names.cc?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc?r1=191509&r2=191508&pathrev=191509
   M http://src.chromium.org/viewvc/chrome/trunk/src/ash/display/screen_position_controller_unittest.cc?r1=191509&r2=191508&pathrev=191509

Allow no-internal display mode
- Remember primary per display pair
- remember power state. Restore when restarted, but not boot time.
- DefaultLayout is used to construct layout for display pair.
 It used to be used if the layout wasn't set before, but since layout has other data such as primary/mirror state, it makes more sense to copy it first.
Cleanup: remove unnecessary code.

BUG= 218387 
TEST=covered by test. manually tested on device.

Review URL: https://chromiumcodereview.appspot.com/12865019
------------------------------------------------------------------------
Project Member Comment 30 by bugdroid1@chromium.org, Mar 30 2013
------------------------------------------------------------------------
r191558 | derat@chromium.org | 2013-03-30T21:22:39.220462Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chromeos/display/output_configurator.cc?r1=191558&r2=191557&pathrev=191558
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/chromeos/dbus/display_power_service_provider.cc?r1=191558&r2=191557&pathrev=191558
   M http://src.chromium.org/viewvc/chrome/trunk/src/chromeos/display/output_configurator.h?r1=191558&r2=191557&pathrev=191558

chromeos: Support turning displays off in extended mode.

This makes OutputConfigurator support requests from powerd
that either the primary or secondary monitor be turned off
in extended desktop mode.  Previously, the panel always
remained on.

BUG= 218387 


Review URL: https://chromiumcodereview.appspot.com/13006006
------------------------------------------------------------------------
Project Member Comment 31 by bugdroid1@chromium.org, Mar 31 2013
Project: chromiumos/platform/power_manager
Branch : master
Author : Daniel Erat <derat@chromium.org>
Commit : 43705a659382bcb550c0bda07e98622c2a69b26a

Code Review +2: Daniel Erat
Verified    +1: Daniel Erat
Change-Id     : I57ba627de1d32530efff76a24219c494bdfc3944
Reviewed-at   : https://gerrit.chromium.org/gerrit/46717

power: Add support for docked mode.

This adds "docked mode", a state where the system avoids
suspending when the lid is closed while an external display
is connected.  When entering this mode, the internal panel
is also turned off while external displays are left on.

BUG= chromium:218387 
TEST=added unit tests; also did manual testing using various
     hardware

Commit-Queue: Daniel Erat <derat@chromium.org>

M  powerd/backlight_controller.h
M  powerd/external_backlight_controller.cc
M  powerd/external_backlight_controller.h
M  powerd/internal_backlight_controller.cc
M  powerd/internal_backlight_controller.h
M  powerd/internal_backlight_controller_unittest.cc
M  powerd/keyboard_backlight_controller.cc
M  powerd/keyboard_backlight_controller.h
M  powerd/keyboard_backlight_controller_unittest.cc
M  powerd/policy/state_controller.cc
M  powerd/policy/state_controller.h
M  powerd/policy/state_controller_unittest.cc
M  powerd/powerd.cc
M  powerd/powerd.h
M  powerd/powerd_unittest.cc
M  powerd/suspender.cc
Comment 32 by derat@chromium.org, Mar 31 2013
The bulk of this should be in now.  Let's file separate bugs to track any remaining refinements that are needed or issues that crop up.
Comment 33 by derat@chromium.org, Mar 31 2013
Status: Fixed
Cc: derat@chromium.org
 Issue 160899  has been merged into this issue.
Comment 35 by derat@chromium.org, Apr 17 2013
Cc: krisr@chromium.org tturchetto@chromium.org
 Issue 231704  has been merged into this issue.
 Issue 231704  has been merged into this issue.
Comment 37 by derat@chromium.org, Apr 23 2013
Cc: ka...@chromium.org
 Issue 232178  has been merged into this issue.
Status: Verified
Verified on build 4063.0.0
system is suspending when the lid is closed while an external display is connected.
Sorry, correction to comment #38
system is not suspending when the lid is closed while an external display is connected.
 Issue 232178  has been merged into this issue.
Sign in to add a comment