Turn screen on

Post your questions and help other users.

Moderator: Martin

Akt
Posts: 133
Joined: 25 May 2014 08:57

Turn screen on

Post by Akt » 06 Sep 2017 07:11

Turn screen on action is not working in android 6.
Is there any alternative?

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Turn screen on

Post by Desmanto » 06 Sep 2017 11:58

How do you test the action? Try to create trigger Period Timer : 10s, then put that action Turn Screen on. Enable the flow, lock the device and wait for 10 seconds. Check if it turn on. Maybe you need to grant device administrator permission as well to see if it works.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Turn screen on

Post by Akt » 06 Sep 2017 12:55

I have granted all the permission and followed the same steps.
I am using cyanogenmod 13 Android 6.0.1

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Turn screen on

Post by Desmanto » 06 Sep 2017 13:38

It seems your phone is a special snowflake, need some workaround. I have tested in several phones, and it always work.

You have to use root command. Action Execute Root Command

Code: Select all

input keyevent 26
This is the same as pressing power button.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Turn screen on

Post by Martin » 06 Sep 2017 19:12

Hi,

Please ensure that the ROM or some root apps/Xposed modules block that Automagic creates wake locks (turning on the screen by Automagic requires a wake lock).

Regards,
Martin

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Turn screen on

Post by Akt » 07 Sep 2017 07:19

Input keykode 26 not working.
Any app to preventvwake lock in xposed or play store

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Turn screen on

Post by Desmanto » 07 Sep 2017 10:09

No, Martin means that you have some apps which kill the wakelock ability that automagic supposed to have. What kind of power saver/task killer are there in your ROM? If you use greenify, amplify or any kind of battery saver/task killer, please disable it or at least whitelist automagic from them. If still not working, try to disable xposed, reboot and try the Action turn on screen again.

It seems you phone drugged automagic to sleep everytime screen off. If that is the case, any trigger that happen during screen off, will never execute the flow. You can check this using the same trigger period timer 10s, put action Sound and choose any built-in sound you have. Enable the flow, let it run 2-3 times, to hear the sound. After confirmed it has sound, turn off the screen and check if the sound is still playing every 10 seconds. If not, your ROM has stolen the wakelock ability that automagic should have.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Turn screen on

Post by Akt » 07 Sep 2017 14:24

My all other flow are working fine such as speak time every hour, reboot device at 6 am, change wallpaper after every 2 hour, change screen brightness and volume according to time, and many more.

Actually I have created an flow to clean recent apps before reboot every morning. So to clean recent apps, I have to turn my screen on as I use control UI. So I need to turn screen on to click at a specific point to clean recent apps.

Earlier it was working fine in Android 5.0 , but when I installed the CM 13 Android 6.0.1 , I am facing this problem.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Turn screen on

Post by Desmanto » 07 Sep 2017 14:51

Strange. Custom ROM always tends to create misterious problem which is hard to trace. If everything else is working, then you should enable the debug log for more information.

Try the same Turn on screen and input keyevent 26, and check the log after you execute it manually. Try that input keyevent 26 when your screen is on, see if the screen goes off after you execute it. LP 5.0 and MM 6.0 kernel usually has quite a considerable changes, which might break things.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Turn screen on

Post by Akt » 08 Sep 2017 10:13

Input keyevent 26 is working fine on screen on.

Any app to disable wake lock??

Post Reply