Bug 84251 - user service does not get executed after timer wakeup
Summary: user service does not get executed after timer wakeup
Status: NEW
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-23 15:35 UTC by Kai
Modified: 2015-03-01 18:37 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
test script to reproduce the bug. see end of text for more information (2.27 KB, text/plain)
2014-09-23 15:35 UTC, Kai
Details
new version of the wakeup script for user services (2.18 KB, text/plain)
2014-12-03 21:45 UTC, Kai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kai 2014-09-23 15:35:46 UTC
Created attachment 106745 [details]
test script to reproduce the bug. see end of text for more information

While system services get correctly executed after a timer wakeup, this does not work for user services.

The service gets executed after the timer event when no suspend was done, but when the system is suspended, the timer only wakes it up but does not start the service.

Attached is a ipython script to show this behavior. Start it as user in your desktop session via
./maketimeevent.ipy normal
to see that starting the service works well without suspend and then start it via
./maketimeevent.ipy suspend
to see that your system wakes up after 20 seconds but the service is not started. Because the script waits for the service which is not started, please bring it to an end by manually invoking
echo finished | netcat localhost 19927


P.S.: Is there another place than /etc/systemd/user/ for that?
Comment 1 Kai 2014-09-23 18:46:08 UTC
Reported with systemd version 215-4 in Debian sid
Comment 2 Kai 2014-12-03 21:45:56 UTC
Created attachment 110425 [details]
new version of the wakeup script for user services

On Debian systemd 217 this is till an issue. I attached the script running only as user and without sudo (because ~/.config/systemd/ is used instead of /etc/systemd/).

Running without suspend:
Dez 03 22:28:57 hostname systemd[1737]: Starting test wake timer.
Dez 03 22:28:57 hostname systemd[1737]: Started test wake timer.
Dez 03 22:29:24 hostname systemd[1737]: Starting -.slice.
Dez 03 22:29:24 hostname systemd[1737]: Created slice -.slice.
Dez 03 22:29:24 hostname systemd[1737]: Starting test wake action...
Dez 03 22:29:24 hostname systemd[1737]: Started test wake action.

Running with suspend:
Dez 03 22:29:28 hostname systemd[1737]: Stopping test wake timer.
Dez 03 22:29:28 hostname systemd[1737]: Stopped test wake timer.
Dez 03 22:29:28 hostname systemd[1737]: Stopped test wake action.
Dez 03 22:29:54 hostname systemd[1737]: Starting test wake timer.
Dez 03 22:29:54 hostname systemd[1737]: Started test wake timer.
Dez 03 22:30:14 hostname systemd[1737]: Time has been changed

So the service is still not started.
Comment 3 Kai 2015-03-01 18:37:55 UTC
Still with systemd 219 (on Debian) the service is not started after wakeup. Does this work for other distributions?


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.