Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLP will not start #749

Closed
JayH1119 opened this issue Jul 9, 2024 · 9 comments
Closed

TLP will not start #749

JayH1119 opened this issue Jul 9, 2024 · 9 comments

Comments

@JayH1119
Copy link

JayH1119 commented Jul 9, 2024

[x] I've read and accepted the Bug Reporting Howto
[x] I've provided all required tlp-stat outputs via Gist (see below)

tlp.service does not start successfully.

Output from systemctl status:
Jul 09 09:08:57 jLaptop systemd[1]: Starting tlp.service - TLP system startup/shutdown...
Jul 09 09:08:57 jLaptop tlp[1712]: Applying power save settings...done.
Jul 09 09:08:57 jLaptop tlp[1712]: Setting battery charge thresholds.../usr/sbin/tlp: 14: readonly: BATDRV_LG_BCL: is read only
Jul 09 09:08:57 jLaptop systemd[1]: tlp.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 09 09:08:57 jLaptop systemd[1]: tlp.service: Failed with result 'exit-code'.
Jul 09 09:08:57 jLaptop systemd[1]: Failed to start tlp.service - TLP system startup/shutdown.

Occurs at startup on A/C or battery. Also occurs when attempting to manually start the service.

  1. Full output of tlp-stat via https://gist.github.com/ for all
    matching cases of 1
    (not as file attachment, no screenshots)

--- TLP 1.5.0 --------------------------------------------

+++ Configured Settings:
defaults.conf L0004: TLP_ENABLE="1"
defaults.conf L0005: TLP_WARN_LEVEL="3"
defaults.conf L0006: TLP_PERSISTENT_DEFAULT="0"
defaults.conf L0007: DISK_IDLE_SECS_ON_AC="0"
defaults.conf L0008: DISK_IDLE_SECS_ON_BAT="2"
defaults.conf L0009: MAX_LOST_WORK_SECS_ON_AC="15"
defaults.conf L0010: MAX_LOST_WORK_SECS_ON_BAT="60"
defaults.conf L0011: CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance"
defaults.conf L0012: CPU_ENERGY_PERF_POLICY_ON_BAT="balance_power"
defaults.conf L0013: SCHED_POWERSAVE_ON_AC="0"
defaults.conf L0014: SCHED_POWERSAVE_ON_BAT="1"
defaults.conf L0015: NMI_WATCHDOG="0"
defaults.conf L0016: DISK_DEVICES="nvme0n1 sda"
defaults.conf L0017: DISK_APM_LEVEL_ON_AC="254 254"
defaults.conf L0018: DISK_APM_LEVEL_ON_BAT="128 128"
defaults.conf L0019: DISK_APM_CLASS_DENYLIST="usb ieee1394"
defaults.conf L0020: DISK_IOSCHED="keep keep"
defaults.conf L0021: SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
defaults.conf L0022: SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
defaults.conf L0023: AHCI_RUNTIME_PM_ON_AC="on"
defaults.conf L0024: AHCI_RUNTIME_PM_ON_BAT="auto"
defaults.conf L0025: AHCI_RUNTIME_PM_TIMEOUT="15"
defaults.conf L0026: PCIE_ASPM_ON_AC="default"
defaults.conf L0027: PCIE_ASPM_ON_BAT="default"
defaults.conf L0028: RADEON_DPM_PERF_LEVEL_ON_AC="auto"
defaults.conf L0029: RADEON_DPM_PERF_LEVEL_ON_BAT="auto"
defaults.conf L0030: RADEON_POWER_PROFILE_ON_AC="default"
defaults.conf L0031: RADEON_POWER_PROFILE_ON_BAT="default"
defaults.conf L0032: WIFI_PWR_ON_AC="off"
defaults.conf L0033: WIFI_PWR_ON_BAT="on"
defaults.conf L0034: WOL_DISABLE="Y"
defaults.conf L0035: SOUND_POWER_SAVE_ON_AC="1"
defaults.conf L0036: SOUND_POWER_SAVE_ON_BAT="1"
defaults.conf L0037: SOUND_POWER_SAVE_CONTROLLER="Y"
defaults.conf L0038: BAY_POWEROFF_ON_AC="0"
defaults.conf L0039: BAY_POWEROFF_ON_BAT="0"
defaults.conf L0040: BAY_DEVICE="sr0"
defaults.conf L0041: RUNTIME_PM_ON_AC="on"
defaults.conf L0042: RUNTIME_PM_ON_BAT="auto"
defaults.conf L0043: RUNTIME_PM_DRIVER_DENYLIST="mei_me nouveau radeon"
defaults.conf L0044: USB_AUTOSUSPEND="1"
defaults.conf L0045: USB_EXCLUDE_AUDIO="1"
defaults.conf L0046: USB_EXCLUDE_BTUSB="0"
defaults.conf L0047: USB_EXCLUDE_PHONE="0"
defaults.conf L0048: USB_EXCLUDE_PRINTER="1"
defaults.conf L0049: USB_EXCLUDE_WWAN="0"
defaults.conf L0050: USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN="0"
defaults.conf L0051: RESTORE_DEVICE_STATE_ON_STARTUP="0"
defaults.conf L0052: RESTORE_THRESHOLDS_ON_BAT="0"
defaults.conf L0053: NATACPI_ENABLE="1"
defaults.conf L0054: TPACPI_ENABLE="1"
defaults.conf L0055: TPSMAPI_ENABLE="1"

+++ System Info
System = HP Type1ProductConfigId HP ENVY x360 Convertible 15m-bp1xx
BIOS = F.39
OS Release = Debian GNU/Linux 12 (bookworm)
Kernel = 6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64
/proc/cmdline = root=UUID=dd366370-d146-45df-ae17-92d2b5ca54bf ro nosplash initrd=boot\initrd.img
Init system = systemd v252 (252.26-1~deb12u2)
Boot mode = UEFI

+++ TLP Status
State = enabled
RDW state = enabled
Last run = 09:20:04, 1653 sec(s) ago
Mode = battery
Power source = battery

+++ Processor
CPU model = Intel(R) Core(TM) i5-8250U CPU @ 1.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 = 400000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq = 3400000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference = balance_power [HWP.EPP]
/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power

/sys/devices/system/cpu/cpu1..cpu7: omitted for clarity, use -v to show all

/sys/devices/system/cpu/intel_pstate/status = active
/sys/devices/system/cpu/intel_pstate/min_perf_pct = 11 [%]
/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/hwp_dynamic_boost = 0
/sys/devices/system/cpu/intel_pstate/turbo_pct = 59 [%]
/sys/devices/system/cpu/intel_pstate/num_pstates = 31

/sys/module/workqueue/parameters/power_efficient = N
/proc/sys/kernel/nmi_watchdog = 0

+++ Platform Profile
/sys/firmware/acpi/platform_profile = (not available)
/sys/firmware/acpi/platform_profile_choices = (not available)

+++ Temperatures
CPU temp = 36 [°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

+++ Disks
Devices = nvme0n1 sda

/dev/nvme0n1:
Type = NVMe
Disk ID = nvme-CT1000P1SSD8_1920E2049624
Model = CT1000P1SSD8
Firmware = P3CR010
Temp = 33 °C
Scheduler = [none] mq-deadline (multi queue)

Runtime PM:
/sys/block/nvme0n1/device/power/control = auto, autosuspend_delay_ms = (not available)

SMART info:
Critical Warning: 0x00
Temperature: 33 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 1%
Data Units Written: 33,583,400 [17.1 TB]
Power Cycles: 3,441
Power On Hours: 10,973
Unsafe Shutdowns: 97
Media and Data Integrity Errors: 838

/dev/sda:
Type = SATA
Disk ID = ata-ST1000LM049-2GH172_WGS0NSB9
Model = ST1000LM049-2GH172
Firmware = RXM3
APM Level = 128
Status = active/idle
Host = host2
Scheduler = [mq-deadline] none (multi queue)

Runtime PM:
/sys/block/sda/device/power/control = auto, autosuspend_delay_ms = 15000

SMART info:
4 Start_Stop_Count = 20950
5 Reallocated_Sector_Ct = 0
9 Power_On_Hours = 16672 [h]
12 Power_Cycle_Count = 3589
190 Airflow_Temperature_Cel = 30 [°C]
191 G-Sense_Error_Rate = 4
193 Load_Cycle_Count = 81091
194 Temperature_Celsius = 30 (0 3 0 [°C]

+++ AHCI Link Power Management (ALPM) :: SATA Links
/sys/bus/pci/devices/0000:00:17.0/ata1/host0/scsi_host/host0/link_power_management_policy = med_power_with_dipm
/sys/bus/pci/devices/0000:00:17.0/ata2/host1/scsi_host/host1/link_power_management_policy = med_power_with_dipm
/sys/bus/pci/devices/0000:00:17.0/ata3/host2/scsi_host/host2/link_power_management_policy = med_power_with_dipm -- sda

+++ AHCI Port Runtime Power Management :: SATA/ATA Ports
/sys/bus/pci/devices/0000:00:17.0/ata1/power/control = auto
/sys/bus/pci/devices/0000:00:17.0/ata2/power/control = auto
/sys/bus/pci/devices/0000:00:17.0/ata3/power/control = auto -- sda

+++ Docks and Device Bays
/sys/devices/platform/dock.0: dock_station = undocked

+++ Intel Graphics
/sys/class/drm/card0/device/driver = i915

/sys/class/drm/card0/power/rc6_enable = 1 (enabled)
/sys/kernel/debug/dri/0/i915_fbc_status = FBC enabled
/sys/module/i915/parameters/enable_psr = -1 (use per-chip default)

/sys/class/drm/card0/gt_min_freq_mhz = 300 [MHz]
/sys/class/drm/card0/gt_max_freq_mhz = 1100 [MHz]
/sys/class/drm/card0/gt_boost_freq_mhz = 1100 [MHz]
/sys/class/drm/card0/gt_RPn_freq_mhz = 300 [MHz] (GPU min)
/sys/class/drm/card0/gt_RP0_freq_mhz = 1100 [MHz] (GPU max)

+++ Wireless
bluetooth = on
nfc = none (no device)
wifi = on
wwan = none (no device)

hci0(btusb) : bluetooth, not connected
wlo1(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

+++ PCIe Active State Power Management
/sys/module/pcie_aspm/parameters/policy = [default] performance powersave powersupersave (using BIOS preferences)

+++ PCIe Runtime Power Management
Enable devices = (disabled)
Disable devices = (disabled)
Device denylist = (disabled)
Driver denylist = mei_me nouveau radeon

/sys/bus/pci/devices/0000:00:00.0/power/control = auto (0x060000, Host bridge, skl_uncore)
/sys/bus/pci/devices/0000:00:02.0/power/control = auto (0x030000, VGA compatible controller, i915)
/sys/bus/pci/devices/0000:00:04.0/power/control = auto (0x118000, Signal processing controller, proc_thermal)
/sys/bus/pci/devices/0000:00:13.0/power/control = auto (0x000000, Non-VGA unclassified device, intel_ish_ipc)
/sys/bus/pci/devices/0000:00:14.0/power/control = auto (0x0c0330, USB controller, xhci_hcd)
/sys/bus/pci/devices/0000:00:14.2/power/control = auto (0x118000, Signal processing controller, intel_pch_thermal)
/sys/bus/pci/devices/0000:00:15.0/power/control = auto (0x118000, Signal processing controller, intel-lpss)
/sys/bus/pci/devices/0000:00:15.1/power/control = auto (0x118000, Signal processing controller, intel-lpss)
/sys/bus/pci/devices/0000:00:16.0/power/control = auto (0x078000, Communication controller, mei_me)
/sys/bus/pci/devices/0000:00:17.0/power/control = auto (0x010601, SATA controller, ahci)
/sys/bus/pci/devices/0000:00:1c.0/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1d.0/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1f.0/power/control = auto (0x060100, ISA bridge, no driver)
/sys/bus/pci/devices/0000:00:1f.2/power/control = auto (0x058000, Memory controller, no driver)
/sys/bus/pci/devices/0000:00:1f.3/power/control = auto (0x040380, Audio device, snd_hda_intel)
/sys/bus/pci/devices/0000:00:1f.4/power/control = auto (0x0c0500, SMBus, i801_smbus)
/sys/bus/pci/devices/0000:01:00.0/power/control = auto (0x010802, Non-Volatile memory controller, nvme)
/sys/bus/pci/devices/0000:02:00.0/power/control = auto (0x028000, Network controller, iwlwifi)

+++ USB
Autosuspend = enabled
Device allowlist = (not configured)
Device denylist = (not configured)
Exclude audio = enabled
Exclude bluetooth = disabled
Exclude phones = disabled
Exclude printers = enabled
Exclude WWAN = disabled

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 8087:0a2a control = auto, autosuspend_delay_ms = 2000 -- Intel Corp. Bluetooth wireless interface (btusb)
Bus 001 Device 002 ID 04f2:b593 control = auto, autosuspend_delay_ms = 2000 -- Chicony Electronics Co., Ltd HP Wide Vision FHD Camera (uvcvideo)
Bus 001 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)

Additional context

The battery in this laptop has been replaced with an aftermarket unit.
Occasionally the laptop does not fully power down and I am forced to hold down the power key to achieve shut-off.

@linrunner
Copy link
Owner

At this point, the service start is aborted:

Jul 09 09:08:57 jLaptop tlp[1712]: Setting battery charge thresholds.../usr/sbin/tlp: 14: readonly: BATDRV_LG_BCL: is read only

However, the error that the shell thinks it recognizes in the script does not exist. I cannot reproduce it here under Bookworm either.

I need to know which shell is running the scripts on your system. Please show the output of

ls -l /bin/sh
cat /etc/shells

Does the problem also occur with this command (show the output)?

sudo tlp noop

Then please reinstall TLP and check if the error still occurs (show the output):

sudo apt install --reinstall tlp

@JayH1119
Copy link
Author

After reboot:

jay@jLaptop:~$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Jan 5 2023 /bin/sh -> dash

jay@jLaptop:~$ cat /etc/shells
/bin/sh
/bin/bash
/usr/bin/bash
/bin/rbash
/usr/bin/rbash
/bin/dash
/usr/bin/dash
/bin/zsh
/usr/bin/zsh
/usr/bin/sh

jay@jLaptop:~$ echo $SHELL
/bin/zsh

jay@jLaptop:~$ sudo tlp noop
/usr/sbin/tlp: 14: readonly: BATDRV_LG_BCL: is read only

@linrunner
Copy link
Owner

Have you done the reinstallation?

@JayH1119
Copy link
Author

JayH1119 commented Jul 10, 2024 via email

@linrunner
Copy link
Owner

Then let's take a look what the shell actually does:

sudo sh -x /usr/sbin/tlp noop 2>&1 > tlp-noop.out

Please attach the output file tlp-noop.out.

@JayH1119
Copy link
Author

jay@jLaptop:~$ sudo sh -x /usr/sbin/tlp noop > tlp-noop.out

  • . /usr/share/tlp/tlp-func-base
  • readonly TLPVER=1.5.0
  • readonly RUNDIR=/run/tlp
  • readonly VARDIR=/var/lib/tlp
  • readonly CONF_DEF=/usr/share/tlp/defaults.conf
  • readonly CONF_DIR=/etc/tlp.d
  • readonly CONF_USR=/etc/tlp.conf
  • readonly CONF_OLD=/etc/default/tlp
  • readonly CONF_RUN=/run/tlp/run.conf
  • readonly FLOCK=flock
  • readonly HDPARM=hdparm
  • readonly LAPMODE=laptop_mode
  • readonly LOGGER=logger
  • readonly MKTEMP=mktemp
  • readonly MODPRO=modprobe
  • readonly READCONFS=/usr/share/tlp/tlp-readconfs
  • readonly SYSTEMCTL=systemctl
  • readonly TPACPIBAT=/usr/share/tlp/tpacpi-bat
  • readonly UDEVADM=udevadm
  • readonly LOCKFILE=/run/tlp/lock
  • readonly LOCKTIMEOUT=2
  • readonly PWRRUNFILE=/run/tlp/last_pwr
  • readonly MANUALMODEFILE=/run/tlp/manual_mode
  • readonly MOD_MSR=msr
  • readonly MOD_TEMP=coretemp
  • readonly DMID=/sys/class/dmi/id/
  • readonly NETD=/sys/class/net
  • readonly TPACPID=/sys/devices/platform/thinkpad_acpi
  • readonly RE_PARAM=^[A-Z_]+[0-9]=[-0-9a-zA-Z _.:]$
  • readonly RE_PS_IGNORE=sbs-charger|hidpp_battery|hid-
  • readonly DEBUG_TAGS_ALL=arg bat cfg disk lock nm path pm ps rf run sysfs udev usb
  • readonly TLP_SERVICES=tlp.service
  • readonly CONFLICTING_SERVICES=power-profiles-daemon.service
  • readonly RFKILL_SERVICES=systemd-rfkill.service systemd-rfkill.socket
  • _nodebug=0
  • . /usr/share/tlp/func.d/05-tlp-func-pm
  • readonly ETHTOOL=ethtool
  • readonly PCID=/sys/bus/pci/devices
  • readonly PCIDRV=/sys/bus/pci/drivers
  • . /usr/share/tlp/func.d/10-tlp-func-cpu
  • readonly CPUD=/sys/devices/system/cpu
  • readonly CPU_BOOST_ALL_CTRL=/sys/devices/system/cpu/cpufreq/boost
  • readonly INTEL_PSTATED=/sys/devices/system/cpu/intel_pstate
  • readonly CPU_MIN_PERF_PCT=/sys/devices/system/cpu/intel_pstate/min_perf_pct
  • readonly CPU_MAX_PERF_PCT=/sys/devices/system/cpu/intel_pstate/max_perf_pct
  • readonly CPU_TURBO_PSTATE=/sys/devices/system/cpu/intel_pstate/no_turbo
  • readonly CPU_HWP_DYN_BOOST=/sys/devices/system/cpu/intel_pstate/hwp_dynamic_boost
  • readonly CPU_INFO=/proc/cpuinfo
  • readonly ENERGYPERF=x86_energy_perf_policy
  • readonly FWACPID=/sys/firmware/acpi
  • . /usr/share/tlp/func.d/15-tlp-func-disk
  • readonly AHCID=/sys/bus/pci/devices//ata
  • readonly ALPMD=/sys/bus/pci/devices//ata/host*/scsi_host/host*
  • readonly DISK_NOP_WORDS=_ keep
  • . /usr/share/tlp/func.d/20-tlp-func-usb
  • readonly USBD=/sys/bus/usb/devices
  • readonly USB_TIMEOUT_MS=2000
  • readonly USB_WWAN_VENDORS=0bdb 05c6 1199 2cb7
  • readonly USB_DONE=usb_done
  • . /usr/share/tlp/func.d/25-tlp-func-rf
  • readonly IW=iw
  • readonly BLUETOOTHD=/sys/class/bluetooth
  • . /usr/share/tlp/func.d/30-tlp-func-rf-sw
  • readonly NMCLI=nmcli
  • readonly RFKILL=rfkill
  • readonly RFKD=/dev/rfkill
  • readonly ALLDEV=bluetooth nfc wifi wwan
  • readonly RDW_NM_LOCK=rdw_nm
  • readonly RDW_DOCK_LOCK=rdw_dock
  • readonly RDW_LOCKTIME=2
  • readonly RDW_KILL=rdw_kill
  • readonly RFSTATEFILE=/var/lib/tlp/rfkill_saved
  • . /usr/share/tlp/func.d/35-tlp-func-batt
  • readonly ACPIBATDIR=/sys/class/power_supply
  • . /usr/share/tlp/func.d/40-tlp-func-bay
  • readonly DOCKGLOB=/sys/devices/platform/dock.?
  • readonly BAYSTATEFILE=/run/tlp/bay_saved
  • . /usr/share/tlp/func.d/45-tlp-func-gpu
  • readonly BASE_MODD=/sys/module
  • readonly BASE_DRMD=/sys/class/drm
  • readonly BASE_DEBUGD=/sys/kernel/debug/dri
  • readonly IGPU_MIN_FREQ=gt_min_freq_mhz
  • readonly IGPU_MAX_FREQ=gt_max_freq_mhz
  • readonly IGPU_BOOST_FREQ=gt_boost_freq_mhz
  • readonly IGPU_RPN_FREQ=gt_RPn_freq_mhz
  • readonly IGPU_RP0_FREQ=gt_RP0_freq_mhz
  • read_config 1 0
  • local rc=0
  • local tmpdir
  • test_root
  • id -u
  • [ 0 = 0 ]
  • tmpdir=/run/tlp
  • create_rundir
  • [ -d /run/tlp ]
  • mktemp -p /run/tlp tlp-run.conf_tmpXXXXXX
  • _conf_tmp=/run/tlp/tlp-run.conf_tmp79UdyW
  • [ 0 = 1 ]
  • /usr/share/tlp/tlp-readconfs --outfile /run/tlp/tlp-run.conf_tmp79UdyW
  • rc=0
  • [ 0 -eq 0 ]
  • . /run/tlp/tlp-run.conf_tmp79UdyW
  • TLP_ENABLE=1
  • TLP_WARN_LEVEL=3
  • TLP_PERSISTENT_DEFAULT=0
  • DISK_IDLE_SECS_ON_AC=0
  • DISK_IDLE_SECS_ON_BAT=2
  • MAX_LOST_WORK_SECS_ON_AC=15
  • MAX_LOST_WORK_SECS_ON_BAT=60
  • CPU_ENERGY_PERF_POLICY_ON_AC=balance_performance
  • CPU_ENERGY_PERF_POLICY_ON_BAT=balance_power
  • SCHED_POWERSAVE_ON_AC=0
  • SCHED_POWERSAVE_ON_BAT=1
  • NMI_WATCHDOG=0
  • DISK_DEVICES=nvme0n1 sda
  • DISK_APM_LEVEL_ON_AC=254 254
  • DISK_APM_LEVEL_ON_BAT=128 128
  • DISK_APM_CLASS_DENYLIST=usb ieee1394
  • DISK_IOSCHED=keep keep
  • SATA_LINKPWR_ON_AC=med_power_with_dipm max_performance
  • SATA_LINKPWR_ON_BAT=med_power_with_dipm min_power
  • AHCI_RUNTIME_PM_ON_AC=on
  • AHCI_RUNTIME_PM_ON_BAT=auto
  • AHCI_RUNTIME_PM_TIMEOUT=15
  • PCIE_ASPM_ON_AC=default
  • PCIE_ASPM_ON_BAT=default
  • RADEON_DPM_PERF_LEVEL_ON_AC=auto
  • RADEON_DPM_PERF_LEVEL_ON_BAT=auto
  • RADEON_POWER_PROFILE_ON_AC=default
  • RADEON_POWER_PROFILE_ON_BAT=default
  • WIFI_PWR_ON_AC=off
  • WIFI_PWR_ON_BAT=on
  • WOL_DISABLE=Y
  • SOUND_POWER_SAVE_ON_AC=1
  • SOUND_POWER_SAVE_ON_BAT=1
  • SOUND_POWER_SAVE_CONTROLLER=Y
  • BAY_POWEROFF_ON_AC=0
  • BAY_POWEROFF_ON_BAT=0
  • BAY_DEVICE=sr0
  • RUNTIME_PM_ON_AC=on
  • RUNTIME_PM_ON_BAT=auto
  • RUNTIME_PM_DRIVER_DENYLIST=mei_me nouveau radeon
  • USB_AUTOSUSPEND=1
  • USB_EXCLUDE_AUDIO=1
  • USB_EXCLUDE_BTUSB=0
  • USB_EXCLUDE_PHONE=0
  • USB_EXCLUDE_PRINTER=1
  • USB_EXCLUDE_WWAN=0
  • USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=0
  • RESTORE_DEVICE_STATE_ON_STARTUP=0
  • RESTORE_THRESHOLDS_ON_BAT=0
  • NATACPI_ENABLE=1
  • TPACPI_ENABLE=1
  • TPSMAPI_ENABLE=1
  • [ 0 -ne 0 ]
  • return 0
  • parse_args noop
  • _cmd=nil
  • _cmd2=nil
  • _carg1=nil
  • _carg2=nil
  • _carg3=nil
  • [ 1 -gt 0 ]
  • [ noop = -- ]
  • [ nil = nil ]
  • _cmd=noop
  • _cmd2=
  • shift
  • [ 0 -gt 0 ]
  • [ noop = nil ]
  • [ nil = nil ]
  • _carg1=
  • [ nil = nil ]
  • _carg2=
  • [ nil = nil ]
  • _carg3=
  • return 0
  • parse_args4config noop
  • local argd= cfgd= dflag=0 param value
  • [ 1 -gt 0 ]
  • [ 0 -eq 1 ]
  • [ noop = -- ]
  • argd= noop
  • shift
  • [ 0 -gt 0 ]
  • echo_debug arg parse_args4config: tlp noop --
  • [ 0 = 1 ]
  • wordinlist arg
  • local word
  • [ -n arg ]
  • return 1
  • return 0
  • check_tlp_enabled 1
  • [ 1 = 1 ]
  • return 0
  • add_sbin2path
  • local sp
  • _oldpath=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • _addpath=
  • [ -d /usr/sbin ]
  • [ ! -h /usr/sbin ]
  • [ -d /sbin ]
  • [ ! -h /sbin ]
  • [ -n ]
  • return 0
  • check_laptop_mode_tools
  • cmd_exists laptop_mode
  • command -v laptop_mode
  • return 0
  • [ -z ]
  • echo_debug run +++ noop (1.5.0) ++++++++++++++++++++++++++++++++++++++++
  • [ 0 = 1 ]
  • wordinlist run
  • local word
  • [ -n run ]
  • return 1
  • [ -n ]
  • echo_debug path PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • [ 0 = 1 ]
  • wordinlist path
  • local word
  • [ -n path ]
  • return 1
  • get_power_mode noop
  • get_sys_power_supply noop
  • local bs ps_ignore psrc psrc_name
  • local ac0seen=
  • local wait=
  • _psdev=
  • _syspwr=
  • [ -n ]
  • toupper
  • printf %s
  • tr [:lower:] [:upper:]
  • ps_ignore=
  • psrc_name=ADP1
  • printf %s\n ADP1
  • grep -E -q sbs-charger|hidpp_battery|hid-
  • read_sysf /sys/class/power_supply/ADP1/type
  • cat /sys/class/power_supply/ADP1/type
  • return 0
  • _psdev=/sys/class/power_supply/ADP1
  • wordinlist AC
  • local word
  • [ -n AC ]
  • return 1
  • read_sysf /sys/class/power_supply/ADP1/online
  • cat /sys/class/power_supply/ADP1/online
  • return 0
  • [ 0 = 1 ]
  • _syspwr=1
  • echo_debug ps get_sys_power_supply(ADP1).ac_offline: syspwr=1
  • [ 0 = 1 ]
  • wordinlist ps
  • local word
  • [ -n ps ]
  • return 1
  • break
  • [ -z 1 ]
  • return 1
  • local rc=1
  • get_persist_mode
  • local rc=1
  • _persist_mode=none
  • [ 0 = 1 ]
  • return 1
  • [ 1 -eq 2 ]
  • return 1
  • pwrmode=1
  • get_manual_mode
  • local rc=1
  • _manual_mode=none
  • [ -f /run/tlp/manual_mode ]
  • return 1
  • echo_debug run power_source=bat
  • [ 0 = 1 ]
  • wordinlist run
  • local word
  • [ -n run ]
  • return 1
  • echo_debug run manual_mode=none
  • [ 0 = 1 ]
  • wordinlist run
  • local word
  • [ -n run ]
  • return 1
  • echo_debug run power_mode=bat
  • [ 0 = 1 ]
  • wordinlist run
  • local word
  • [ -n run ]
  • return 1
  • exitcode=0
  • check_root
  • test_root
  • id -u
  • [ 0 = 0 ]
  • select_batdrv
  • [ -z ]
  • . /usr/share/tlp/bat.d/05-thinkpad
  • readonly SMAPIBATDIR=/sys/devices/platform/smapi
  • readonly RE_TPSMAPI_ONLY=^(Edge( 13.*)?|G41|R[56][012][eip]?|R[45]00|SL[45]10|T23|T[346][0123][p]?|T[45][01]0[s]?|W[57]0[01]|X[346][012][s]?( Tablet)?|X1[02]0e|X[23]0[01][s]?( Tablet)?|Z6[01][mpt])$
  • readonly RE_TPSMAPI_AND_TPACPI=^(X1|X220[s]?( Tablet)?|T[45]20[s]?|W520)$
  • readonly RE_TP_NONE=^(L[45]20|L512|SL[345]00|X121e)$
  • readonly MODINFO=modinfo
  • readonly MOD_TPSMAPI=tp_smapi
  • readonly MOD_TPACPI=acpi_call
  • batdrv_init
  • _batdrv_plugin=thinkpad
  • _batdrv_kmod=thinkpad_acpi
  • [ -n ]
  • wordinlist thinkpad
  • local word
  • [ -n thinkpad ]
  • return 1
  • check_thinkpad
  • local pv
  • _tpmodel=
  • [ -d /sys/devices/platform/thinkpad_acpi ]
  • read_dmi product_version
  • local ds key outr
  • outr=
  • read_sysf /sys/class/dmi/id//product_version
    • cat /sys/class/dmi/id//product_version
      grep -E -v -i not available|to be filled|DMI table is broken
  • return 0
  • ds=Type1ProductConfigId
  • [ -n ]
  • outr=Type1ProductConfigId
  • printf %s Type1ProductConfigId
  • return 0
  • pv=Type1ProductConfigId
  • [ -n ]
  • echo_debug bat check_thinkpad.not_a_thinkpad: model=Type1ProductConfigId
  • [ 0 = 1 ]
  • wordinlist bat
  • local word
  • [ -n bat ]
  • return 1
  • return 1
  • echo_debug bat batdrv_init.thinkpad.not_a_thinkpad
  • [ 0 = 1 ]
  • wordinlist bat
  • local word
  • [ -n bat ]
  • return 1
  • return 1
  • . /usr/share/tlp/bat.d/10-thinkpad-legacy
  • batdrv_init
  • _batdrv_plugin=thinkpad-legacy
  • _batdrv_kmod=tp_smapi
  • [ -n ]
  • wordinlist thinkpad-legacy
  • local word
  • [ -n thinkpad-legacy ]
  • return 1
  • check_thinkpad
  • local pv
  • _tpmodel=
  • [ -d /sys/devices/platform/thinkpad_acpi ]
  • read_dmi product_version
  • local ds key outr
  • outr=
  • read_sysf /sys/class/dmi/id//product_version
    • cat /sys/class/dmi/id//product_version
      grep -E -v -i not available|to be filled|DMI table is broken
  • return 0
  • ds=Type1ProductConfigId
  • [ -n ]
  • outr=Type1ProductConfigId
  • printf %s Type1ProductConfigId
  • return 0
  • pv=Type1ProductConfigId
  • [ -n ]
  • echo_debug bat check_thinkpad.not_a_thinkpad: model=Type1ProductConfigId
  • [ 0 = 1 ]
  • wordinlist bat
  • local word
  • [ -n bat ]
  • return 1
  • return 1
  • echo_debug bat batdrv_init.thinkpad-legacy.not_a_thinkpad
  • [ 0 = 1 ]
  • wordinlist bat
  • local word
  • [ -n bat ]
  • return 1
  • return 1
  • . /usr/share/tlp/bat.d/15-asus
  • readonly BATDRV_ASUS_MD=/sys/module/asus_wmi
  • batdrv_init
  • _batdrv_plugin=asus
  • _batdrv_kmod=asus_wmi
  • [ -n ]
  • wordinlist asus
  • local word
  • [ -n asus ]
  • return 1
  • batdrv_is_asus
  • [ -d /sys/module/asus_wmi ]
  • echo_debug bat batdrv_init.asus.no_match
  • [ 0 = 1 ]
  • wordinlist bat
  • local word
  • [ -n bat ]
  • return 1
  • return 1
  • . /usr/share/tlp/bat.d/20-huawei
  • readonly BATDRV_HUAWEI_MD=/sys/devices/platform/huawei-wmi
  • readonly BATDRV_HUAWEI_THRESH=/sys/devices/platform/huawei-wmi/charge_control_thresholds
  • batdrv_init
  • _batdrv_plugin=huawei
  • _batdrv_kmod=huawei_wmi
  • [ -n ]
  • wordinlist huawei
  • local word
  • [ -n huawei ]
  • return 1
  • batdrv_is_huawei
  • [ -d /sys/devices/platform/huawei-wmi ]
  • echo_debug bat batdrv_init.huawei.no_match
  • [ 0 = 1 ]
  • wordinlist bat
  • local word
  • [ -n bat ]
  • return 1
  • return 1
  • . /usr/share/tlp/bat.d/25-lenovo
  • readonly BATDRV_LENOVO_MD=/sys/bus/platform/drivers/ideapad_acpi
  • readonly BATDRV_LENOVO_CMODE=/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode
  • batdrv_init
  • _batdrv_plugin=lenovo
  • _batdrv_kmod=ideapad_laptop
  • [ -n ]
  • wordinlist lenovo
  • local word
  • [ -n lenovo ]
  • return 1
  • batdrv_is_ideapad
  • [ -d /sys/bus/platform/drivers/ideapad_acpi ]
  • echo_debug bat batdrv_init.lenovo.no_match
  • [ 0 = 1 ]
  • wordinlist bat
  • local word
  • [ -n bat ]
  • return 1
  • return 1
  • . /usr/share/tlp/bat.d/30-samsung
  • readonly BATDRV_SAMSUNG_MD=/sys/devices/platform/samsung
  • readonly BATDRV_SAMSUNG_BLE=/sys/devices/platform/samsung/battery_life_extender
  • batdrv_init
  • _batdrv_plugin=samsung
  • _batdrv_kmod=samsung_laptop
  • [ -n ]
  • wordinlist samsung
  • local word
  • [ -n samsung ]
  • return 1
  • batdrv_is_samsung
  • [ -d /sys/devices/platform/samsung ]
  • echo_debug bat batdrv_init.samsung.no_match
  • [ 0 = 1 ]
  • wordinlist bat
  • local word
  • [ -n bat ]
  • return 1
  • return 1
  • . /usr/share/tlp/bat.d/35-lg
  • readonly BATDRV_LG_MD=/sys/devices/platform/lg-laptop
  • readonly BATDRV_LG_BCL=/sys/devices/platform/lg-laptop/battery_care_limit
  • batdrv_init
  • _batdrv_plugin=lg
  • _batdrv_kmod=lg_laptop
  • [ -n ]
  • wordinlist lg
  • local word
  • [ -n lg ]
  • return 1
  • batdrv_is_lg
  • [ -d /sys/devices/platform/lg-laptop ]
  • echo_debug bat batdrv_init.lg.no_match
  • [ 0 = 1 ]
  • wordinlist bat
  • local word
  • [ -n bat ]
  • return 1
  • return 1
  • . /usr/share/tlp/bat.d/36-lg-legacy
  • readonly BATDRV_LG_BCL=/sys/devices/platform/lg-laptop/battery_care_limit
    /usr/sbin/tlp: 14: readonly: BATDRV_LG_BCL: is read only

@linrunner
Copy link
Owner

/usr/share/tlp/bat.d/36-lg-legacy

This file is the cause. It is not included in the Debian Bookworm package tlp 1.5.0-2. It is only available in later TLP versions.

How does it get on your disk?

@JayH1119
Copy link
Author

Well, that's embarrassing. I had previously installed and removed tlp, apparently from source rather than from the distro, and that was leftover.

Thank you kindly for your time.

@linrunner
Copy link
Owner

That's what I suspected. You should uninstall the package once more, delete the directory /usr/share/tlp and install the package again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants