Ectool motionsense spoof does not give consistent results |
|||
Issue descriptionI've tried creating an autotest using ectool motionsense spoof and came across a couple issues: - Using the same values to manually spoof sometimes result in a flipped screen, sometimes not. This is regardless of resetting the spoof mode by disabling the sensors and then re-enabling. - Passing the same command to the DUT via command line does not result in a flipped screen - Passing the command to the DUT manually sometimes results in a flipped screen. It seems like autotest is running ectool motionsense spoof correctly (no errors about the command itself) but the values aren't passed. However, the command itself has flaky results. Spoof commands: ectool motionsense spoof -- 0 1 -160 16784 -1440 ectool motionsense spoof -- 1 1 80 -16176 1008 Disabling spoof commands: ectool motionsense spoof -- 0 0 ectool motionsense spoof -- 1 0
,
Feb 3 2017
I think something might be wrong with the autotest I'm running so let's ignore that for now. I tried manually spoofing again and I got inconsistent results. The laptop does seem to go into tablet mode (mouse isn't working) but sometimes the screen flips and sometimes it doesn't. With a newly rebooted device: > ectool motionsense Motion sensing active Sensor 0: -128 240 16032 Sensor 1: 32 16528 1872 > ectool motionsense spoof -- 0 Sensor 0 spoof mode is disabled. > ectool motionsense spoof -- 1 Sensor 1 spoof mode is disabled. > ectool motionsense spoof -- 0 1 -160 16784 -1440 > ectool motionsense spoof -- 1 1 80 -16176 1008 [At this point both sensors are enabled [[verified using ectool motionsense spoof --0/1], screen is upright, and ectool motionsense shows the spoofed values] > ectool motionsense spoof -- 0 1 -64 16720 -144 > ectool motionsense spoof -- 1 1 32 -16256 -224 [At this point, the screen is flipped, sensors are enabled, and ectool motionsense shows the correct spoofed values] > ectool motionsense spoof -- 0 0 > ectool motionsense spoof -- 1 0 [Ectool motionsense shows nonspoofed values, screen is upright, mouse is working] > ectool motionsense spoof -- 0 1 -64 16720 -144 > ectool motionsense spoof -- 1 1 32 -16256 -224 [Screen is NOT flipped, mouse not working, ectool motionsense shows spoofed values] So it seems that the screen is only flipped after I give it more spoofed values on top of the old ones. But if I disable everything and then enable spoof again with the same spoofed values, the screen isn't flipped.
,
Feb 8 2017
,
Feb 16 2017
Is there any update on this?
,
Feb 17 2017
Sorry, I've been really busy with other high priority tasks. I did a quick analysis using the values that you had provided: It seems that your device was roughly open to 90 degrees. So I set up mine that way and basically went between not spoofing and spoofing to the following values: > ectool motionsense spoof -- 0 1 -64 16720 -144 > ectool motionsense spoof -- 1 1 32 -16256 -224 Spoofing itself works correctly. However, if you check the lid angle reported, you'll see that it's 0. Since it's 0, that's why it's not flipping. Are you using ToT cyan EC firmware? or from the firmware branch? My reliability patch, which I believe should fix this, is in master, but I suppose we need to enable a config for cyan. The config is CONFIG_LID_ANGLE_INVALID_CHECK. However, my reliability patch isn't on the cyan firmware branch. I forget if it was because of space issues. But actually, I don't think cyan uses the tablet mode switch, so it's probably using the values that Chrome has calculated, which is still 0 if it agrees with the EC. Then my patch wouldn't fix it either. You may want to inject intermediate states. That is go from 90-> 180 -> 270 -> 360. It just depends on what you want to test.
,
Feb 17 2017
Thanks for the update! > Are you using ToT cyan EC firmware? or from the firmware branch? Firmware branch; I thought ToT cyan EC firmware didn't have spoof enabled due to space issues. I can try on ToT if that's where the patch is. I wanted to use screen flipping to test the transition because it would be the easiest to verify, but if that's not the most reliable method I could try some other things like verifying the mouse doesn't work.
,
Feb 17 2017
Ah, yes, you're right. There's no spoof mode support on ToT yet. Using screen flipping is fine. I would expect in that situation, the keyboard wouldn't have been disabled and such. I'd be interested to see what the results are with intermediate angles. Or you could try using values from tent mode if you just want to test tablet mode transitions.
,
Feb 21 2017
Alright, I'll continue using the firmware branch and focus on verifying the transition using touchpad capability. I could try using intermediate angles in a future iteration but for now I'll stick with verifying the transition.
,
Mar 16 2017
Hi Aseda, is there spoof mode support on ToT yet?
,
Mar 16 2017
Hi Ruchi, I think I misspoke earlier. Spoof mode was merged to master awhile ago. (It also exists on the cyan and oak firmware branches.
,
Mar 16 2017
,
Mar 16 2017
Thanks!
,
Mar 23 2017
I'm on the cyan firmware branch and ran into another problem. It seems the spoof mode doesn't play nice with autotest. I can run the commands well enough (no non-zero exit status when I spoof) but I don't see the screen flipping that I normally do when I run the same commands manually. Know what could be causing this issue?
,
Mar 24 2017
^ Disregard, added sleep and it works way more consistently now. Thanks dchan!
,
Mar 27 2017
So, no issue anymore?
,
Mar 27 2017
Nope, everything works consistently and the test is in review. Thanks for your help.
,
Mar 27 2017
No problem; glad it works for you! |
|||
►
Sign in to add a comment |
|||
Comment 1 by aaboagye@chromium.org
, Feb 3 2017