diff --git a/files/0001-Don-t-enable-tlp-service-on-virtualised-platforms.patch b/files/0001-Don-t-enable-tlp-service-on-virtualised-platforms.patch --- a/files/0001-Don-t-enable-tlp-service-on-virtualised-platforms.patch +++ b/files/0001-Don-t-enable-tlp-service-on-virtualised-platforms.patch @@ -1,24 +1,12 @@ -From 7c21a9c07f9db708926e8c8b01f2f0aa6d00822f Mon Sep 17 00:00:00 2001 -From: James Lee -Date: Sun, 31 Mar 2019 21:18:22 +0100 -Subject: [PATCH] Don't enable tlp service on virtualised platforms - ---- - tlp.service.in | 1 + - 1 file changed, 1 insertion(+) - diff --git a/tlp.service.in b/tlp.service.in -index 9ac3470..4aec4b8 100644 +index 8af7b15..13c0a0e 100644 --- a/tlp.service.in +++ b/tlp.service.in -@@ -5,6 +5,7 @@ - - [Unit] +@@ -7,6 +7,7 @@ Description=TLP system startup/shutdown -+ConditionVirtualization=no - After=multi-user.target bluetooth.service NetworkManager.service + After=multi-user.target NetworkManager.service Before=shutdown.target ++ConditionVirtualization=no Documentation=https://linrunner.de/tlp --- -2.21.0 - + + [Service] diff --git a/files/0002-enable_default_settings_in_conf.patch b/files/0002-enable_default_settings_in_conf.patch new file mode 100644 --- /dev/null +++ b/files/0002-enable_default_settings_in_conf.patch @@ -0,0 +1,279 @@ +diff --git a/tlp.conf b/tlp.conf +index 389a788..39308da 100644 +--- a/tlp.conf ++++ b/tlp.conf +@@ -23,19 +23,18 @@ + # Set to 0 to disable, 1 to enable TLP. + # Default: 1 + +-#TLP_ENABLE=1 ++TLP_ENABLE=1 + + # Operation mode when no power supply can be detected: AC, BAT. + # Concerns some desktop and embedded hardware only. + # Default: +- +-#TLP_DEFAULT_MODE=AC ++TLP_DEFAULT_MODE=AC + + # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE + # Note: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC. + # Default: 0 + +-#TLP_PERSISTENT_DEFAULT=0 ++TLP_PERSISTENT_DEFAULT=0 + + # Power supply class to ignore when determining operation mode: AC, BAT. + # Note: try on laptops where operation mode AC/BAT is incorrectly detected. +@@ -47,14 +46,14 @@ + # Non-zero value enables, zero disables laptop mode. + # Default: 0 (AC), 2 (BAT) + +-#DISK_IDLE_SECS_ON_AC=0 +-#DISK_IDLE_SECS_ON_BAT=2 ++DISK_IDLE_SECS_ON_AC=0 ++DISK_IDLE_SECS_ON_BAT=2 + + # Dirty page values (timeouts in secs). + # Default: 15 (AC), 60 (BAT) + +-#MAX_LOST_WORK_SECS_ON_AC=15 +-#MAX_LOST_WORK_SECS_ON_BAT=60 ++MAX_LOST_WORK_SECS_ON_AC=15 ++MAX_LOST_WORK_SECS_ON_BAT=60 + + # Note: CPU parameters below are disabled by default, remove the leading # + # to enable them, otherwise kernel defaults will be used. +@@ -73,8 +72,8 @@ + # you should know what you're doing! + # Default: + +-#CPU_SCALING_GOVERNOR_ON_AC=powersave +-#CPU_SCALING_GOVERNOR_ON_BAT=powersave ++CPU_SCALING_GOVERNOR_ON_AC=powersave ++CPU_SCALING_GOVERNOR_ON_BAT=powersave + + # Set the min/max frequency available for the scaling governor. + # Possible values depend on your CPU. For available frequencies see +@@ -97,8 +96,8 @@ + # - When HWP.EPP is available, EPB is not set + # Default: balance_performance (AC), balance_power (BAT) + +-#CPU_ENERGY_PERF_POLICY_ON_AC=balance_performance +-#CPU_ENERGY_PERF_POLICY_ON_BAT=balance_power ++CPU_ENERGY_PERF_POLICY_ON_AC=balance_performance ++CPU_ENERGY_PERF_POLICY_ON_BAT=balance_power + + # Set Intel CPU P-state performance: 0..100 (%). + # Limit the max/min P-state to control the power dissipation of the CPU. +@@ -118,21 +117,21 @@ + # - A value of 1 does *not* activate boosting, it just allows it + # Default: + +-#CPU_BOOST_ON_AC=1 +-#CPU_BOOST_ON_BAT=0 ++CPU_BOOST_ON_AC=1 ++CPU_BOOST_ON_BAT=0 + + # Minimize number of used CPU cores/hyper-threads under light load conditions: + # 0=disable, 1=enable. + # Default: 0 (AC), 1 (BAT) + +-#SCHED_POWERSAVE_ON_AC=0 +-#SCHED_POWERSAVE_ON_BAT=1 ++SCHED_POWERSAVE_ON_AC=0 ++SCHED_POWERSAVE_ON_BAT=1 + + # Kernel NMI Watchdog: + # 0=disable (default, saves power), 1=enable (for kernel debugging only). + # Default: 0 + +-#NMI_WATCHDOG=0 ++NMI_WATCHDOG=0 + + # Change CPU voltages aka "undervolting" - Kernel with PHC patch required. + # Frequency voltage pairs are written to: +@@ -147,7 +146,7 @@ + # Note: DISK parameters below are effective only when this option is configured. + # Default: "nvme0n1 sda" + +-#DISK_DEVICES="nvme0n1 sda" ++DISK_DEVICES="nvme0n1 sda" + + # Disk advanced power management level: 1..254, 255 (max saving, min, off). + # Levels 1..127 may spin down the disk; 255 allowable on most drives. +@@ -155,8 +154,8 @@ + # to keep the hardware default for the particular disk. + # Default: 254 (AC), 128 (BAT) + +-#DISK_APM_LEVEL_ON_AC="254 254" +-#DISK_APM_LEVEL_ON_BAT="128 128" ++DISK_APM_LEVEL_ON_AC="254 254" ++DISK_APM_LEVEL_ON_BAT="128 128" + + # Hard disk spin down timeout: + # 0: spin down disabled +@@ -195,8 +194,8 @@ + # - "med_power_with_dipm max_performance" (AC) + # - "med_power_with_dipm min_power" (BAT) + +-#SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance" +-#SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power" ++SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance" ++SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power" + + # Exclude host devices from AHCI link power management. + # Separate multiple hosts with spaces. +@@ -216,7 +215,7 @@ + # Note: effective only when AHCI_RUNTIME_PM_ON_AC/BAT is activated. + # Default: 15 + +-#AHCI_RUNTIME_PM_TIMEOUT=15 ++AHCI_RUNTIME_PM_TIMEOUT=15 + + # PCI Express Active State Power Management (PCIe ASPM): + # default(*), performance, powersave, powersupersave. +@@ -242,45 +241,45 @@ + # auto = mid on BAT, high on AC. + # Default: default + +-#RADEON_POWER_PROFILE_ON_AC=default +-#RADEON_POWER_PROFILE_ON_BAT=default ++RADEON_POWER_PROFILE_ON_AC=default ++RADEON_POWER_PROFILE_ON_BAT=default + + # Radeon dynamic power management method (DPM): battery, performance. + # Default: + +-#RADEON_DPM_STATE_ON_AC=performance +-#RADEON_DPM_STATE_ON_BAT=battery ++RADEON_DPM_STATE_ON_AC=performance ++RADEON_DPM_STATE_ON_BAT=battery + + # Radeon DPM performance level: auto, low, high; auto is recommended. + # Note: effective only when RADEON_DPM_STATE_ON_AC/BAT is activated. + # Default: auto + +-#RADEON_DPM_PERF_LEVEL_ON_AC=auto +-#RADEON_DPM_PERF_LEVEL_ON_BAT=auto ++RADEON_DPM_PERF_LEVEL_ON_AC=auto ++RADEON_DPM_PERF_LEVEL_ON_BAT=auto + + # WiFi power saving mode: on=enable, off=disable; not supported by all adapters. + # Default: off (AC), on (BAT) + +-#WIFI_PWR_ON_AC=off +-#WIFI_PWR_ON_BAT=on ++WIFI_PWR_ON_AC=off ++WIFI_PWR_ON_BAT=off + + # Disable wake on LAN: Y/N. + # Default: Y + +-#WOL_DISABLE=Y ++WOL_DISABLE=Y + + # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs). + # A value of 0 disables, >=1 enables power saving (recommended: 1). + # Default: 0 (AC), 1 (BAT) + +-#SOUND_POWER_SAVE_ON_AC=0 +-#SOUND_POWER_SAVE_ON_BAT=1 ++SOUND_POWER_SAVE_ON_AC=0 ++SOUND_POWER_SAVE_ON_BAT=0 + + # Disable controller too (HDA only): Y/N. + # Note: effective only when SOUND_POWER_SAVE_ON_AC/BAT is activated. + # Default: Y + +-#SOUND_POWER_SAVE_CONTROLLER=Y ++SOUND_POWER_SAVE_CONTROLLER=Y + + # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable. + # Drive can be powered on again by releasing (and reinserting) the eject lever +@@ -288,19 +287,19 @@ + # Note: an UltraBay/MediaBay hard disk is never powered off. + # Default: 0 + +-#BAY_POWEROFF_ON_AC=0 +-#BAY_POWEROFF_ON_BAT=0 ++BAY_POWEROFF_ON_AC=0 ++BAY_POWEROFF_ON_BAT=0 + + # Optical drive device to power off + # Default: sr0 + +-#BAY_DEVICE="sr0" ++BAY_DEVICE="sr0" + + # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable. + # Default: on (AC), auto (BAT) + +-#RUNTIME_PM_ON_AC=on +-#RUNTIME_PM_ON_BAT=auto ++RUNTIME_PM_ON_AC=on ++RUNTIME_PM_ON_BAT=auto + + # Exclude PCI(e) device adresses the following list from Runtime PM + # (separate with spaces). Use lspci to get the adresses (1st column). +@@ -320,7 +319,7 @@ + # Set to 0 to disable, 1 to enable USB autosuspend feature. + # Default: 1 + +-#USB_AUTOSUSPEND=1 ++USB_AUTOSUSPEND=0 + + # Exclude listed devices from USB autosuspend (separate with spaces). + # Use lsusb to get the ids. +@@ -333,25 +332,25 @@ + # 0=do not exclude, 1=exclude. + # Default: 0 + +-#USB_BLACKLIST_BTUSB=0 ++USB_BLACKLIST_BTUSB=0 + + # Phone devices are excluded from USB autosuspend: + # 0=do not exclude, 1=exclude (enable charging). + # Default: 0 + +-#USB_BLACKLIST_PHONE=0 ++USB_BLACKLIST_PHONE=0 + + # Printers are excluded from USB autosuspend: + # 0=do not exclude, 1=exclude. + # Default: 1 + +-#USB_BLACKLIST_PRINTER=1 ++USB_BLACKLIST_PRINTER=1 + + # WWAN devices are excluded from USB autosuspend: + # 0=do not exclude, 1=exclude. + # Default: 0 + +-#USB_BLACKLIST_WWAN=0 ++USB_BLACKLIST_WWAN=0 + + # Include listed devices into USB autosuspend even if already excluded + # by the blacklists above (separate with spaces). Use lsusb to get the ids. +@@ -371,7 +370,7 @@ + # are ignored when this is enabled. + # Default: 0 + +-#RESTORE_DEVICE_STATE_ON_STARTUP=0 ++RESTORE_DEVICE_STATE_ON_STARTUP=0 + + # Radio devices to disable on startup: bluetooth, wifi, wwan. + # Separate multiple devices with spaces. +@@ -439,9 +438,9 @@ + # Battery feature drivers: 0=disable, 1=enable + # Default: 1 (all) + +-#NATACPI_ENABLE=1 +-#TPACPI_ENABLE=1 +-#TPSMAPI_ENABLE=1 ++NATACPI_ENABLE=1 ++TPACPI_ENABLE=1 ++TPSMAPI_ENABLE=1 + + # ------------------------------------------------------------------------------ + # tlp-rdw - Parameters for the radio device wizard diff --git a/package.yml b/package.yml --- a/package.yml +++ b/package.yml @@ -1,8 +1,8 @@ name : tlp -version : 1.2.2 -release : 14 +version : 1.3.1 +release : 15 source : - - https://github.com/linrunner/TLP/archive/1.2.2.tar.gz : 5c28bdda51661160f75b10634fa0fffad96e83204a7c704dad0095de6fee3315 + - https://github.com/linrunner/TLP/archive/1.3.1.tar.gz : 4c783606ca6e98a3ddb3dc911785b4d7a73fec4ebb9decfca4ca15e315ece768 license : GPL-2.0-only component : system.utils summary : Linux Advanced Power Management @@ -15,9 +15,7 @@ - linux-tools-x86_energy_perf_policy setup : | %patch -p1 < $pkgfiles/0001-Don-t-enable-tlp-service-on-virtualised-platforms.patch - sed -i 's:SOUND_POWER_SAVE_ON_BAT=1:SOUND_POWER_SAVE_ON_BAT=0:g' default # Disable Audio Power Save - sed -i 's:USB_AUTOSUSPEND=1:USB_AUTOSUSPEND=0:g' default # Disable USB Autosuspend - sed -i 's:WIFI_PWR_ON_BAT=on:WIFI_PWR_ON_BAT=off:g' default # Disable Wireless Power Management + %patch -p1 < $pkgfiles/0002-enable_default_settings_in_conf.patch build : | export TLP_LIBDIR='%libdir%' export TLP_SBIN='/usr/sbin' diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml --- a/pspec_x86_64.xml +++ b/pspec_x86_64.xml @@ -2,8 +2,8 @@ tlp - James Lee - jamesl33info@gmail.com + Albert Krenz + albert.krenz+solus@mailbox.org GPL-2.0-only system.utils @@ -20,18 +20,18 @@ system.utils /etc/NetworkManager/dispatcher.d/99tlp-rdw-nm - /etc/default/tlp + /etc/tlp.conf + /etc/tlp.d/00-template.conf + /etc/tlp.d/README + /lib/systemd/system-sleep/tlp /usr/bin/bluetooth /usr/bin/run-on-ac /usr/bin/run-on-bat - /usr/bin/tlp-pcilist /usr/bin/tlp-rdw /usr/bin/tlp-stat - /usr/bin/tlp-usblist /usr/bin/wifi /usr/bin/wwan /usr/lib64/systemd/system/multi-user.target.wants/tlp.service - /usr/lib64/systemd/system/tlp-sleep.service /usr/lib64/systemd/system/tlp.service /usr/lib64/udev/rules.d/85-tlp-rdw.rules /usr/lib64/udev/rules.d/85-tlp.rules @@ -47,15 +47,14 @@ /usr/share/man/man1/bluetooth.1 /usr/share/man/man1/run-on-ac.1 /usr/share/man/man1/run-on-bat.1 - /usr/share/man/man1/tlp-pcilist.1 - /usr/share/man/man1/tlp-usblist.1 /usr/share/man/man1/wifi.1 /usr/share/man/man1/wwan.1 - /usr/share/man/man8/tlp-sleep.service.8 + /usr/share/man/man8/tlp-rdw.8 /usr/share/man/man8/tlp-stat.8 /usr/share/man/man8/tlp.8 /usr/share/man/man8/tlp.service.8 /usr/share/metainfo/de.linrunner.tlp.metainfo.xml + /usr/share/tlp/defaults.conf /usr/share/tlp/func.d/05-tlp-func-pm /usr/share/tlp/func.d/10-tlp-func-cpu /usr/share/tlp/func.d/15-tlp-func-disk @@ -67,16 +66,19 @@ /usr/share/tlp/func.d/45-tlp-func-gpu /usr/share/tlp/func.d/tlp-func-stat /usr/share/tlp/tlp-func-base + /usr/share/tlp/tlp-pcilist + /usr/share/tlp/tlp-readconfs + /usr/share/tlp/tlp-usblist /usr/share/tlp/tpacpi-bat - - 2019-05-04 - 1.2.2 + + 2020-05-01 + 1.3.1 Packaging update - James Lee - jamesl33info@gmail.com + Albert Krenz + albert.krenz+solus@mailbox.org \ No newline at end of file