From 8407ed14822ddfb9e8f95ae8bbc0a32bf9795165 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Mon, 30 Dec 2024 17:10:04 +0100 Subject: [PATCH] arc: only add i915 if system support it Signed-off-by: AuxXxilium --- files/initrd/opt/arc/arc.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/initrd/opt/arc/arc.sh b/files/initrd/opt/arc/arc.sh index 85753829..8f437442 100755 --- a/files/initrd/opt/arc/arc.sh +++ b/files/initrd/opt/arc/arc.sh @@ -371,7 +371,9 @@ function arcVersion() { initConfigKey "addons.sensors" "" "${USER_CONFIG_FILE}" fi if [ "${PLATFORM}" = "apollolake" ] || [ "${PLATFORM}" = "geminilake" ]; then - initConfigKey "addons.i915" "" "${USER_CONFIG_FILE}" + if [ -n "${IGPUID}" ]; then grep -iq "${IGPUID}" ${ARC_PATH}/include/i915ids && IGPU="all" || IGPU="epyc7002"; else IGPU=""; fi + [ "${IGPU}"="all" ] && initConfigKey "addons.i915" "" "${USER_CONFIG_FILE}" || true + fi fi if echo "${PAT_URL}" 2>/dev/null | grep -q "7.2.2"; then initConfigKey "addons.allowdowngrade" "" "${USER_CONFIG_FILE}"