···4747 .spawn(move || {
4848 let mut detector = idle::create();
4949 let mut was_idle = false;
5050+ let mut had_successful_reading = false;
50515152 loop {
5253 std::thread::sleep(Duration::from_secs(5));
53545455 match detector.idle_duration() {
5556 Ok(Some(idle_dur)) if idle_dur >= threshold => {
5757+ had_successful_reading = true;
5658 if !was_idle {
5759 was_idle = true;
5860 let _ = cmd_tx.send(TimerCommand::IdleDetected { duration: idle_dur });
···6062 }
6163 Ok(Some(_)) => {
6264 // Idle time is below threshold — user is actively present.
6565+ had_successful_reading = true;
6366 if was_idle {
6467 was_idle = false;
6568 let _ = cmd_tx.send(TimerCommand::Resume);
···6770 }
6871 Ok(None) => {
6972 // Could not query idle time (session bus unavailable, display gone, etc.).
7070- // Treat as maximally idle so the timer stays paused rather than firing
7171- // breaks while the user is logged out.
7272- if !was_idle {
7373+ // Only treat as idle if we had a prior successful reading — this avoids
7474+ // pausing on startup before the session bus is fully available.
7575+ if had_successful_reading && !was_idle {
7376 was_idle = true;
7477 let _ = cmd_tx.send(TimerCommand::IdleDetected {
7578 duration: Duration::from_secs(u64::MAX),