From e3ba6492f9e7d15844a74a818bbce17d7a43fe95 Mon Sep 17 00:00:00 2001 From: Daniel Koepping Date: Thu, 30 Jul 2026 17:33:25 -0700 Subject: [PATCH] fix big model alert (#38500) --- openpilot/selfdrive/selfdrived/selfdrived.py | 10 ++++++---- openpilot/selfdrive/ui/mici/onroad/hud_renderer.py | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/openpilot/selfdrive/selfdrived/selfdrived.py b/openpilot/selfdrive/selfdrived/selfdrived.py index 9da68bb002..f76c161acd 100755 --- a/openpilot/selfdrive/selfdrived/selfdrived.py +++ b/openpilot/selfdrive/selfdrived/selfdrived.py @@ -167,7 +167,8 @@ class SelfdriveD: big_active = self.params.get("UsbGpuActive") usbgpu_present = self.sm['deviceState'].chestnutPresent - big_failed = big_active is False or (self.big_model_active and not usbgpu_present) + model_unavailable = big_active is True and self.sm.seen['modelV2'] and not self.sm.alive['modelV2'] + big_failed = big_active is False or model_unavailable or (self.big_model_active and not usbgpu_present) if big_failed and not self.big_model_failed: self.events.add(EventName.bigModelFailed) self.big_model_failed = big_failed @@ -175,9 +176,7 @@ class SelfdriveD: # soft disable if the big model fails if big_active: self.big_model_active = True - if self.enabled and self.big_model_active and (not big_active or not usbgpu_present): - self.events.add(EventName.modeldLagging) - if not self.enabled: + if not self.enabled and not model_unavailable: self.big_model_active = False if self.sm.recv_frame['lateralManeuverPlan'] > 0: @@ -343,6 +342,9 @@ class SelfdriveD: # All events here should at least have NO_ENTRY and SOFT_DISABLE. num_events = len(self.events) + if self.big_model_active and big_failed: + self.events.add(EventName.modeldLagging) + not_running = {p.name for p in self.sm['managerState'].processes if not p.running and p.shouldBeRunning} if self.sm.recv_frame['managerState'] and len(not_running): if not_running != self.not_running_prev: diff --git a/openpilot/selfdrive/ui/mici/onroad/hud_renderer.py b/openpilot/selfdrive/ui/mici/onroad/hud_renderer.py index 90457868ea..02f3fa1d98 100644 --- a/openpilot/selfdrive/ui/mici/onroad/hud_renderer.py +++ b/openpilot/selfdrive/ui/mici/onroad/hud_renderer.py @@ -196,6 +196,8 @@ class HudRenderer(Widget): return big_failed = (ui_state.usbgpu_active is False or not ui_state.sm['deviceState'].chestnutPresent or + (ui_state.usbgpu_active is True and ui_state.sm.recv_frame['modelV2'] > ui_state.started_frame and + not ui_state.sm.alive['modelV2']) or (ui_state.usbgpu_active is None and ui_state.sm.recv_frame['modelV2'] > ui_state.started_frame)) self._small_model_engaged &= big_failed if ui_state.usbgpu_loading or (ui_state.usbgpu_active is None and not big_failed):