However I sometimes need to unplug and plug the device again in order to force a mode transition and I don't want an immediate lock. So it turns out now I get other complications:
1) udev RUN action need to be *quick* it can't even wait 5 seconds
2) so my script forked to another one in background that will do the timeout loop
3) except even that script is killed before the loop ends so the screen is not locked