TLP doesn't seem to work with latest upower 0.9.21 #36

Closed
adamdagan7 opened this Issue Aug 4, 2013 · 7 comments

2 participants

@adamdagan7

Hello,
After upgrading upower to 0.9.21 (via arch [testing]), it seems that TLP no longer works.
If I understand correctly, 0.9.21 relies on systemd functionality by default and not pm-utils, and since TLP relies on pm-utils it ends up with TLP not working.

@linrunner linrunner was assigned Aug 4, 2013
@linrunner
Owner

Hi,

can you give me a hint which systemd targets are called by upower 0.9.21 when the power source changes between ac and bat (and vice versa)?

EDIT: and please add the full output of

tlp-stat

for ac and bat power.

@adamdagan7

I think the relevant commit is the following. I'm not much of a developer myself, but hopefully you can find something useful in it:
http://cgit.freedesktop.org/upower/commit/?id=8bbf566dc8a80d129e202de619fe9da6f2e8b80b

AC - http://pastebin.com/zvCEsCSF
BAT - http://pastebin.com/dBccYPp7

@adamdagan7

Found some more info:
https://bugs.archlinux.org/task/36363
https://bugzilla.xfce.org/show_bug.cgi?id=9963

It deals with suspend/resume, but from what I understand it's the same idea.

@linrunner
Owner

OK, i think we should go with udev. Please add the following lines at the end of the file /usr/lib/udev/rules.d/40-tlp.rules:

# handle change of power source ac/bat
ACTION=="add|change", SUBSYSTEM=="power_supply", RUN+="/usr/bin/tlp start"
@adamdagan7

Works great.
Thanks for the quick solution, linrunner.

@adamdagan7 adamdagan7 closed this Aug 15, 2013
@adamdagan7 adamdagan7 reopened this Aug 15, 2013
@linrunner linrunner pushed a commit that referenced this issue Aug 17, 2013
Thomas Koch Architecture changes:
- Issue #36: detect change of power source via udev instead of being called by pm-powersave
- Handle suspend/resume w/o pm-utils in systemd environments:
  - Encapsulate suspend/resume tasks as a tlp subcommand
  - Add tlp-sleep.service to call tlp suspend/resume
  - Remove 48tlp-rdw.lock because it doesn't work as expected
0880821
@linrunner
Owner

Arch packaging for (testing) version 0.3.10 is in the works.

@linrunner
Owner

Released with 0.3.10.1.

@linrunner linrunner closed this Aug 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment