Bug 1744154 - tlp-sleep service stop working after tlp upgrade to tlp-1.2.2-1
Summary: tlp-sleep service stop working after tlp upgrade to tlp-1.2.2-1
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: tlp
Version: 30
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jeremy Newton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-21 13:06 UTC by aleksey.tretya@gmail.com
Modified: 2019-09-20 19:17 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)
tlp-1.2.1-1.fc30 (227.94 KB, text/plain)
2019-09-20 18:57 UTC, Mateusz Kowalski
no flags Details
tlp-1.2.2-1.fc30 (35.45 KB, text/plain)
2019-09-20 18:58 UTC, Mateusz Kowalski
no flags Details

Description aleksey.tretya@gmail.com 2019-08-21 13:06:33 UTC
Description of problem:

After upgrading tlp package from tlp-1.2.1-1.fc30.noarch to tlp-1.2.2-1.fc30.noarch, tlp-sleep service start failing on suspend. Downgrade to tlp-1.2.1-1.fc30.noarch fixes problem. The issue is reproduced on Thinkpad t480 and Thinkpad x220
 

> systemctl status tlp-sleep.service
 
● tlp-sleep.service - TLP suspend/resume
   Loaded: loaded (/usr/lib/systemd/system/tlp-sleep.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: https://linrunner.de/tlp

Aug 19 13:23:40 localhost.localdomain systemd[1]: Failed to start TLP suspend/resume.
Aug 19 14:51:08 localhost.localdomain systemd[1]: Starting TLP suspend/resume...
Aug 19 14:51:08 localhost.localdomain systemd[1]: tlp-sleep.service: Main process exited, code=exited, status=1/FAILURE
Aug 19 14:51:08 localhost.localdomain systemd[1]: tlp-sleep.service: Failed with result 'exit-code'.
Aug 19 14:51:08 localhost.localdomain systemd[1]: Failed to start TLP suspend/resume.

> journalctl -u tlp-sleep

Aug 19 14:51:08 localhost.localdomain systemd[1]: Starting TLP suspend/resume...
Aug 19 14:51:08 localhost.localdomain systemd[1]: tlp-sleep.service: Main process exited, code=exited, status=1/FAILURE
Aug 19 14:51:08 localhost.localdomain systemd[1]: tlp-sleep.service: Failed with result 'exit-code'.
Aug 19 14:51:08 localhost.localdomain systemd[1]: Failed to start TLP suspend/resume.



Version-Release number of selected component (if applicable): tlp-1.2.2-1


Steps to Reproduce:
1. Install tlp-1.2.2-1.fc30.noarch
2. Enable tlp, tlp-sleep service
3. Close laptop lid to suspend system and open it up
4. Observe service status

Actual results:
tlp-sleep service failed to start

Expected results:
tlp-sleep service successfully started

Additional info:
tpl was used with default settings, reproduced with AC connected and without.

Comment 2 ThinkPad 2019-09-03 20:29:38 UTC
Experiencing same issue on ThinkPad X390.

Comment 3 Mateusz Kowalski 2019-09-20 18:56:57 UTC
I can provide more debug info about the issue, Fedora 30 on Lenovo Thinkpad X1 Carbon 6th gen. is also affected, but I do not think this is strictly related with the issue. I'm attaching strace of `/usr/sbin/tlp suspend` using both tlp-1.2.1-1.fc30 and tlp-1.2.2-1.fc30, below outlining the most important observation.

One of the last important calls in the broken version is

```
openat(AT_FDCWD, "/var/lib/tlp/rfkill_saved", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 ENOENT (No such file or directory)
```

Equivalent call in the working version is

```
openat(AT_FDCWD, "/run/tlp/rfkill_saved", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
```

Please do note difference in the paths referencing `rfkill_saved`. I can see on my system the latter is indeed a correct path whereas the former is wrong

```
$ cat /run/tlp/rfkill_saved 
bluetooth 1
wwan 254
$ cat /var/lib/tlp/rfkill_saved
cat: /var/lib/tlp/rfkill_saved: No such file or directory
```

Comment 4 Mateusz Kowalski 2019-09-20 18:57:46 UTC
Created attachment 1617294 [details]
tlp-1.2.1-1.fc30

Comment 5 Mateusz Kowalski 2019-09-20 18:58:06 UTC
Created attachment 1617295 [details]
tlp-1.2.2-1.fc30

Comment 6 Mateusz Kowalski 2019-09-20 19:17:46 UTC
Also, an issue in the TLP project itself has been opened - https://github.com/linrunner/TLP/issues/434.


Note You need to log in before you can comment on or make changes to this bug.