This commit is contained in:
Alex Cheema
2024-12-11 16:40:21 +00:00
parent b7bab80ec8
commit 41902f716f
2 changed files with 10 additions and 5 deletions
+7 -2
View File
@@ -18,8 +18,13 @@ def check_system_state():
# Add macOS-specific checks
try:
# Check powermetrics
power_metrics = subprocess.run(['sudo', 'powermetrics', '-n', '1', '-i', '1000', '--show-process-energy'],
capture_output=True, text=True)
try:
power_metrics = subprocess.run(['powermetrics', '-n', '1', '-i', '1000', '--show-process-energy'],
capture_output=True, text=True)
except:
# Try with sudo if direct access fails
power_metrics = subprocess.run(['sudo', 'powermetrics', '-n', '1', '-i', '1000', '--show-process-energy'],
capture_output=True, text=True)
print("\nPower Metrics:", power_metrics.stdout, flush=True)
# Check thermal state
+3 -3
View File
@@ -57,9 +57,9 @@ jobs:
# Apply MLX optimizations
./configure_mlx.sh
# Disable CPU throttling
sudo pmset -a processorperf 2
sudo pmset -a gpuswitch 2
# Disable CPU throttling (correct syntax for M-series Macs)
sudo pmset -a powermode 0 2>/dev/null || echo "Failed to set power mode"
sudo pmset -a gpuswitch 2 2>/dev/null || echo "Failed to set GPU mode"
# Check current state
pmset -g