[SOLVED] How to stop N2 going to sleep?

My N2 has the annoying habit of going to sleep overnight and the wake from sleep feature cannot then wake it again. The strange thing is the going off of the TV isn’t the trigger as it stays awake for a time after the TV is off. I have CEC disabled so this shouldn’t be an issue. I have scheduled tasks which happen overnight which this messes with so i want to stop it going to sleep and remain on all the time.

Can’t identify the setting to achieve this.


Never happened to me. What else could put it to sleep mode if not CEC?

No RTC installed.


Remove HDMI cable and check if it sleeps so you can be sure that is not CEC

Will give it a try.


Just to close this out. With HDMI plugged in it always goes to sleep, with it unplugged it doesn’t. This confirms it is CEC related but none of the CEC functions stop it.

I had to edit the config.INI file and enable the CEC mask and set it to Zero. This stops the N2 from going to sleep.


I’m seeing similar things on my C4. How do you set this flag? I’m in the config.ini and see the following…

# HDMI CEC Control
#   Setup custom options by enable these flags:
#     Function                   bit
#     CEC_FUNC_MASK              0
#     ONE_TOUCH_PLAY_MASK        1
#     AUTO_POWER_ON_MASK         3
#     CEC_INPUT_MASK             5
#     ACTIVE_SOURCE_MASK         6

7f is 127 decimal, = binary 1111111
ie 7 bits lhs is msb and rhs is lsb.
therefore all bits are on. To make bit zero = off change it to a zero and add the rest.
which is 126.
or 1 less than 7F becomes 7E. this sets bit zero off.
so value changed from cec_func_config=7f to

1 Like

Thank you for not just giving the answer but explaining… It’s been a while since I’ve done bit operations :smiley:

Phew! Glad i remembered myself, good exercise for the old brain cells.
glad it made sense.

How do i access the config.ini in order to edit it? Mine is doing the same thing

To edit config.ini:

ssh to CE
mount -o rw,remount /flash
nano /flash/config.ini


I also found that altering the CEC flag to 7e prevents sleeping on the Ugoos AM6. However I’ve also noticed that after a reboot the flag is re-set to 7f

In the file it states that these things are ‘Set by CoreELEC Settings’ … so maybe there is something overwriting this?

You should be able to set it again at boot by using autostart.sh


To be more correct: set by libCEC settings in Kodi.

About | FAQ | Terms of Service | Privacy Policy | Legal Notice