顯示頁面舊版反向連結Fold/unfold all回到頁頂 本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得它不應被鎖上,請詢問管理員。 ====== Linux 內設定 CPU 頻率的方式 ====== * 安裝環境 Debian 12.1 ===== 安裝方式 ===== * <cli>apt install cpufrequtils</cli> ===== 使用方式 ===== * 查詢目前 CPU 個核心執行頻率 cpufreq-info ++看結果|<cli> # cpufreq-info cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009 Report errors and bugs to cpufreq@vger.kernel.org, please. analyzing CPU 0: driver: intel_pstate CPUs which run at the same hardware frequency: 0 CPUs which need to have their frequency coordinated by software: 0 maximum transition latency: 4294.55 ms. hardware limits: 400 MHz - 4.50 GHz available cpufreq governors: performance, powersave current policy: frequency should be within 400 MHz and 4.50 GHz. The governor "powersave" may decide which speed to use within this range. current CPU frequency is 2.70 GHz. analyzing CPU 1: driver: intel_pstate CPUs which run at the same hardware frequency: 1 CPUs which need to have their frequency coordinated by software: 1 maximum transition latency: 4294.55 ms. hardware limits: 400 MHz - 4.50 GHz available cpufreq governors: performance, powersave current policy: frequency should be within 400 MHz and 4.50 GHz. The governor "powersave" may decide which speed to use within this range. current CPU frequency is 2.70 GHz. analyzing CPU 2: driver: intel_pstate CPUs which run at the same hardware frequency: 2 CPUs which need to have their frequency coordinated by software: 2 maximum transition latency: 4294.55 ms. hardware limits: 400 MHz - 4.50 GHz available cpufreq governors: performance, powersave current policy: frequency should be within 400 MHz and 4.50 GHz. The governor "powersave" may decide which speed to use within this range. current CPU frequency is 2.70 GHz. analyzing CPU 3: driver: intel_pstate CPUs which run at the same hardware frequency: 3 CPUs which need to have their frequency coordinated by software: 3 maximum transition latency: 4294.55 ms. hardware limits: 400 MHz - 4.50 GHz available cpufreq governors: performance, powersave current policy: frequency should be within 400 MHz and 4.50 GHz. The governor "powersave" may decide which speed to use within this range. current CPU frequency is 1.40 GHz. analyzing CPU 4: driver: intel_pstate CPUs which run at the same hardware frequency: 4 CPUs which need to have their frequency coordinated by software: 4 maximum transition latency: 4294.55 ms. hardware limits: 400 MHz - 4.50 GHz available cpufreq governors: performance, powersave current policy: frequency should be within 400 MHz and 4.50 GHz. The governor "powersave" may decide which speed to use within this range. current CPU frequency is 1.40 GHz. analyzing CPU 5: driver: intel_pstate CPUs which run at the same hardware frequency: 5 CPUs which need to have their frequency coordinated by software: 5 maximum transition latency: 4294.55 ms. hardware limits: 400 MHz - 4.50 GHz available cpufreq governors: performance, powersave current policy: frequency should be within 400 MHz and 4.50 GHz. The governor "powersave" may decide which speed to use within this range. current CPU frequency is 1.34 GHz. analyzing CPU 6: driver: intel_pstate CPUs which run at the same hardware frequency: 6 CPUs which need to have their frequency coordinated by software: 6 maximum transition latency: 4294.55 ms. hardware limits: 400 MHz - 4.50 GHz available cpufreq governors: performance, powersave current policy: frequency should be within 400 MHz and 4.50 GHz. The governor "powersave" may decide which speed to use within this range. current CPU frequency is 2.70 GHz. analyzing CPU 7: driver: intel_pstate CPUs which run at the same hardware frequency: 7 CPUs which need to have their frequency coordinated by software: 7 maximum transition latency: 4294.55 ms. hardware limits: 400 MHz - 4.50 GHz available cpufreq governors: performance, powersave current policy: frequency should be within 400 MHz and 4.50 GHz. The governor "powersave" may decide which speed to use within this range. current CPU frequency is 2.70 GHz. </cli>++ * 設定 CPU 運行模式 powersave(省電模式), userspace(使用者自訂), ondemand(自動調整), conservative(保守模式), performance(高效能模式) Exp. 設定為 powersave<cli> echo "GOVERNOR=\"powersave\"" > /etc/default/cpufrequtils systemctl restart cpufrequtils </cli> ===== 參考網址 ===== * https://sunpma.com/115.html {{tag>linux cpu}} tech/cpufrequtils.txt 上一次變更: 2023/09/29 21:07由 jonathan