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

Issue 682859 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

keyboard input doesn't work in docked mode when device is in tablet mode for devices with a tablet mode switch

Project Member Reported by aaboagye@chromium.org, Jan 19 2017

Issue description

Chrome Version 57.0.2984.0
Platform 9200.0.0 (Official Build) dev-channel elm test
ARC Version 3651325
Firmware Google_Elm.8438.12.0


What steps will reproduce the problem?
1. Flash elm with EC FW that doesn't disable key scanning in S0. (See: https://chromium.googlesource.com/chromiumos/platform/ec/+/d84646ce06357b18a4adb79a6f594f848cb9d6bd)
2. Sign into guest account.
3. Use a USB Type-C to DisplayPort connector to connect to an external display.
4. Press the brightness down key until the external display is the primary display.
5. Type on keyboard and verify that input works.
6. Fold elm into tablet mode.
7. Type on keyboard.

What is the expected result?
Input is still recognized and keys work. The user can use the keyboard shortcuts and touchpad.


What happens instead of that?
All input appears to be ignored at the Chrome level. Using `evtest` shows keys are indeed being delivered to the AP.

-------------

Jon, assigning this to you since I think it might be a ash level thing. Gwendal and I spoke for a bit and here's what we think is going on. For devices with a tablet mode switch, we enter tablet mode once we see that switch is set. Normally in tablet mode, we ignore all the inputs and rely on the virtual keyboard and touchscreen.

However, when an external display is connected, set to primary, and the device enters tablet mode, it seems that we enter maximize mode on the external display. I think that should never happen, that is maximize mode should never be enabled for external displays (that aren't in mirrored mode).

It only appears to happen with devices that have a tablet mode switch.

 
Cc: afakhry@chromium.org jwer...@chromium.org tbuck...@chromium.org jonrss@chromium.org
Labels: -Pri-2 M-56 Pri-1
Aseda tells me the tablet mode switch only asserts at ~300 degrees, which matches what we see here. In normal tablet mode (without external display), the device switches from clamshell to touchview UI as soon as it passes 180 degrees. But in docked mode, the UI stays in clamshell (with keyboard usable) after 180 degrees until you bend it to about 300 degrees, when it suddenly switches into touchview anyway.

So it seems like Chrome normally decides to switch to touchview based on accelerometer data once it passes 180, and that code correctly knows about the docked mode exception. But then there seems to be another part that always forces touchview when the EC tablet mode flag is asserted, and that one ignores docked mode. That part needs to be fixed.
One other thing that I forgot to mention is that the state seems to be stuck until you disconnect the external display. Using ectool, I can confirm that the kernel is receiving the new accelerometer readings, but the external display is still in touchview until either the lid is closed or the external display is disconnected.
The ability to use the keyboard with the internal display off was added to accelerometer based checks: https://cs.chromium.org/chromium/src/ash/common/wm/maximize_mode/maximize_mode_controller.cc?rcl=1484943409&l=191

However this is not checked when receiving the tablet mode switch:
https://cs.chromium.org/chromium/src/ash/common/wm/maximize_mode/maximize_mode_controller.cc?rcl=1484943409&l=225

I'm pretty sure that all we need to do is replicate the no internal display check in tablet mode switch code. However I lack the hardware to verify this.

https://codereview.chromium.org/2649553004/
Status: Assigned (was: Unconfirmed)
> I'm pretty sure that all we need to do is replicate the no internal display check in tablet mode switch code. However I lack the hardware to verify this.

Aseda is out sick and I don't really have the full setup needed to recompile Chrome. :/

I think what needs to be done in the code is very straight-forward, like you said. If you could just check it in, I can test it for you as soon as the first canary image comes out.
Status: Started (was: Assigned)
I spoke with gwendal, and there was a missed case in the original patch.

I'll add tests this afternoon and pursue landing.
Project Member

Comment 7 by bugdroid1@chromium.org, Jan 26 2017

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

commit 1d03b9255a7b9ccdb4047d57e78e70e6cf1db0b8
Author: jonross <jonross@chromium.org>
Date: Thu Jan 26 01:37:53 2017

Do not enter Maximize Mode while docked

Update the handling of the tablet mode switch to not trigger maximize mode if
the device is currently docked.

BUG= 682859 

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

[modify] https://crrev.com/1d03b9255a7b9ccdb4047d57e78e70e6cf1db0b8/ash/common/wm/maximize_mode/maximize_mode_controller.cc
[modify] https://crrev.com/1d03b9255a7b9ccdb4047d57e78e70e6cf1db0b8/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Verified on kevin and elm on R58-9235.0.0.

Sign in to add a comment