jernej todays version works only thing confusing a bit is that you land back in the shutdown dialog.
Tested only with the button, not the remote.
Pressing the button while running will bring up the shutdown dialog, a second press hides it again.
found my original remote, no effect, when pressing the button on the x2 it didn't come alive again, like yesterday.
I think the difference was that my first triel let it asleep only a very short time, I reactivated before the TV showed no signal, the second time, when it didn't come back it took a bit longer due to reying the remote
My assumption was wrong, while doing some further tests I realised that actually the remote's red power button, when pressed while in sleep, triggers the freeze of kodi, not the duration of the sleep.
Also interesting fact is that SSH keeps alive but is frozen the whole time the box is asleep, no reconnection necessary after waking up, it then even parses whatever I was typing while x2 was sleepin.
I think it's at random if it's working or not...
Would it also be possible to gracefully shutdown Linux and restart it by the button? If I'm shutting down it's not powering off, but shows "reboot: System halted", waking it back up is impossible, except by power cycling.
I don't mind waiting for a full boot, bit getting up and connecting power is annoying, sleep is not my concern, it sleeps also well if all playback is stopped and tv switcjed to different input...