Okay, but how? I compile LE from source, so I will try to find a permanent fix for this sutation, a source code patch would be the best.
The autostart.sh is just a temporary modification for one device only, but it is not enough.
I tried to figure out what process handles this, because systemd have a "kodi-lirc-suspend.service" script.
If I send the box to suspend mode, dmesg shows the last pressed button was ENTER (Power menu -> Suspend item selected).
The box is now in sleep state. I press the power button again. The box wakes up, LED changes from red to blue.
But there is no pressed button listed in dmesg. Kodi somehow still detects this button event, and it shows the power menu again.
I tried to override power button event: instant sleep instead of power menu.
But it causes an evil endless loop: wake up and back to suspend again...