Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display blanking #83

Open
Habbie opened this issue May 8, 2024 · 9 comments
Open

display blanking #83

Habbie opened this issue May 8, 2024 · 9 comments
Milestone

Comments

@Habbie
Copy link
Member

Habbie commented May 8, 2024

On toon1:

eneco-001-357535:~# echo 1 > /sys/class/graphics/fb0/blank  # blanks screen
eneco-001-357535:~# echo 0 > /sys/class/graphics/fb0/blank  # restores screen

I wonder if we can expose this portably, through LVGL perhaps.

@Habbie Habbie mentioned this issue May 20, 2024
@Habbie
Copy link
Member Author

Habbie commented May 20, 2024

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.

@Habbie Habbie added the v0.1 label May 20, 2024
@Habbie Habbie added this to the v0.1 milestone May 20, 2024
@Habbie Habbie removed the v0.1 label May 20, 2024
@Habbie
Copy link
Member Author

Habbie commented May 30, 2024

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.

@Habbie
Copy link
Member Author

Habbie commented May 30, 2024

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.

@Habbie
Copy link
Member Author

Habbie commented May 30, 2024

restarting voorkant unblanks the screen, so it seems like LVGL's fbdev driver knows -something-

@Habbie
Copy link
Member Author

Habbie commented Jun 3, 2024

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.

@Habbie
Copy link
Member Author

Habbie commented Jun 3, 2024

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.

@Habbie
Copy link
Member Author

Habbie commented Jun 3, 2024

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-.

@Habbie
Copy link
Member Author

Habbie commented Jun 3, 2024

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.

@Habbie
Copy link
Member Author

Habbie commented Oct 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant