開放麒麟系統openKylin1.0安裝
sudo sed -i 's/archive.build.openkylin.top/mirrors.dotsrc.org/g' \
/etc/apt/sources.list
sudo apt install \
fcitx5 libfcitx5core-dev libfcitx5config-dev libfcitx5utils-dev \
cmake extra-cmake-modules gettext libfmt-dev \
git build-essential
git clone https://github.com/openvanilla/fcitx5-mcbopomofo.git
cd fcitx5-mcbopomofo
mkdir -p build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
make
sudo make install
sudo update-icon-caches /usr/share/icons/*
VBoxManage modifyvm "虛擬機名稱" --nested-hw-virt on
Ubuntu 禁用 Intel Turbo Boost 散熱控制方案
重要:先檢查 CPU 驅動類型
不同的 CPU 驅動需要使用不同的禁用方法,請先執行以下命令確認您的系統使用哪種驅動:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver
可能的結果:
- intel_pstate:較新的 Intel 處理器(6代以上通常支援 HWP)
- intel_cpufreq:較舊的 Intel 處理器或被動模式
- acpi-cpufreq:通用 ACPI 驅動
根據檢測結果,請跳到對應的方法章節。
事前測試:溫度監測(所有驅動通用)
在決定是否禁用 Turbo Boost 之前,建議先進行溫度測試,了解系統實際的散熱狀況。
1. 安裝監測工具
sudo apt update
sudo apt install psensor lm-sensors stress
2. 偵測感測器
sudo sensors-detect
執行過程中一路按 YES,完成後重新啟動服務:
sudo service kmod start
3. 開啟 psensor 監控
psensor
psensor 會顯示圖形化的溫度監控介面,可以即時查看各個感測器的溫度變化。
4. 進行壓力測試
stress --cpu 4 --timeout 60s
此命令會對 4 個 CPU 核心進行 60 秒的滿載測試,觀察 psensor 中的溫度是否飆升到危險區域。
溫度判斷標準
- <70°C:完全正常,不需要禁用 Turbo Boost
- 70-85°C:可接受範圍,長時間運行可考慮禁用
- >85°C:建議禁用 Turbo Boost 或改善散熱
- >95°C:危險!必須立即處理
方法一:intel_pstate 驅動
如果您的系統使用 intel_pstate 驅動,請使用此方法。
預備步驟
1. 修改 GRUB 配置
sudo nano /etc/default/grub
2. 添加內核參數
在 GRUB_CMDLINE_LINUX_DEFAULT 行添加 intel_pstate=no_turbo,修改後看起來像:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=no_turbo"
3. 更新 GRUB
sudo update-grub
Debian 系統如果沒有 update-grub 命令,可使用:
sudo grub-mkconfig -o /boot/grub/grub.cfg
創建系統服務(雙重保險)
1. 創建服務文件
sudo nano /etc/systemd/system/disable-turbo-boost.service
2. 添加以下服務配置
[Unit]
Description=Disable Intel Turbo Boost
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/bin/bash -c "echo '1' > /sys/devices/system/cpu/intel_pstate/no_turbo"
[Install]
WantedBy=multi-user.target
啟用服務
sudo systemctl enable disable-turbo-boost.service
sudo systemctl start disable-turbo-boost.service
驗證步驟
確認 Turbo Boost 狀態
cat /sys/devices/system/cpu/intel_pstate/no_turbo
返回 1 表示 Turbo Boost 已禁用,0 表示已啟用。
方法二:intel_cpufreq / acpi-cpufreq 驅動
如果您的系統使用 intel_cpufreq 或 acpi-cpufreq 驅動,前述的 intel_pstate=no_turbo 方法無效,需要使用 cpupower 工具。
安裝 cpupower 工具
sudo apt install linux-tools-common linux-tools-generic
如果安裝後找不到 cpupower 命令,可能需要安裝對應內核版本的工具:
sudo apt install linux-tools-$(uname -r)
設定省電模式(降低頻率上限)
臨時設定
sudo cpupower frequency-set --governor powersave
查看當前設定
cpupower frequency-info
永久生效:創建系統服務
1. 創建服務文件
sudo nano /etc/systemd/system/cpu-powersave.service
2. 添加以下服務配置
[Unit]
Description=Set CPU governor to powersave
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/usr/bin/cpupower frequency-set --governor powersave
[Install]
WantedBy=multi-user.target
3. 啟用服務
sudo systemctl enable cpu-powersave.service
sudo systemctl start cpu-powersave.service
驗證步驟
1. 檢查當前調頻器
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
應顯示 powersave
2. 檢查 CPU 頻率
lscpu | grep "MHz"
3. 檢查 boost 狀態(如果有此文件)
cat /sys/devices/system/cpu/cpufreq/boost
返回 0 表示 boost 已禁用,1 表示已啟用。
進階:手動禁用 Boost(如果支援)
某些系統可能支援直接禁用 boost:
echo "0" | sudo tee /sys/devices/system/cpu/cpufreq/boost
要永久生效,可創建對應的 systemd 服務:
sudo nano /etc/systemd/system/disable-cpu-boost.service
內容:
[Unit]
Description=Disable CPU Boost
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/bin/bash -c "echo '0' > /sys/devices/system/cpu/cpufreq/boost"
[Install]
WantedBy=multi-user.target
啟用:
sudo systemctl enable disable-cpu-boost.service
sudo systemctl start disable-cpu-boost.service
通用驗證與監測
檢查 CPU 頻率變化
即時監控頻率
watch -n 1 "lscpu | grep MHz"
或使用更詳細的輸出
watch -n 1 "cat /proc/cpuinfo | grep MHz"
壓力測試驗證
執行壓力測試,同時觀察頻率是否保持在基礎頻率以下:
stress --cpu 4 --timeout 30s &
watch -n 1 "lscpu | grep MHz"
使用 cpupower 詳細查看
cpupower frequency-info
輸出示例:
analyzing CPU 0:
driver: intel_cpufreq
hardware limits: 800 MHz - 2.50 GHz
available cpufreq governors: conservative ondemand userspace powersave performance
current policy: frequency should be within 800 MHz and 2.50 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency: 1.20 GHz (asserted by call to hardware)
boost state support:
Supported: yes
Active: no
注意事項
- 適用於:Ubuntu、Lubuntu、openKylin、Debian (含 MATE 版本) 等 Debian 系發行版
- 硬體要求:Intel CPU(Mac Mini 2012、筆記型電腦等散熱受限設備特別適用)
- 驅動差異:必須先確認使用的驅動類型,不同驅動使用不同方法
- 預期效果:降低功耗 20-40%,將溫度控制在安全範圍內
- 性能影響:峰值性能會下降 15-30%,適合長時間運行的伺服器或輕量級應用
故障排除
問題 1:找不到 intel_pstate 目錄
解決方案:您的系統可能使用 intel_cpufreq 或 acpi-cpufreq 驅動,請使用方法二。
問題 2:cpupower 命令找不到
解決方案:
sudo apt install linux-tools-$(uname -r)
問題 3:設定後頻率仍然很高
解決方案:
- 確認 BIOS 中 Turbo Boost 未被強制啟用
- 檢查服務是否正確啟動:
sudo systemctl status [服務名稱] - 重新啟動系統後再次驗證
問題 4:權限被拒絕
解決方案:某些系統 BIOS 會鎖定 Turbo Boost 設定,需要進入 BIOS 關閉。
臨時控制 Turbo Boost
intel_pstate 驅動
臨時禁用:
echo "1" | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo
臨時啟用:
echo "0" | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo
intel_cpufreq / acpi-cpufreq 驅動
切換到省電模式:
sudo cpupower frequency-set --governor powersave
切換到性能模式:
sudo cpupower frequency-set --governor performance
總結
這個方案提供了針對不同 CPU 驅動的完整 Turbo Boost 控制方法:
- 先檢查驅動類型:使用
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver - intel_pstate 驅動:使用 GRUB 參數 + systemd 服務控制 no_turbo
- 其他驅動:使用 cpupower 工具設定調頻器和頻率限制
建議在實際使用中持續使用 psensor 監控系統性能和溫度,根據實際需求調整設定。對於需要長時間運行且散熱條件受限的設備(如老舊 Mac Mini、小型伺服器),適當降低 CPU 功耗是延長硬體壽命的合理選擇。
2025/12/09 更新
安裝新酷音輸入法
sudo apt install fcitx5 fcitx5-chewing fcitx5-config-qt fcitx5-chinese-addons
fcitx5: 輸入法框架
fcitx5-chewing: 新酷音
fcitx5-config-qt: 圖形化設定工具(在 Ubuntu/Debian 叫這個,不是 fcitx5-configtool)
fcitx5-chinese-addons: 常用中文擴充(選字列、詞庫等)
字型精簡安裝(選用開源繁中字型):
sudo apt install fonts-arphic-ukai fonts-arphic-uming
設定輸入法框架
設為預設輸入法:
選擇 fcitx5,套用後登出或重開機。
加入環境變數(LXQt/LXDE 常需要手動): 在 ~/.xprofile 加入:
然後重新登入。
確保自動啟動:
Lubuntu「Session and Startup」或「Autostart」中新增執行 fcitx5,避免面板不出現。
在設定工具中加入新酷音
開啟「Fcitx5 Configuration」(由 fcitx5-config-qt 提供)。
取消「只顯示目前語言」。
新增 Chewing(新酷音) 到輸入法列表,並將「Keyboard-英語」置頂、Chewing 放後,以便切換。
常用快捷鍵:
Ctrl + 空白鍵: 切換輸入法
Shift: 切換中/英文
Shift + 空白鍵: 全形/半形
Ctrl + Shift + F: 簡/繁切換




留言
張貼留言