I'll try to explain a little better:
The issue happens when resetting the camera to companies defaults, afterwards CHDKs "Disable LCD off"-"Always"-feature does not work, the camera shuts down nevertheless. Even when the script at the end explicitly sets "Disable LCD off" to "never" and then "Always" again using set_config_value(67,0), then set_config_value(67,3)
My rig works like this now:
1. When I turn on a camera a autostart-script starts on the camera, which creates two files: RESET.TXT and INIT.TXT which indicate a) that the camera has to be reset to the companies defaults and b) that the photographic parameters have to be initialized.
2. Via CHDKPTP and multicam.lua I check which cams have a RESET.TXT present. To these cameras I upload and start a script that resets the camera to the companies defaults - with click("xxx") and then adjust some stuff in the tools menu, e.g. no sound, IS off and all that.
At the end of this script I try to prevent the display to be turned of by setting set_config_value(67), although I had set it to "Always" before manually in CHDKs menu. When waiting long enough at this point the camera will shut down although it should not happen. But I can prevent the shutdown by sending any command via CHDK, e.g. click("up"). Nevertheless I would like to avoid that, because I would have to run another step in the initialization mechanism.
3. Via CHDKPTP and multicam.lua I check which cameras have an INIT.TXT. To these camera I upload and start a script that brings all the photographic parameters to their values, like white balance, ISO and so on.
@ phil: I'd really like to avoid rebooting the camera after RESET.TXT, I was just trying to avoid the shutdown of the LCD with it. And it works like this too, but not when using "post_levent_to_ui(4458)" but reboot() in the script. Unfortunately reboot() does not reboot the cameras reliable, because they do not start reliable (see second issue described here later).
Thus you are right, there is no need of a shutdown and actually but it would prevent the display to turn off if I could use "reboot()". The post_levent_to_ui(4458) I cannot use either, because it recalls the photographic parameters as they were set BEFORE resetting the camera to the companies default value. All my custom adjustments I made in the tools menu after the reset will be kept, not white balance, ISO and so on! Also a long sleep() before post_levent_to_ui(4458) does not help, the camera has enough time to save everything.
@waterwingz: The startup failure that happens sporadic but quite often and since I am using CHDK happens whether I have an autostart.lua running or not. It was happening with my very old CHDK version I had all the time running, and it happens with the newest version too. I happens both when trying to turn on the camera manually (in play and rec mode) and when trying to do a reboot from a script. All I can say is that I have the feeling it happens the more often the longer I have the cameras powered on.
Thanks!