Hammerhead - power button 3 times to wake up the device if automatic brightness is enabled #65

Closed
ernesst opened this Issue May 29, 2017 · 50 comments

Comments

Projects
None yet

ernesst commented May 29, 2017

Gents,

I didn't see this bug moved from launchpad.
I need to push, usually, 3 time the power button to wake up the devices.

Owner

NeoTheThird commented May 30, 2017

Are you still experiencing this? I marked it as fix released because I wasn't able to reproduce it, so I just assumed. What os version and channel are you on?

Owner

Flohack74 commented May 30, 2017

I have the same on my test device I think. I will test today. I was always thinking this is because I got a used N5 and the power button is a bit broken xD

ernesst commented May 30, 2017

Yes i still have it daily.
I'm in legacy r19

Owner

NeoTheThird commented May 30, 2017

@Flohack74 please check if the issue is also present on Android, so we can be sure it's related to Ubuntu Touch.

ernesst commented May 30, 2017

Impossible, i'll not flash back my nexus 5 to android ;)
However i doubt that it's hardware issue as i can shutoff the screen with one push and also when the screen just shutoff one push is enough to bring it back to life.
I guess is linked to the state of the device, deep sleep = 3 push to wake it up

Owner

NeoTheThird commented May 30, 2017

What exactly do you mean by deep sleep? When the device is shut down? That's not really a problem then, is it? My device turns on, when i hold the power button for a couple of seconds when it's turned off.

ernesst commented May 30, 2017

Deep sleep means more than 30s / 1 min with screen off, versus light sleep couple of second of screen off.
I'm not talking about phone being off.

Owner

NeoTheThird commented May 30, 2017

I can't reproduce this. Even after a couple of hours, my Nexus 5 comes back to life at the press of one button. @Flohack74 any luck on reproducing this?

Owner

NeoTheThird commented May 30, 2017

Don't mind me.

ernesst commented May 30, 2017

Do you know which log file or test command i should look at to capture the phenomena ?

Owner

Flohack74 commented May 30, 2017

I will try now... N5 powering on...

ernesst commented May 31, 2017

@Flohack74 takes time to powering ...

4 slow times to wake up the phone :
https://paste.ubuntu.com/24720385/

2 slow times to wake up the phone :
https://paste.ubuntu.com/24720398/

8 slow times to wake up the phone :
https://paste.ubuntu.com/24720441/

The trick is 3 times fast...

Interesting to see that each time I push the button, the action is noticed:
[Touch] touch off
[Touch] touch on

But touch off or touch on seems to have the same effect or the touch on tooks so long to be effective that the touch off (second push) is useless...

Owner

Flohack74 commented May 31, 2017

Yeah basically I see the same thing, its strange however, as I cant make up a pattern, seems to be totally random. Also long-press is not a good idea, then it opens the shutdown menu.

Owner

NeoTheThird commented May 31, 2017

I tried again a couple of times and i still can't reproduce this. I mean, i believe you that that's an issue, given that i heard about it form different people, i'm just wondering why my device is not affected. Are there different versions of the device, or am i just the chosen one?

@NeoTheThird NeoTheThird added bug and removed needs confirmation labels May 31, 2017

So if I parse the traces correctly i.e. in https://paste.ubuntu.com/24720385/ only the last power button press turns the backlight on. The first sequence just turns touchscreen, screen and other internal states to "on", the second press turns all of that off again..
Which part of the system talks to the backlight?

Owner

Flohack74 commented May 31, 2017

Haha that sounds very confusing but makes sense... It would match the pattern we see.

ernesst commented May 31, 2017

@APokorny
Could catch, if i push once the button + i swipe the screen off, the backlight goes on !

The bug doens't happen with the phone is connected to my computers

starstec commented Jun 3, 2017

Looks like it happens just when adjust brightness automatically is enabled. As you know previous versions does not have this issue (v4.4.2 I think), neither that issue ubports#6
Thank you for your attention.

Owner

NeoTheThird commented Jun 4, 2017

Yep, that's true. If you disable automatic brightness, the issue goes away. If you enable it, it comes back.

Yep, that's true. If you disable automatic brightness, the issue goes away. If you enable it, it comes back.

I can also confirm this!

Owner

Flohack74 commented Jun 15, 2017

This seems fixed now in latest devel :)

Owner

Flohack74 commented Jun 15, 2017

Unfortuantely not fixed. Its just not happening on ALL presses...

Hi,

Can someone show the content of /usr/share/powerd/device_configs/config-default.xml ??

Thanks.

@ncorella hi, there no longer /usr/share/powers/device_configs/hammerhead.XML

Since nos se use repowerd is moved to /usr/share/repowerd/davice_configs/hammerhead.xml

Sent from my LGE Nexus 5 using FastHub

Then... Am i looking in a wrong source code?

@ncorella i did changed hammerhead specifi folder to not include that XML file since is already included on rootfs

Sent from my LGE Nexus 5 using FastHub

Ahm... ok, now i see it.

Do you think it is the same bug that this old bug in krillin and mako?
https://bugs.launchpad.net/ubuntu/+source/powerd/+bug/1429887

At first i thought the bugs are the same, except for 2 strange things, nobody in that bug noticed that with automatic brightness disabled there is no bug. And the fact that in that bug, users said if you press one time the power button and simply wait (sometimes a lot of seconds) the screen goes on. Can anyone try this?

I don't have a nexus 5 yet... but i will have one next week and i hope i can help testing and debugging some things...

Thanks.

Owner

Flohack74 commented Jun 20, 2017

Ok will try at home. How many seconds to wait approx.?

Well, i don't know by my self, but in the refered bug, users said the time is totally random, from few seconds to even 1 minute...

did you try sudo chmod +x /usr/sbin/repowerd

ernesst commented Jun 21, 2017

It's already +x in the system.

Ok, now that i have a Nexus 5 i can test things.

I have discovered the reason of the random behavior and why it's not happening in all presses: if after power button is pressed (only one time), there is any change in the UI, i.e.: time change, battery change, mobile or wifi range change, etc... then the screen lights on!

Can anyone confirm this?

I can cofirm this for time(minutes) change also I can confirm that it took more then 5 seconds for the screen to light up.

Actually i like this bug, it keeps the phone from accidently being powered up in my pocket. Better battery life, and I got quickly used to it. Just press powerbutton and touch the screen. Maybe we can keep this bug as an option? Could be just a better way to wake up the ubuntu-phone. Try it!

wagafo commented Jun 29, 2017

I moved to 15.04/devel and I am not seeing this issue

Owner

NeoTheThird commented Jul 19, 2017

@wagafo Did you enable automatic brightness?

@NeoTheThird NeoTheThird changed the title from Hammerhead - power button 3 times to wake up the device to Hammerhead - power button 3 times to wake up the device if automatic brightness is enabled Jul 19, 2017

wagafo commented Jul 19, 2017

Yes, you're right. With automatic brightness this issue is still in the 15.04/devel channel.

@Flohack74 Flohack74 added this to the 15.04 OTA-2 milestone Jul 25, 2017

@mariogrip mariogrip modified the milestones: 15.04 OTA-3, 15.04 OTA-2 Aug 5, 2017

Owner

Flohack74 commented Sep 2, 2017

Now the behaviour is changed for me, I can press one time and then swipe, no need for 3 presses anymore ;)

ernesst commented Sep 3, 2017

Flo, nothing new. The one time + presd works also on the stable.

wagafo commented Sep 4, 2017

I confirm that it is solved also for my N5. No need to turn off automatic brightness any more.

Owner

Flohack74 commented Sep 4, 2017

Hmm I would not call it solved. If I press power button the screen does not light up, I have to swipe on the black screen...

wagafo commented Sep 5, 2017

Again, after some more playing, if automatic brightness is on, it is still not working as expected. This must be the 4th time I think this if fixed but it is not.

Rom4nB commented Oct 4, 2017

I have a Nexus 5 also and can confirm the bug with OTA2, stable, still present.

Flashed Ubuntu and screen was hard to wake up with the power button. As mentioned by Flohack74, I assumed that I got a damaged 2nd hand phone with worn out power button.

Now I re-flashed LineageOS (also to learn more about battery lasting time in Android, which was very low in ubuntu) and the power button works without problems in Android.

I can also confirm this bug on my N5. When screen doesn't wake up.. I touch/swipe screen even a little bit, backlight comes on. It doesn't matter where I do that touch/swipe, it works every time.

@Flohack74 Flohack74 added this to Accepted in Ubuntu Touch Oct 28, 2017

Owner

mariogrip commented Dec 12, 2017

@mariogrip mariogrip moved this from Accepted to Waiting for Q/A in Ubuntu Touch Dec 12, 2017

wagafo commented Dec 13, 2017

I'm still seeing this issue in 251 Devel version.

Owner

NeoTheThird commented Dec 13, 2017

I'm still seeing this issue in 251 Devel version.

True. The image might have been built before the fix was committed.

@NeoTheThird NeoTheThird moved this from Quality Assurance to In Development in Ubuntu Touch Dec 15, 2017

@mariogrip mariogrip moved this from In Development to Quality Assurance in Ubuntu Touch Dec 17, 2017

Owner

mariogrip commented Dec 17, 2017

Owner

Flohack74 commented Dec 17, 2017

I hope so much that this time we nailed it haha ;) - Testing tomorrow

Owner

NeoTheThird commented Dec 18, 2017

fixed

Ubuntu Touch automation moved this from Quality Assurance to Release Candidate Dec 18, 2017

@NeoTheThird NeoTheThird removed this from Release Candidate in Ubuntu Touch Dec 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment