print(display.lightstate) always returns display.STATE_LCD_OFF after power-up
At the same time, the device screen is turned on.
This variable starts to work normally only after writing any value to it.
Perhaps the variable does not have an initial initialization.