Closed Bug 1155411 Opened 9 years ago Closed 9 years ago

[Aries] logshake doesn't trigger when hitting power + volume up

Categories

(Firefox OS Graveyard :: Gaia::Bugzilla Lite, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:2.5+, b2g-master fixed)

VERIFIED FIXED
2.2 S12 (15may)
blocking-b2g 2.5+
Tracking Status
b2g-master --- fixed

People

(Reporter: nhirata, Assigned: daleharvey)

References

Details

(Whiteboard: [spark])

Attachments

(2 files)

1. install bugzilla lite staging client : via https://bzlite-staging.herokuapp.com/install.html
2. log into bugzilla lite
3. tap power+ volume up

Expected: logshake triggers and attaches
Actual: nothing happens, if you hold it too long then the device shuts down.
Whiteboard: [ignite]
Priority: -- → P1
Is this a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1155587? Is "shake to save system log" working or anything in the logs?
hrm, updated my build on the dogfood device and not getting logs triggered, the code seems up to date but not actually running, very confusing
Assignee: nobody → dale
This works on a fresh flash on the flame
Ok this is due to lightsaber gaia branch being out of date - https://github.com/mozilla-b2g/gaia/blob/lightsaber/apps/system/js/hardware_buttons.js

If you can reproduce this on a fresh master build then please reopen, but I cant reproduce any issue on m-c / master
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Whiteboard: [ignite] → [spark]
Um.  It's still not working.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Hrm this has been working fine for me since it landed, if I flash a central eng build on a flame this works as soon as the device boots. Is there anything special with your build that may cause this not to work? (maybe try removing the usb just in case)
Flags: needinfo?(nhirata.bugzilla)
And can you enable "shake to save logs" in the developer menu and see if that works as well? cheers
It doesn't seem to work on Aries.  It works fine on flame.
Flags: needinfo?(nhirata.bugzilla)
Summary: logshake doesn't trigger when hitting power + volume up → [Aries] logshake doesn't trigger when hitting power + volume up
Attached file logcat.txt
I'm not sure how cypress is getting updated:
changeset:   240170:bbf9c19421b4

I had updated manually on the side before building and flashing.

attached is the logcat when I try to do the power+volume up
I should clarify what doesn't work on Aries.  The logshake and shaking the device works on both flame and Aries.  The power+volume up does work on Flame.

The Power+volume up does not work on Aries.
Maybe we should start posting the device that a bug repros on in the first comment.
blocking-b2g: --- → spark+
that's true.  I should start comparing aries versus flame since there seems to be differences.

Having said that, I recall in a different kernel they had to define the key strokes for it to function at the kernel level:
https://git.mozilla.org/?p=external/sprd-aosp/u-boot.git;a=commitdiff;h=f622abe55d61181554ae2b9d2fe2a728b1583828;hp=37c1ba6741cdad6b5712eb8608c894ff6629a73c

Do we have to do a similar situation here using sysrq?  Not sure if flame went through the same thing or not...
I updated my cypress as cypress got updated, and I still can reproduce this issue.
Ok thanks, been avoiding debugging this on aries since I dont want to break my dogfood device, but will take a look
ok reproduced on aries, the events are being triggered on Aries are definitely different to what is expected by the hardware buttons fsm

Aries:

Press volumeup then sleep
I/GeckoConsole(  317): Content JS LOG: evt: volume-up-button-press
I/GeckoConsole(  317): Content JS LOG: volume state entered
I/GeckoConsole(  317): Content JS LOG: evt: undefined
I/GeckoConsole(  317): Content JS LOG: evt: undefined
I/GeckoConsole(  317): Content JS LOG: evt: volume-up-button-release

Press sleep then volumeup
I/GeckoConsole(  317): Content JS LOG: evt: sleep-button-press
I/GeckoConsole(  317): Content JS LOG: sleep state entered
I/GeckoConsole(  317): Content JS LOG: evt: undefined
I/GeckoConsole(  317): Content JS LOG: evt: sleep-button-release
I/GeckoConsole(  317): Content JS LOG: evt: undefined
I/GeckoConsole(  317): Content JS LOG: evt: undefined
I/GeckoConsole(  317): Content JS LOG: evt: undefined
I/GeckoConsole(  317): Content JS LOG: evt: volume-up-button-press
I/GeckoConsole(  317): Content JS LOG: evt: sleep-button-press
I/GeckoConsole(  317): Content JS LOG: sleep button press in volume state
I/GeckoConsole(  317): Content JS LOG: evt: undefined
(if you hold long enough the device will turn off)

Flame: 

Press volumeup then sleep
I/GeckoConsole(30968): Content JS LOG: evt: volume-up-button-press
I/GeckoConsole(30968): Content JS LOG: volume state entered
I/GeckoConsole(30968): Content JS LOG: evt: sleep-button-press
I/GeckoConsole(30968): Content JS LOG: sleep button press in volume state
I/GeckoConsole(30968): Content JS LOG: evt: undefined
I/GeckoConsole(30968): Content JS LOG: SENDING SYSTEM LOG


Press sleep then volumeup
I/GeckoConsole(30968): Content JS LOG: evt: sleep-button-press
I/GeckoConsole(30968): Content JS LOG: entering sleep state
I/GeckoConsole(30968): Content JS LOG: evt: undefined
I/GeckoConsole(30968): Content JS LOG: evt: undefined
I/GeckoConsole(30968): Content JS LOG: evt: undefined
I/GeckoConsole(30968): Content JS LOG: evt: volume-up-button-press
I/GeckoConsole(30968): Content JS LOG: volumeup button press
I/GeckoConsole(30968): Content JS LOG: SENDING SYSTEM LOG
Originally assumed there was some type of issue with concurrrent hardware key presses, however strangely screenshot works absolutely fine. Heres a similiar log for screenshots - https://gist.github.com/daleharvey/f3bedd82533dac08e1ae

It seems somewhere in gonk volumeup must be handled specially as they are hitting the system app in a completely different order, fairly sure this is going to need fixing by someone who can take a look at the gonk level.
Assignee: dale → nobody
Multiple docs are referring to this key combo on several devices from the Xperia Z family as the "shutdown combo". Indeed, it has the exact same behavior as long-pressing the yellow button next to the SIM card to perform a shutdown.

I'm not sure we can find a solution other than using another key combo.
We could use Power+Camera (and not MozCameraFocusAdjust) for this.
23:13 <gerard-majax> daleharvey, https://pastebin.mozilla.org/8832114
23:13 <gerard-majax> 74 is power
23:13 <gerard-majax> 72 is voldown
23:13 <gerard-majax> 73 is volup
23:14 <gerard-majax> daleharvey, when you hold volup + power for long, it vibrates
23:14 <gerard-majax> exactly like when you long press the small yellow button next to SIM card 
23:14 <gerard-majax> daleharvey, and same on my android device
23:15 <gerard-majax> I would deduce it's a combo we cannot use there at all :)

Taking again, so it looks like z3c has an in built firmware shortcut for volumeup + power to turn off the device when the software is broken. This means on the z3c we cannot use this shortcut in gaia (it works fine on other devices, although possibly not all)

So we need to come up with a new trigger for this :(
I can test out Power+Camera, but worth remembering most other devices, at least the flame dont have a camera button, using 2 shortcuts is probably fine but need to take into account for https://bugzilla.mozilla.org/show_bug.cgi?id=1155719
It looks like the android shortcut for this is Volume up + Volume down + power, however we will likely run into the same issue with that plus its fairly hard to actually do on the z3c.

Another option may be volumeup + volumedown
Assignee: nobody → dale
Status: REOPENED → UNCONFIRMED
Ever confirmed: false
Comment on attachment 8601459 [details] [review]
[gaia] daleharvey:1155411 > mozilla-b2g:master

Ok so this works on the flame + aries, I cant see references to the shortcut being used in other androids and is relatively easy to trigger.
Attachment #8601459 - Flags: review?(alive)
Attachment #8601459 - Flags: feedback?(lissyx+mozillians)
Comment on attachment 8601459 [details] [review]
[gaia] daleharvey:1155411 > mozilla-b2g:master

Looks good to me and it works on my device too :)
Attachment #8601459 - Flags: feedback?(lissyx+mozillians) → feedback+
Comment on attachment 8601459 [details] [review]
[gaia] daleharvey:1155411 > mozilla-b2g:master

Looks good
Attachment #8601459 - Flags: review?(alive) → review+
Keywords: checkin-needed
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Verified with build : 
https://tools.taskcluster.net/task-inspector/#xRVy3KtOQdKKP1gu0quJIw/0

use of volume up and down key together.
Status: RESOLVED → VERIFIED
Target Milestone: --- → 2.2 S12 (15may)
blocking-b2g: spark+ → 2.5+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: