Sleep on power button press

2,183 views
Skip to first unread message

Zack Mitkin

unread,
Jan 20, 2018, 11:32:00 AM1/20/18
to Android-x86
I have the latest android 7.1 RC2 on my surface 3, it works amazingly great. What is very annoying is when I click the power button I expect it to be like the phone to just turn the screen off and go to sleep mode. But instead it shuts down the device, so next time I press it I have to reboot. Is there any way to put it to sleep when the button is pressed?

Povilas Staniulis

unread,
Jan 20, 2018, 2:58:52 PM1/20/18
to andro...@googlegroups.com
Your device make and model ?

Antony Stone

unread,
Jan 20, 2018, 4:25:24 PM1/20/18
to andro...@googlegroups.com
On Saturday 20 January 2018 at 20:58:43, Povilas Staniulis wrote:

> Your device make and model ?

Isn't Surface 3 specific enough?

I don't have one, but I thought it was a clear description.

Antony
--
BASIC is to computer languages what Roman numerals are to arithmetic.

Please reply to the list;
please *don't* CC me.

Povilas Staniulis

unread,
Jan 20, 2018, 5:03:53 PM1/20/18
to andro...@googlegroups.com
Sorry, my fault, didn't read your post entirely.
We get a lot of folks just asking why this or that doesn't work without
letting us know what device they have.

Does auto-sleep work for you ?

Zack Mitkin

unread,
Jan 20, 2018, 5:08:20 PM1/20/18
to Android-x86
no auto sleep does not work either. I think it goes to sleep, but I cannot turn it back on. When I click the power when I think it's in sleep, nothing at all happens no boot screen or anything. I have to hold the button for like 5 seconds then press again to turn device back on.

Povilas Staniulis

unread,
Jan 20, 2018, 5:14:41 PM1/20/18
to andro...@googlegroups.com
That means the device tries to sleep but hangs instead of sleeping.
Not a surprise, since Cherry Trail is a pretty newish platform and IIRC
7.1 RC2 only has kernel 4.9.
> --
> You received this message because you are subscribed to the Google
> Groups "Android-x86" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to android-x86...@googlegroups.com
> <mailto:android-x86...@googlegroups.com>.
> To post to this group, send email to andro...@googlegroups.com
> <mailto:andro...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/android-x86.
> For more options, visit https://groups.google.com/d/optout.


Zack Mitkin

unread,
Jan 20, 2018, 5:17:39 PM1/20/18
to Android-x86
is there a way to fix it?

zhongtian xie

unread,
Jan 21, 2018, 1:04:11 AM1/21/18
to andro...@googlegroups.com
Please provide you device infomation,:

Model(eg:Dell or Hp or lenovo and others) and make(eg: inspiron or XPS).

Best regards.

2018-01-21 6:17 GMT+08:00 Zack Mitkin <zack....@gmail.com>:
is there a way to fix it?

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.

Luke

unread,
Jan 24, 2018, 11:00:31 PM1/24/18
to Android-x86
I have an Intel NUC Kit NUC6CAYH. Pressing the power button only shows the poweroff menu and does not send it to sleep. Is this a kernel issue?

Stavros Christodoulou

unread,
Jan 25, 2018, 5:29:10 AM1/25/18
to Android-x86
I believe sleeping is considered "broken", although it worked when I issued sleep commands from the terminal, with keyboard wakeup.

Chih-Wei Huang

unread,
Jan 25, 2018, 5:42:17 AM1/25/18
to Android-x86
2018-01-25 12:00 GMT+08:00 Luke <hath...@gmail.com>:
> I have an Intel NUC Kit NUC6CAYH. Pressing the power button only shows the
> poweroff menu and does not send it to sleep. Is this a kernel issue?

Set the property: poweroff.doubleclick=1

Then a single press goes to sleep, and
double presses in one second shows poweroff menu.

Note this is only for standard PC power button.
Surface 3 is not the case.


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Zack Mitkin

unread,
Jan 25, 2018, 8:19:30 AM1/25/18
to Android-x86
How would you do it on the Surface 3? Do you have it working fine on your surface 3?

Robert Coldbird

unread,
Jan 25, 2018, 10:05:00 AM1/25/18
to Android-x86
I know this issue and it seems to be limited to Cherry-Trail / Bay-Trail devices.
The only workaround I've found so far is to register a wake-lock with the kernel (essentially disabling sleep all-together) and leaving it there.
You can easily do this in the init-scripts for example by accessing the power sysfs nodes.

Once registered, tapping the power button will turn the screen on / off, and do nothing else.

Chih-Wei Huang

unread,
Jan 25, 2018, 9:09:12 PM1/25/18
to Android-x86
2018-01-25 23:05 GMT+08:00 Robert Coldbird <gentlema...@gmail.com>:
> I know this issue and it seems to be limited to Cherry-Trail / Bay-Trail
> devices.
> The only workaround I've found so far is to register a wake-lock with the
> kernel (essentially disabling sleep all-together) and leaving it there.
> You can easily do this in the init-scripts for example by accessing the
> power sysfs nodes.
>
> Once registered, tapping the power button will turn the screen on / off, and
> do nothing else.

You can just set the property: sleep.state=none

Stavros Christodoulou

unread,
Jan 26, 2018, 9:24:44 AM1/26/18
to andro...@googlegroups.com
Can confirm it also affects Apollo Lake.

--
You received this message because you are subscribed to a topic in the Google Groups "Android-x86" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-x86/_vU8nNLKicI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-x86+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages