這篇文章將為大家詳細(xì)講解有關(guān)linux中如何使用TLP,小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。
成都創(chuàng)新互聯(lián)公司主要從事網(wǎng)頁(yè)設(shè)計(jì)、PC網(wǎng)站建設(shè)(電腦版網(wǎng)站建設(shè))、wap網(wǎng)站建設(shè)(手機(jī)版網(wǎng)站建設(shè))、成都響應(yīng)式網(wǎng)站建設(shè)、程序開(kāi)發(fā)、網(wǎng)站優(yōu)化、微網(wǎng)站、微信小程序開(kāi)發(fā)等,憑借多年來(lái)在互聯(lián)網(wǎng)的打拼,我們?cè)诨ヂ?lián)網(wǎng)網(wǎng)站建設(shè)行業(yè)積累了豐富的成都網(wǎng)站設(shè)計(jì)、網(wǎng)站制作、網(wǎng)站設(shè)計(jì)、網(wǎng)絡(luò)營(yíng)銷(xiāo)經(jīng)驗(yàn),集策劃、開(kāi)發(fā)、設(shè)計(jì)、營(yíng)銷(xiāo)、管理等多方位專(zhuān)業(yè)化運(yùn)作于一體。
TLP 是一款自由開(kāi)源的高級(jí)電源管理工具,可在不進(jìn)行任何配置更改的情況下延長(zhǎng)電池壽命。
由于它的默認(rèn)配置已針對(duì)電池壽命進(jìn)行了優(yōu)化,因此你可能只需要安裝,然后就忘記它吧。
此外,它可以高度定制化,以滿足你的特定要求。TLP 是一個(gè)具有自動(dòng)后臺(tái)任務(wù)的純命令行工具。它不包含GUI。
TLP 適用于各種品牌的筆記本電腦。設(shè)置電池充電閾值僅適用于 IBM/Lenovo ThinkPad。
所有 TLP 設(shè)置都存儲(chǔ)在 /etc/default/tlp
中。其默認(rèn)配置提供了開(kāi)箱即用的優(yōu)化的節(jié)能設(shè)置。
以下 TLP 設(shè)置可用于自定義,如果需要,你可以相應(yīng)地進(jìn)行必要的更改。
內(nèi)核筆記本電腦模式和臟緩沖區(qū)超時(shí)
處理器頻率調(diào)整,包括 “turbo boost”/“turbo core”
限制***/最小的 P 狀態(tài)以控制 CPU 的功耗
HWP 能源性能提示
用于多核/超線程的功率感知進(jìn)程調(diào)度程序
處理器性能與節(jié)能策略(x86_energy_perf_policy
)
硬盤(pán)高級(jí)電源管理級(jí)別(APM)和降速超時(shí)(按磁盤(pán))
AHCI 鏈路電源管理(ALPM)與設(shè)備黑名單
PCIe 活動(dòng)狀態(tài)電源管理(PCIe ASPM)
PCI(e) 總線設(shè)備的運(yùn)行時(shí)電源管理
Radeon 圖形電源管理(KMS 和 DPM)
Wifi 省電模式
關(guān)閉驅(qū)動(dòng)器托架中的光盤(pán)驅(qū)動(dòng)器
音頻省電模式
I/O 調(diào)度程序(按磁盤(pán))
USB 自動(dòng)暫停,支持設(shè)備黑名單/白名單(輸入設(shè)備自動(dòng)排除)
在系統(tǒng)啟動(dòng)和關(guān)閉時(shí)啟用或禁用集成的 wifi、藍(lán)牙或 wwan 設(shè)備
在系統(tǒng)啟動(dòng)時(shí)恢復(fù)無(wú)線電設(shè)備狀態(tài)(從之前的關(guān)機(jī)時(shí)的狀態(tài))
無(wú)線電設(shè)備向?qū)В涸诰W(wǎng)絡(luò)連接/斷開(kāi)和停靠/取消??繒r(shí)切換無(wú)線電
禁用 LAN 喚醒
掛起/休眠后恢復(fù)集成的 WWAN 和藍(lán)牙狀態(tài)
英特爾處理器的動(dòng)態(tài)電源降低 —— 需要內(nèi)核和 PHC-Patch 支持
電池充電閾值 —— 僅限 ThinkPad
重新校準(zhǔn)電池 —— 僅限 ThinkPad
TLP 包在大多數(shù)發(fā)行版官方存儲(chǔ)庫(kù)中都可用,因此,使用發(fā)行版的 包管理器 來(lái)安裝它。
對(duì)于 Fedora 系統(tǒng),使用 DNF 命令 安裝 TLP。
$ sudo dnf install tlp tlp-rdw
ThinkPad 需要一些附加軟件包。
$ sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm$ sudo dnf install http://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fc$(rpm -E %fedora).noarch.rpm$ sudo dnf install akmod-tp_smapi akmod-acpi_call kernel-devel
安裝 smartmontool 以顯示 tlp-stat 中 S.M.A.R.T. 數(shù)據(jù)。
$ sudo dnf install smartmontools
對(duì)于 Debian/Ubuntu 系統(tǒng),使用 APT-GET 命令 或 APT 命令 安裝 TLP。
$ sudo apt install tlp tlp-rdw
ThinkPad 需要一些附加軟件包。
$ sudo apt-get install tp-smapi-dkms acpi-call-dkms
安裝 smartmontool 以顯示 tlp-stat 中 S.M.A.R.T. 數(shù)據(jù)。
$ sudo apt-get install smartmontools
當(dāng)基于 Ubuntu 的系統(tǒng)的官方軟件***時(shí)時(shí),請(qǐng)使用以下 PPA 存儲(chǔ)庫(kù),該存儲(chǔ)庫(kù)提供***版本。運(yùn)行以下命令以使用 PPA 安裝 TLP。
$ sudo apt-get install tlp tlp-rdw
對(duì)于基于 Arch Linux 的系統(tǒng),使用 Pacman 命令 安裝 TLP。
$ sudo pacman -S tlp tlp-rdw
ThinkPad 需要一些附加軟件包。
$ pacman -S tp_smapi acpi_call
安裝 smartmontool 以顯示 tlp-stat 中 S.M.A.R.T. 數(shù)據(jù)。
$ sudo pacman -S smartmontools
對(duì)于基于 Arch Linux 的系統(tǒng),在啟動(dòng)時(shí)啟用 TLP 和 TLP-Sleep 服務(wù)。
$ sudo systemctl enable tlp.service$ sudo systemctl enable tlp-sleep.service
對(duì)于基于 Arch Linux 的系統(tǒng),你還應(yīng)該屏蔽以下服務(wù)以避免沖突,并確保 TLP 的無(wú)線電設(shè)備切換選項(xiàng)的正確操作。
$ sudo systemctl mask systemd-rfkill.service$ sudo systemctl mask systemd-rfkill.socket
對(duì)于 RHEL/CentOS 系統(tǒng),使用 YUM 命令 安裝 TLP。
$ sudo yum install tlp tlp-rdw
安裝 smartmontool 以顯示 tlp-stat 中 S.M.A.R.T. 數(shù)據(jù)。
$ sudo yum install smartmontools
對(duì)于 openSUSE Leap 系統(tǒng),使用 Zypper 命令 安裝 TLP。
$ sudo zypper install TLP
安裝 smartmontool 以顯示 tlp-stat 中 S.M.A.R.T. 數(shù)據(jù)。
$ sudo zypper install smartmontools
成功安裝 TLP 后,使用以下命令啟動(dòng)服務(wù)。
$ systemctl start tlp.service
$ sudo tlp-stat -b或$ sudo tlp-stat --battery
--- TLP 1.1 -------------------------------------------- +++ Battery Status/sys/class/power_supply/BAT0/manufacturer = SMP/sys/class/power_supply/BAT0/model_name = L14M4P23/sys/class/power_supply/BAT0/cycle_count = (not supported)/sys/class/power_supply/BAT0/energy_full_design = 60000 [mWh]/sys/class/power_supply/BAT0/energy_full = 48850 [mWh]/sys/class/power_supply/BAT0/energy_now = 48850 [mWh]/sys/class/power_supply/BAT0/power_now = 0 [mW]/sys/class/power_supply/BAT0/status = Full Charge = 100.0 [%]Capacity = 81.4 [%]
$ sudo tlp-stat -d或$ sudo tlp-stat --disk
--- TLP 1.1 -------------------------------------------- +++ Storage Devices/dev/sda: Model = WDC WD10SPCX-24HWST1 Firmware = 02.01A02 APM Level = 128 Status = active/idle Scheduler = mq-deadline Runtime PM: control = on, autosuspend_delay = (not available) SMART info: 4 Start_Stop_Count = 18787 5 Reallocated_Sector_Ct = 0 9 Power_On_Hours = 606 [h] 12 Power_Cycle_Count = 1792 193 Load_Cycle_Count = 25775 194 Temperature_Celsius = 31 [°C] +++ AHCI Link Power Management (ALPM)/sys/class/scsi_host/host0/link_power_management_policy = med_power_with_dipm/sys/class/scsi_host/host1/link_power_management_policy = med_power_with_dipm/sys/class/scsi_host/host2/link_power_management_policy = med_power_with_dipm/sys/class/scsi_host/host3/link_power_management_policy = med_power_with_dipm +++ AHCI Host Controller Runtime Power Management/sys/bus/pci/devices/0000:00:17.0/ata1/power/control = on/sys/bus/pci/devices/0000:00:17.0/ata2/power/control = on/sys/bus/pci/devices/0000:00:17.0/ata3/power/control = on/sys/bus/pci/devices/0000:00:17.0/ata4/power/control = on
$ sudo tlp-stat -e或$ sudo tlp-stat --pcie
$ sudo tlp-stat -eor$ sudo tlp-stat --pcie --- TLP 1.1 -------------------------------------------- +++ Runtime Power ManagementDevice blacklist = (not configured)Driver blacklist = amdgpu nouveau nvidia radeon pcieport /sys/bus/pci/devices/0000:00:00.0/power/control = auto (0x060000, Host bridge, skl_uncore)/sys/bus/pci/devices/0000:00:01.0/power/control = auto (0x060400, PCI bridge, pcieport)/sys/bus/pci/devices/0000:00:02.0/power/control = auto (0x030000, VGA compatible controller, i915)/sys/bus/pci/devices/0000:00:14.0/power/control = auto (0x0c0330, USB controller, xhci_hcd) ......
$ sudo tlp-stat -g或$ sudo tlp-stat --graphics
--- TLP 1.1 -------------------------------------------- +++ Intel Graphics/sys/module/i915/parameters/enable_dc = -1 (use per-chip default)/sys/module/i915/parameters/enable_fbc = 1 (enabled)/sys/module/i915/parameters/enable_psr = 0 (disabled)/sys/module/i915/parameters/modeset = -1 (use per-chip default)
$ sudo tlp-stat -p或$ sudo tlp-stat --processor
--- TLP 1.1 -------------------------------------------- +++ ProcessorCPU model = Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver = intel_pstate/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor = powersave/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors = performance powersave/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq = 800000 [kHz]/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq = 3500000 [kHz]/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference = balance_power/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power ...... /sys/devices/system/cpu/intel_pstate/min_perf_pct = 22 [%]/sys/devices/system/cpu/intel_pstate/max_perf_pct = 100 [%]/sys/devices/system/cpu/intel_pstate/no_turbo = 0/sys/devices/system/cpu/intel_pstate/turbo_pct = 33 [%]/sys/devices/system/cpu/intel_pstate/num_pstates = 28 x86_energy_perf_policy: program not installed. /sys/module/workqueue/parameters/power_efficient = Y/proc/sys/kernel/nmi_watchdog = 0 +++ UndervoltingPHC kernel not available.
$ sudo tlp-stat -s或$ sudo tlp-stat --system
--- TLP 1.1 -------------------------------------------- +++ System InfoSystem = LENOVO Lenovo ideapad Y700-15ISK 80NVBIOS = CDCN35WWRelease = "Manjaro Linux"Kernel = 4.19.6-1-MANJARO #1 SMP PREEMPT Sat Dec 1 12:21:26 UTC 2018 x86_64/proc/cmdline = BOOT_IMAGE=/boot/vmlinuz-4.19-x86_64 root=UUID=69d9dd18-36be-4631-9ebb-78f05fe3217f rw quiet resume=UUID=a2092b92-af29-4760-8e68-7a201922573bInit system = systemd Boot mode = BIOS (CSM, Legacy) +++ TLP StatusState = enabledLast run = 11:04:00 IST, 596 sec(s) agoMode = batteryPower source = battery
$ sudo tlp-stat -t或$ sudo tlp-stat --temp
--- TLP 1.1 -------------------------------------------- +++ TemperaturesCPU temp = 36 [°C]Fan speed = (not available)
$ sudo tlp-stat -u或$ sudo tlp-stat --usb
--- TLP 1.1 -------------------------------------------- +++ USBAutosuspend = disabledDevice whitelist = (not configured)Device blacklist = (not configured)Bluetooth blacklist = disabledPhone blacklist = disabledWWAN blacklist = enabled Bus 002 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 3.0 root hub (hub)Bus 001 Device 003 ID 174f:14e8 control = auto, autosuspend_delay_ms = 2000 -- Syntek (uvcvideo) ......
$ sudo tlp-stat -w或$ sudo tlp-stat --warn
--- TLP 1.1 -------------------------------------------- No warnings detected.
$ sudo tlp-stat
--- TLP 1.1 -------------------------------------------- +++ Configured Settings: /etc/default/tlpTLP_ENABLE=1TLP_DEFAULT_MODE=ACTLP_PERSISTENT_DEFAULT=0DISK_IDLE_SECS_ON_AC=0DISK_IDLE_SECS_ON_BAT=2MAX_LOST_WORK_SECS_ON_AC=15MAX_LOST_WORK_SECS_ON_BAT=60 ...... +++ System InfoSystem = LENOVO Lenovo ideapad Y700-15ISK 80NVBIOS = CDCN35WWRelease = "Manjaro Linux"Kernel = 4.19.6-1-MANJARO #1 SMP PREEMPT Sat Dec 1 12:21:26 UTC 2018 x86_64/proc/cmdline = BOOT_IMAGE=/boot/vmlinuz-4.19-x86_64 root=UUID=69d9dd18-36be-4631-9ebb-78f05fe3217f rw quiet resume=UUID=a2092b92-af29-4760-8e68-7a201922573bInit system = systemdBoot mode = BIOS (CSM, Legacy) +++ TLP StatusState = enabledLast run = 11:04:00 IST, 684 sec(s) agoMode = batteryPower source = battery +++ ProcessorCPU model = Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver = intel_pstate/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor = powersave/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors = performance powersave ...... /sys/devices/system/cpu/intel_pstate/min_perf_pct = 22 [%]/sys/devices/system/cpu/intel_pstate/max_perf_pct = 100 [%]/sys/devices/system/cpu/intel_pstate/no_turbo = 0/sys/devices/system/cpu/intel_pstate/turbo_pct = 33 [%]/sys/devices/system/cpu/intel_pstate/num_pstates = 28 x86_energy_perf_policy: program not installed. /sys/module/workqueue/parameters/power_efficient = Y/proc/sys/kernel/nmi_watchdog = 0 +++ UndervoltingPHC kernel not available. +++ TemperaturesCPU temp = 42 [°C]Fan speed = (not available) +++ File System/proc/sys/vm/laptop_mode = 2/proc/sys/vm/dirty_writeback_centisecs = 6000/proc/sys/vm/dirty_expire_centisecs = 6000/proc/sys/vm/dirty_ratio = 20/proc/sys/vm/dirty_background_ratio = 10 +++ Storage Devices/dev/sda: Model = WDC WD10SPCX-24HWST1 Firmware = 02.01A02 APM Level = 128 Status = active/idle Scheduler = mq-deadline Runtime PM: control = on, autosuspend_delay = (not available) SMART info: 4 Start_Stop_Count = 18787 5 Reallocated_Sector_Ct = 0 9 Power_On_Hours = 606 [h] 12 Power_Cycle_Count = 1792 193 Load_Cycle_Count = 25777 194 Temperature_Celsius = 31 [°C] +++ AHCI Link Power Management (ALPM)/sys/class/scsi_host/host0/link_power_management_policy = med_power_with_dipm/sys/class/scsi_host/host1/link_power_management_policy = med_power_with_dipm/sys/class/scsi_host/host2/link_power_management_policy = med_power_with_dipm/sys/class/scsi_host/host3/link_power_management_policy = med_power_with_dipm +++ AHCI Host Controller Runtime Power Management/sys/bus/pci/devices/0000:00:17.0/ata1/power/control = on/sys/bus/pci/devices/0000:00:17.0/ata2/power/control = on/sys/bus/pci/devices/0000:00:17.0/ata3/power/control = on/sys/bus/pci/devices/0000:00:17.0/ata4/power/control = on +++ PCIe Active State Power Management/sys/module/pcie_aspm/parameters/policy = powersave +++ Intel Graphics/sys/module/i915/parameters/enable_dc = -1 (use per-chip default)/sys/module/i915/parameters/enable_fbc = 1 (enabled)/sys/module/i915/parameters/enable_psr = 0 (disabled)/sys/module/i915/parameters/modeset = -1 (use per-chip default) +++ Wirelessbluetooth = onwifi = onwwan = none (no device) hci0(btusb) : bluetooth, not connectedwlp8s0(iwlwifi) : wifi, connected, power management = on +++ Audio/sys/module/snd_hda_intel/parameters/power_save = 1/sys/module/snd_hda_intel/parameters/power_save_controller = Y +++ Runtime Power ManagementDevice blacklist = (not configured)Driver blacklist = amdgpu nouveau nvidia radeon pcieport /sys/bus/pci/devices/0000:00:00.0/power/control = auto (0x060000, Host bridge, skl_uncore)/sys/bus/pci/devices/0000:00:01.0/power/control = auto (0x060400, PCI bridge, pcieport)/sys/bus/pci/devices/0000:00:02.0/power/control = auto (0x030000, VGA compatible controller, i915) ...... +++ USBAutosuspend = disabledDevice whitelist = (not configured)Device blacklist = (not configured)Bluetooth blacklist = disabledPhone blacklist = disabledWWAN blacklist = enabled Bus 002 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 3.0 root hub (hub)Bus 001 Device 003 ID 174f:14e8 control = auto, autosuspend_delay_ms = 2000 -- Syntek (uvcvideo)Bus 001 Device 002 ID 17ef:6053 control = on, autosuspend_delay_ms = 2000 -- Lenovo (usbhid)Bus 001 Device 004 ID 8087:0a2b control = auto, autosuspend_delay_ms = 2000 -- Intel Corp. (btusb)Bus 001 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub) +++ Battery Status/sys/class/power_supply/BAT0/manufacturer = SMP/sys/class/power_supply/BAT0/model_name = L14M4P23/sys/class/power_supply/BAT0/cycle_count = (not supported)/sys/class/power_supply/BAT0/energy_full_design = 60000 [mWh]/sys/class/power_supply/BAT0/energy_full = 51690 [mWh]/sys/class/power_supply/BAT0/energy_now = 50140 [mWh]/sys/class/power_supply/BAT0/power_now = 12185 [mW]/sys/class/power_supply/BAT0/status = Discharging Charge = 97.0 [%]Capacity = 86.2 [%]
關(guān)于“l(fā)inux中如何使用TLP”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,使各位可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),請(qǐng)把它分享出去讓更多的人看到。
分享名稱(chēng):linux中如何使用TLP
文章網(wǎng)址:http://jinyejixie.com/article48/gpihep.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供關(guān)鍵詞優(yōu)化、全網(wǎng)營(yíng)銷(xiāo)推廣、外貿(mào)建站、移動(dòng)網(wǎng)站建設(shè)、、電子商務(wù)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)