From 587c8d2f2ff1092e348a88bb53089c4cef11f254 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Mon, 16 Jun 2025 11:40:41 -0600 Subject: [PATCH] Catch intel GPU stats decode error --- frigate/util/services.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/frigate/util/services.py b/frigate/util/services.py index b9d65ce2f..137e3aa20 100644 --- a/frigate/util/services.py +++ b/frigate/util/services.py @@ -306,11 +306,14 @@ def get_intel_gpu_stats(sriov: bool) -> Optional[dict[str, str]]: if sriov: intel_gpu_top_command += ["-d", "sriov"] - p = sp.run( - intel_gpu_top_command, - encoding="ascii", - capture_output=True, - ) + try: + p = sp.run( + intel_gpu_top_command, + encoding="ascii", + capture_output=True, + ) + except UnicodeDecodeError: + return None # timeout has a non-zero returncode when timeout is reached if p.returncode != 124: