diff --git a/locker/src/monitor.rs b/locker/src/monitor.rs index fcf7e4a..276e843 100644 --- a/locker/src/monitor.rs +++ b/locker/src/monitor.rs @@ -547,7 +547,7 @@ fn find_backlight_control(conn: &xcb::Connection, output: randr::Output) -> anyh if let Ok(reply) = conn.wait_for_reply(cookie) { let values = reply.valid_values(); if reply.range() && values.len() == 2 { - let min_level = values[0]; + let min_level = values[0] + 1; let max_level = values[1]; let range = max_level - min_level; if range > 0 { @@ -577,7 +577,7 @@ fn find_backlight_control(conn: &xcb::Connection, output: randr::Output) -> anyh debug!("Found sysfs backlight control at {:?}", cur_path); return Ok(Some(BacklightControl { location: BacklightLocation::Sysfs(cur_path), - min_level: 0, + min_level: 1, max_level, step: calc_step(0, max_level), }));