1

My installation of TLP on Ubuntu 19.04 does not automatically change status when charging status changes.

Output from

    sudo tlp-stat -s
    --- TLP 1.1 --------------------------------------------

    +++ System Info
    System         = HP Type1ProductConfigId HP Pavilion Gaming Laptop 15- cx0xxx
    BIOS           = F.11
    Release        = Ubuntu 19.04
    Kernel         = 5.0.0-20-generic #21-Ubuntu SMP Mon Jun 24 09:32:09 UTC 2019 x86_64
    /proc/cmdline  = BOOT_IMAGE=/boot/vmlinuz-5.0.0-20-generic root=UUID=60b2ea7a-4132-4a64-8f5c-2e6484bce09a ro quiet splash vt.handoff=1
    Init system    = systemd v240
    Boot mode      = UEFI

    +++ TLP Status
    State          = enabled
    Last run       = 15:56:31,    795 sec(s) ago
    Mode           = AC
    Power source   = AC

Changes to:

    --- TLP 1.1 --------------------------------------------

    +++ System Info
    System         = HP Type1ProductConfigId HP Pavilion Gaming Laptop 15-cx0xxx
    BIOS           = F.11
    Release        = Ubuntu 19.04
    Kernel         = 5.0.0-20-generic #21-Ubuntu SMP Mon Jun 24 09:32:09 UTC 2019 x86_64
    /proc/cmdline  = BOOT_IMAGE=/boot/vmlinuz-5.0.0-20-generic root=UUID=60b2ea7a-4132-4a64-8f5c-2e6484bce09a ro quiet splash vt.handoff=1
    Init system    = systemd v240
    Boot mode      = UEFI

    +++ TLP Status
    State          = enabled
    Last run       = 15:56:31,    916 sec(s) ago
    Mode           = AC
    Power source   = battery

When unplugging the power cable. Since TLP uses udev events (as far as I understand) the first step I did was to check if events are correctly recieved.

    sudo udevadm monitor
    monitor will print the received events for:
    UDEV - the event which udev sends out after rule processing
    KERNEL - the kernel uevent

I unplugged the cable a few times and saw the charging status on the laptop change but nothing being printed in the console running the above monitor.

Also note that I recently upgraded from Ubuntu 18.04 LTS to 19.04. It did however not work even before the upgrade.

Any ideas? I am at my wits end when it comes to this.

  • That is the output from tlp stat -s – Albin Andersson Jul 22 '19 at 15:44
0

I'm running an older version of tlp on Ubuntu 16.04 where udevadm is working properly. The rules are stored here:

$ ll /lib/udev/rules.d/*tlp*
-rw-r--r-- 1 root root 1221 Aug 11  2015 /lib/udev/rules.d/85-tlp-rdw.rules
-rw-r--r-- 1 root root  440 Aug 11  2015 /lib/udev/rules.d/85-tlp.rules

There have been recent bug reports of your situation:

All bugs were reported on your TLP version 1.1 and fixes were released under version 1.2.

See the bug reports for instructions to fix.

  • Those links didn't seem to fix it but i might have found the cause. /sys/class/power_supply/BAT1/status is showing as Unknown instead of Charging or Discharging which should(?) be expected. Is this some issue with the battery or maybe the laptop itself? I also tried running version 1.3 from the creators git with the same results – Albin Andersson Jul 22 '19 at 18:17
  • Mine shows Full. Maybe try: cat /sys/class/power_supply/BAT0/status instead? – WinEunuuchs2Unix Jul 22 '19 at 20:26
  • My battery shows up as /sys/class/power_supply/BAT1 instead of BAT0. cat /sys/class/power_supply/BAT1/status does however show up correctly as charging or discharging. Do you think there is a way to change the udev event to listen to BAT1 instead of BAT0 or to maybe change the TLP rules to accomodate this difference? Sorry if the questions are basic, still pretty new to this. – Albin Andersson Jul 23 '19 at 5:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.