Alex Cheema 8 月之前
父節點
當前提交
e698ef6ab1
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      .github/optimize_performance.sh

+ 5 - 2
.github/optimize_performance.sh

@@ -39,10 +39,13 @@ safe_sysctl "kern.memorystatus_purge_on_warning" 0
 safe_sysctl "kern.memorystatus_purge_on_critical" 0
 safe_sysctl "kern.timer.coalescing_enabled" 0
 
-# Only try to set iogpu settings if they exist
-if sysctl -n kern.iogpu >/dev/null 2>&1; then
+# Check for integrated GPU using system_profiler
+if system_profiler SPDisplaysDataType | grep -q "Chipset Model: Apple"; then
+  log "Apple Silicon GPU detected, configuring GPU settings..."
   safe_sysctl "kern.iogpu.dynamic_memory_management" 0
   safe_sysctl "kern.iogpu.dynamic_memory_management_debug" 0
+else
+  log "Notice: Apple Silicon GPU not detected, skipping GPU-specific optimizations"
 fi
 
 # Metal and GPU optimizations