Remote Control Issues after sleep mode - WORKAROUND!

Post your great articles here :)
bumerc
Administrator & Developer
Posts: 1649
Joined: Tue Oct 02, 2018 6:19 pm
Has thanked: 254 times
Been thanked: 342 times

#1

Problem
1. The supplied box remote control does not work after waking up from "sleep mode".
2. I have an Air Mouse, but waking the box from sleep mode does not work.

Workaround
We add the "nosleep" to Wakelocks.
Open the Android terminal and execute the following command:

Code: Select all

echo nosleep > /sys/power/wake_lock
or via the ADB-Shell session:

Code: Select all

adb connect <box_ip_addr>:5555
adb shell
echo nosleep > /sys/power/wake_lock
Enjoy!

- Use the arrow keys "Up and Down" to wake up from the Air Mouse.

Note - After a system restart, the Nosleep command must be entered repeatedly.

-----------------------------------------------------------------------------------------------------------------------------------

EDIT

If you want to enable the noosleep automatically, follow these steps (only for V2H):
1.

Code: Select all

adb shell
2. #Please copy this text completely and paste it in the terminal

Code: Select all

cat > /system/etc/init.d/template << EOF
#!/system/bin/sh

# activate nosleep
echo nosleep > /sys/power/wake_lock && echo "nosleep is activated"
EOF
3.

Code: Select all

cd /system/etc/init.d && cp -a 01Preinstall 17resume_remote
4.

Code: Select all

cp template 17resume_remote && sleep 1 && rm template
5.

Code: Select all

reboot
Nayam
Administrator & Developer
Posts: 1275
Joined: Mon Jun 11, 2018 11:58 pm
Has thanked: 195 times
Been thanked: 425 times
Contact:

#2

bumerc wrote: ↑Wed Feb 20, 2019 1:00 pm Problem
1. The supplied box remote control does not work after waking up from "sleep mode".
2. I have an Air Mouse, but waking the box from sleep mode does not work.

Workaround
We put the PowerManagerService.Display in "nosleep" state.
Open the Android terminal and execute the following command:

Code: Select all

echo nosleep > /sys/power/wake_lock
or via the ADB-Shell session:

Code: Select all

adb connect <box_ip_addr>:5555
adb shell
echo nosleep > /sys/power/wake_lock
Enjoy!

- Use the arrow keys "Up and Down" to wake up from the Air Mouse.

Note - After a system restart, the Nosleep command must be entered repeatedly.
Thanks for this!🙏
BE NICE, BE RESPECTFUL
RESPECT THE MODERATORS
PM ONLY WHEN IMPORTANT
ENJOY!
My Devices:
X96 Mini, A95X Pro, H96 Pro Stick, A95X Max
Lacix
Verified Member
Posts: 33
Joined: Tue Jan 22, 2019 11:15 am
Has thanked: 1 time
Been thanked: 5 times

#3

bumerc wrote: ↑Wed Feb 20, 2019 1:00 pm Note - After a system restart, the Nosleep command must be entered repeatedly.
"echo nosleep > /sys/power/wake_lock"

Is it possible to add this command to an init.d script?
bumerc
Administrator & Developer
Posts: 1649
Joined: Tue Oct 02, 2018 6:19 pm
Has thanked: 254 times
Been thanked: 342 times

#4

Lacix wrote: ↑Wed Feb 20, 2019 8:01 pm
bumerc wrote: ↑Wed Feb 20, 2019 1:00 pm Note - After a system restart, the Nosleep command must be entered repeatedly.
"echo nosleep > /sys/power/wake_lock"

Is it possible to add this command to an init.d script?
Yes, that is possible if the init.d works. I did not add it, as the USB ports and the sysled remain permanently active during sleep mode and maybe some users would not like it that much. :)
craser86
Verified Member
Posts: 28
Joined: Sat Jan 05, 2019 1:57 pm

#5

hi someone can guide me how to create nosleep first in the script.init.d? Thanks
User avatar
ricklar
Moderator
Posts: 889
Joined: Fri Nov 30, 2018 10:30 pm
Has thanked: 139 times
Been thanked: 249 times

#6

craser86 wrote: ↑Sat May 18, 2019 12:55 pm hi someone can guide me how to create nosleep first in the script.init.d? Thanks
Hi, if you are running v2H currently, look in the init.d folder Adam inserted a Wake_Lock script. I believe it may have been incorrect. (My box is back on v2FF, I was modifying v2H and end up going in circles and didn't realize my mistakes till was back on v2FF, lol)

But anyways use what bumerc posted to make new script through adb shell or terminal. Plus also delete or edit the Wake_Lock script if it is already in init.d like I believe there is in v2H
bumerc wrote: ↑Wed Feb 20, 2019 1:00 pm If you want to enable the nosleep automatically, follow these steps (only for V2H):
1.

Code: Select all

adb shell
2. #Please copy this text completely and paste it in the terminal

Code: Select all

cat > /system/etc/init.d/template << EOF
#!/system/bin/sh

# activate nosleep
echo nosleep > /sys/power/wake_lock && echo "nosleep is activated"
EOF
3.

Code: Select all

cd /system/etc/init.d && cp -a 01Preinstall 17resume_remote
4.

Code: Select all

cp template 17resume_remote && sleep 1 && rm template
5.

Code: Select all

reboot
Or you can use the EsNoteEditor in EsFile Explore with Root access On, and add the nosleep line to an existing script. I believe there is a script called 'AmlogicTune' in init.d that has same command line formating, then every boot the command will be enabled, so just insert this:

Code: Select all

echo nosleep > /sys/power/wake_lock
BE KIND, BE NICE, BE RESPECTFUL TO OTHERS, RESPECT THE MODERATORS,
*IMPORTANT NOTE* ONLY PM MODERATORS OR DEVELOPERS AS A LAST RESORT!!!

☢️ My test device: H96 Pro+ 3gb/32gb DDR4 ☢️ Plus own Tanix, Beelink, Alfawise, X96S, Odroid-N2, Khadas VIM3L, X3, ADT-3, X96-Air
GEARBEST.com
PLEASE ENJOY ATVX!
craser86
Verified Member
Posts: 28
Joined: Sat Jan 05, 2019 1:57 pm

#7

works perfectly, thanks a lot
Jagdeepmarahar
Posts: 8
Joined: Sat Jun 08, 2019 2:12 pm
Has thanked: 3 times

#8

bumerc wrote: ↑Wed Feb 20, 2019 1:00 pm Problem
1. The supplied box remote control does not work after waking up from "sleep mode".
2. I have an Air Mouse, but waking the box from sleep mode does not work.

Workaround
We add the "nosleep" to Wakelocks.
Open the Android terminal and execute the following command:

Code: Select all

echo nosleep > /sys/power/wake_lock
or via the ADB-Shell session:

Code: Select all

adb connect <box_ip_addr>:5555
adb shell
echo nosleep > /sys/power/wake_lock
Enjoy!

- Use the arrow keys "Up and Down" to wake up from the Air Mouse.

Note - After a system restart, the Nosleep command must be entered repeatedly.

-----------------------------------------------------------------------------------------------------------------------------------

EDIT

If you want to enable the noosleep automatically, follow these steps (only for V2H):
1.

Code: Select all

adb shell
2. #Please copy this text completely and paste it in the terminal

Code: Select all

cat > /system/etc/init.d/template << EOF
#!/system/bin/sh

# activate nosleep
echo nosleep > /sys/power/wake_lock && echo "nosleep is activated"
EOF
3.

Code: Select all

cd /system/etc/init.d && cp -a 01Preinstall 17resume_remote
4.

Code: Select all

cp template 17resume_remote && sleep 1 && rm template
5.

Code: Select all

reboot
Hi I'm trying to copy paste these commands in terminal app but when I paste it, no text is pasted in the command line. Plz help.
Nayam
Administrator & Developer
Posts: 1275
Joined: Mon Jun 11, 2018 11:58 pm
Has thanked: 195 times
Been thanked: 425 times
Contact:

#9

Jagdeepmarahar wrote: ↑Tue Jun 25, 2019 9:53 pm
bumerc wrote: ↑Wed Feb 20, 2019 1:00 pm Problem
1. The supplied box remote control does not work after waking up from "sleep mode".
2. I have an Air Mouse, but waking the box from sleep mode does not work.

Workaround
We add the "nosleep" to Wakelocks.
Open the Android terminal and execute the following command:

Code: Select all

echo nosleep > /sys/power/wake_lock
or via the ADB-Shell session:

Code: Select all

adb connect <box_ip_addr>:5555
adb shell
echo nosleep > /sys/power/wake_lock
Enjoy!

- Use the arrow keys "Up and Down" to wake up from the Air Mouse.

Note - After a system restart, the Nosleep command must be entered repeatedly.

-----------------------------------------------------------------------------------------------------------------------------------

EDIT

If you want to enable the noosleep automatically, follow these steps (only for V2H):
1.

Code: Select all

adb shell
2. #Please copy this text completely and paste it in the terminal

Code: Select all

cat > /system/etc/init.d/template << EOF
#!/system/bin/sh

# activate nosleep
echo nosleep > /sys/power/wake_lock && echo "nosleep is activated"
EOF
3.

Code: Select all

cd /system/etc/init.d && cp -a 01Preinstall 17resume_remote
4.

Code: Select all

cp template 17resume_remote && sleep 1 && rm template
5.

Code: Select all

reboot
Hi I'm trying to copy paste these commands in terminal app but when I paste it, no text is pasted in the command line. Plz help.
Use a keyboard and type these in then or use a different terminal app.
BE NICE, BE RESPECTFUL
RESPECT THE MODERATORS
PM ONLY WHEN IMPORTANT
ENJOY!
My Devices:
X96 Mini, A95X Pro, H96 Pro Stick, A95X Max
Jagdeepmarahar
Posts: 8
Joined: Sat Jun 08, 2019 2:12 pm
Has thanked: 3 times

#10

Nayam wrote: ↑Tue Jun 25, 2019 10:58 pm
Jagdeepmarahar wrote: ↑Tue Jun 25, 2019 9:53 pm
bumerc wrote: ↑Wed Feb 20, 2019 1:00 pm Problem
1. The supplied box remote control does not work after waking up from "sleep mode".
2. I have an Air Mouse, but waking the box from sleep mode does not work.

Workaround
We add the "nosleep" to Wakelocks.
Open the Android terminal and execute the following command:

Code: Select all

echo nosleep > /sys/power/wake_lock
or via the ADB-Shell session:

Code: Select all

adb connect <box_ip_addr>:5555
adb shell
echo nosleep > /sys/power/wake_lock
Enjoy!

- Use the arrow keys "Up and Down" to wake up from the Air Mouse.

Note - After a system restart, the Nosleep command must be entered repeatedly.

-----------------------------------------------------------------------------------------------------------------------------------

EDIT

If you want to enable the noosleep automatically, follow these steps (only for V2H):
1.

Code: Select all

adb shell
2. #Please copy this text completely and paste it in the terminal

Code: Select all

cat > /system/etc/init.d/template << EOF
#!/system/bin/sh

# activate nosleep
echo nosleep > /sys/power/wake_lock && echo "nosleep is activated"
EOF
3.

Code: Select all

cd /system/etc/init.d && cp -a 01Preinstall 17resume_remote
4.

Code: Select all

cp template 17resume_remote && sleep 1 && rm template
5.

Code: Select all

reboot
Hi I'm trying to copy paste these commands in terminal app but when I paste it, no text is pasted in the command line. Plz help.
Use a keyboard and type these in then or use a different terminal app.
Hi thanks for reply. I've instaled another terminal app which let me to paste from clipboard. but when i execute the first set of commands, following message appears from which it seems the app has not root access. but the app is also not requesting for root access.

bash: /system/etc/init.d/template: read-only file system
Post Reply