Open Habbie opened 6 months ago
This is not optional; Toon's software might blank the screen before we ssh in to start voorkant, and sometimes it even blanks the screen while voorkant is running.
This is not optional; Toon's software might blank the screen before we ssh in to start voorkant, and sometimes it even blanks the screen while voorkant is running.
this happens consistently on a 5.49.19. It does not happen on 5.5.7.
this happens consistently on a 5.49.19. It does not happen on 5.5.7.
and just as i post that, it happens on the 5.5.7 too.
restarting voorkant unblanks the screen, so it seems like LVGL's fbdev driver knows -something-
sometimes it even blanks the screen while voorkant is running.
this turns out to be Linux doing console blanking, likely not instructed by Qt (found via SO inside Toon's software, but this shows how they manage (part of) blanking at least.
That Qt snippet, or https://www.man7.org/linux/man-pages/man4/console_codes.4.html (look for ESC [ 9 ; n ]
) shows us how to manage or disable console blanking. To unblock this for v0.1, I'll add the ESC[9 thing to our startup too and see if it manages to keep the screen on permanently.
restarting voorkant unblanks the screen, so it seems like LVGL's fbdev driver knows -something-
display/fbdev.c: if (ioctl(fbfd, FBIOBLANK, FB_BLANK_UNBLANK) != 0) {
the lv fbdev driver indeed does this on init.
I wonder if we can expose this portably, through LVGL perhaps.
I don't see any entrypoints in LVGL for doing this in a portable way, but we can just do it ourselves then. The ioctl
mentioned above might be easier than talking to /sys
. Besides blanking after X time and waking up on touch, I kind of like the in between phase where the Toon software goes black background with somewhat minimalistic display of entities.
Fun discovery: setting display brightness to 0 (echo 0 > /sys/devices/platform/ed2.0-bl.0/backlight/ed2.0-bl.0/ramp_brightness
) blanks the screen, but recovering from it (10 or up is fine) is -immediate-.
In the absence (I think) of an actual ambient brightness sensor, maybe we should emulate f.lux for brightness management? We could also expose our brightness setting to HA to be managed from there.
Only somewhat related, I find our current UI, and also Toon's non-dimmed UI, quite bright/white. We should definitely have a dark mode.
On toon1:
I wonder if we can expose this portably, through LVGL perhaps.