From 246bf4af75bf7c30fc1ea6ca346a050008790d94 Mon Sep 17 00:00:00 2001 From: Petr Mikhalicin Date: Sat, 3 Jan 2026 20:16:20 +0500 Subject: [PATCH] backlight: Fix dimmed display doesn't go to sleep Firmware didn't start sleep countdown if 1. Display was already dimmed 2. Fade out timer was set You can reproduce this by: 1. Set fade out timer. For example, 500ms 2. Wait till display will be dimmed and go to sleep 3. Switch hold ON or plug headphones Change-Id: I27ca857aa8db4551bd9caad4815cd73a64bf6185 --- firmware/backlight.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/backlight.c b/firmware/backlight.c index a00483c070..ee7b147aee 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c @@ -387,7 +387,8 @@ static void backlight_setup_fade_up(void) static void backlight_setup_fade_down(void) { - if (bl_fade_out_step > 0) + /* Start fading display if it's not dimmed yet */ + if (bl_fade_out_step > 0 && bl_dim_current > 0) { backlight_dim(0); }