#StackBounty: #debian #systemd #initramfs #freeze #hang Intermittent hang after systemd startup on Debian Buster

Bounty: 50

I’m currently running Debian Buster with the 4.19.0-9-amd64 kernel. I find that intermittently after booting my system, selecting this kernel, entering my boot disk encryption key, and waiting for systemd to launch its services, my screen will clear, but will not proceed to launch my WM from that point. (as a note, 4.19.0-10-amd64 appears to cause this behavior 100% of the time)

Normally, I expect my primary monitor to turn off between systemd’s services starting and my WM login screen appearing, but that does not happen in these cases–instead, my system will hang on an apparently empty terminal screen (which does not animate or respond to input) until it is hard rebooted. To my knowledge, this has always occurred, even on a fresh Debian install with little-to-no other software installed.

The only other thing I could find which seems odd is that every time I boot, before prompting me for my encrypted disk key, I see the following lines:

  volume group "debian-vg" not found
  Cannot process volume group debian-vg
  volume group "debian-vg" not found
  Cannot process volume group debian-vg

I suspect they are not related, but this is the only oddity I can pinpoint in my boot.log.


Get this bounty!!!

#StackBounty: #systemd #gnu-screen #systemd-journald Capture log output for a systemd service running in a screen session

Bounty: 50

I’m running a Minecraft server as a systemd service. The service’s ExecStart is the path to a script whose contents are:

screen -L -DmS minecraft java -Xmx4096M -Xms1024M -jar server.jar nogui

That is, this is running as a simple service, not forked.

I would like for the output of the java call to be logged via systemd’s usual mechanism, in addition to being visible in the screen session. I am almost a total novice when it comes to systemd, so I’m not sure where to start with that. Can I tee the output of the java call into something?


Get this bounty!!!

#StackBounty: #systemd #shutdown #kubuntu Kubuntu 20.04 Shutdown/Reboot Hangs At "Waiting for process: crond"

Bounty: 50

I’m running Kubuntu 20.04. 3 out of 4 times when I shutdown or reboot, it hangs at:

 Reached target Reboot.
 systemd-shutdown[1]: Waiting for process: crond

I’ve spent a fair bit of time googling, but have unable to figure out why it’s doing this. It makes frequent reboots agonizingly slow. I did find one thread describing the same issue on the Ubuntu forums, but they failed to post their solution (just that they solved it).

Any help or info would be greatly appreciated.


Get this bounty!!!

#StackBounty: #systemd #sockets Generate a dir for unix sockets WITHOUT systemd

Bounty: 50

In normal Ubuntu I used to create a dir for Unix sockets as follows (say for project foo):

  1. Create a systemd script in: /usr/lib/tmpfiles.d/foo.conf
  2. Place the following code in the script:
    /run/foo 0770 <username> <groupname>
    

Then on the next reboot the dir /run/foo will be created with the required permissions. The reason I do this is because only root can write to /var/run which links to -> /run, and its common for many apps to drop priviledges and change user before creating the socket, and hence they fail to write to /var/run.

Now I am using WSL2, with Ubuntu 20.04, and systemd does not exist. One can jump through many hoops to get it to work but they are buggy.

How does one create a folder with desired permissions which gets cleared after a reboot before any of the installed apps (e.g. nginx/postgresql) attempt to create their sockets (and hence fail due to stale sockets from before the reboot)?


Get this bounty!!!

#StackBounty: #systemd Pause or stop systemd service while another is running

Bounty: 50

Regarding systemd, is it possible to pause or stop a running service (ensuring all data have been written) while another service is running?

My scenario looks like this: I have built a sensor (based upon a Raspberry Pi Zero W and running Kali Linux). The daemon process for sensing is starting (as systemd service unit sensor.service) right after the boot process finishes.

[Unit]
Description=Arbitrary sensor
After=network.target

[Service]
ExecStart=/usr/local/bin/sense --daemon

[Install]
WantedBy=multi-user.target

The sensor is collecting and storing the data locally and continuously. The data is being computed periodically and its result shall be sent away (over the network). Now, for the time of computation the sensor shall stop receiving further data to ensure all data have been written, before the computation starts. Right after the computation is done, the sensor shall start to collect further data.

Yes, I could write a script by myself which handles that:

systemctl stop sensor.service
systemctl start compute.service  # Terminates itself
systemctl start sensor.service

But I wonder, whether this is a scenario that can be handled by systemd for me? Especially without the need to write a script by myself. What I’m imaging is a compute.timer unit which handles the three lines above.


Get this bounty!!!

#StackBounty: #systemd #services #node.js systemd exits Node app

Bounty: 50

I am trying to use a systemd service to run a Node app (specifically, a React app generated with create-react-app. I put a file frontend.service at /etc/systemd/system/ with (minimally) these contents:

[Unit]
Description=React Web Application

[Service]
ExecStart=/usr/local/bin/npm start --prefix=<path to app>

[Install]
WantedBy=multi-user.target

After starting the service, my browser shows the nginx bad gateway error, and ps aux | grep node shows no corresponding process. The output of journalctl -u frontend reports successful steps like "Started React Web Application" and eventually "Starting development server…". However, systemctl status frontend reports that the service is loaded but inactive/dead (edit: or, active/exited).

I tried some adjustments to the .service file, in particular Type=forking, RemainAfterExit=true, and KillMode=process. But the problem persists. What is going on? How to fix this?

The app does work fine if I run it directly using npm start in the shell. Also, another (non-node) web server works fine running through a similar systemd script.

Here is the systemctl status output:

wm-frontend.service - React Web Application
   Loaded: loaded (/etc/systemd/system/wm-frontend.service; enabled; vendor preset: enabled)
   Active: active (exited) since Mon 2020-08-10 14:40:59 UTC; 32min ago
  Process: 4033 ExecStart=/usr/local/bin/npm start --prefix=/home/mw/wm-ax/frontend/blog --scripts-prepend-node-path (code=exited, status=0/SUCCESS)
 Main PID: 4033 (code=exited, status=0/SUCCESS)

Aug 10 14:40:59 localhost systemd[1]: Started React Web Application.
Aug 10 14:41:00 localhost npm[4033]: > blog@0.1.0 start /home/mw/wm-ax/frontend/blog
Aug 10 14:41:00 localhost npm[4033]: > react-scripts start
Aug 10 14:41:04 localhost npm[4033]: ℹ 「wds」: Project is running at http://0.0.0.0:3000/
Aug 10 14:41:04 localhost npm[4033]: ℹ 「wds」: webpack output is served from
Aug 10 14:41:04 localhost npm[4033]: ℹ 「wds」: Content not from webpack is served from /home/mw/wm-ax/frontend/blog/public
Aug 10 14:41:04 localhost npm[4033]: ℹ 「wds」: 404s will fallback to /
Aug 10 14:41:04 localhost npm[4033]: Starting the development server...


Get this bounty!!!

#StackBounty: #systemd #sxhkd Can't start sxhkd as a systemd service

Bounty: 100

I’m using bspwm on my Arch Linux install and I need to run the sxhkd hotkey daemon to launch my applications.

Up to now, the launch script was in my .config/bspwm/bspwmrc (which is a simple bash script file):

# Keyboard bindings manager
pkill sxhkd
sxhkd -m 1&

The -m 1 argument is there because I don’t have a qwerty keyboard.

The bspwmrc script is executed by my display manager, LightDM, when it auto logs me in. So far so good.

Reading the Arch Wiki, I realized I could start sxhkd with Systemd directly. There’s even a link to a sample service file; which contains:

[Unit]
Description=Simple X Hotkey Daemon
Documentation=man:sxhkd(1)
BindsTo=display-manager.service
After=display-manager.service

[Service]
ExecStart=/usr/bin/sxhkd
ExecReload=/usr/bin/kill -SIGUSR1 $MAINPID

[Install]
WantedBy=graphical.target

So I wondered, why not? And copied the sxhkd.service file to /etc/systemd/system (after adding the -m 1 argument), enabled the service with sudo systemctl enable sxhkd, commented the lines in the bspwmrc script, and restarted.

Alas, that does not work. When typing systemctl status sxhkd, I get this error message:

Warning: The unit file, source configuration file or drop-ins of sxhkd.service changed on disk. Run 'systemctl daemon-rel>
● sxhkd.service - Simple X Hotkey Daemon
     Loaded: loaded (/etc/systemd/system/sxhkd.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Fri 2020-07-24 10:29:05 CEST; 14min ago
       Docs: man:sxhkd(1)
   Main PID: 662 (code=exited, status=1/FAILURE)

Jul 24 10:29:05 Solgaleo systemd[1]: Started Simple X Hotkey Daemon.
Jul 24 10:29:05 Solgaleo sxhkd[662]: Can't open display.
Jul 24 10:29:05 Solgaleo systemd[1]: sxhkd.service: Main process exited, code=exited, status=1/FAILURE
Jul 24 10:29:05 Solgaleo systemd[1]: sxhkd.service: Failed with result 'exit-code'.

My understanding is that Can't open display means that sxhkd starts too early… and I don’t know why, or how to fix this.

I know I could just go back to my previous configuration, but if there’s something on the Arch Wiki that does not work, I’d rather find out if it’s my fault or if the wiki needs to be updated.

Edit:

Further investigation indicates that running sxhkd as root cannot work.

Here is what I changed:

I moved the sxhkd.service file from /etc/systemd/system to /etc/systemd/user and enabled it via the systemctl --user enable sxhkd command.

This still does not work, but with a different error message:

Failed to start sxhkd.service: Unit display-manager.service not found. 

Typing systemctl status display-manager gives:

● lightdm.service - Light Display Manager
     Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; vendor preset: disabled)
     Active: active (running) since Sat 2020-07-25 11:11:07 CEST; 10min ago
       Docs: man:lightdm(1)
   Main PID: 602 (lightdm)
      Tasks: 4 (limit: 38412)
     Memory: 63.7M
     CGroup: /system.slice/lightdm.service
             ├─602 /usr/bin/lightdm
             └─666 /usr/lib/Xorg -bs -core :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

Jul 25 11:11:05 Solgaleo systemd[1]: Starting Light Display Manager...
Jul 25 11:11:07 Solgaleo lightdm[602]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop>
Jul 25 11:11:07 Solgaleo systemd[1]: Started Light Display Manager.
Jul 25 11:11:08 Solgaleo lightdm[670]: pam_succeed_if(lightdm-autologin:auth): requirement "user ingroup autologin" was m>
Jul 25 11:11:08 Solgaleo lightdm[670]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop>
Jul 25 11:11:08 Solgaleo lightdm[670]: pam_unix(lightdm-autologin:session): session opened for user ben by (uid=0)
lines 1-17/17 (END)

Which means display-manager is properly running. Maybe it can’t be seen by a service launched with --user?

Edit2:

The BindsTo and After are actually not necessary: the service is started as a user, so after the user session has been started. But if I remove them, the service does not start at all upon startup. It works great if I start it manually though.

Edit3:

More details on the steps I followed here: https://bbs.archlinux.org/viewtopic.php?id=257626&p=2


Get this bounty!!!

#StackBounty: #systemd #sxhkd Can't start sxhkd as a systemd service

Bounty: 100

I’m using bspwm on my Arch Linux install and I need to run the sxhkd hotkey daemon to launch my applications.

Up to now, the launch script was in my .config/bspwm/bspwmrc (which is a simple bash script file):

# Keyboard bindings manager
pkill sxhkd
sxhkd -m 1&

The -m 1 argument is there because I don’t have a qwerty keyboard.

The bspwmrc script is executed by my display manager, LightDM, when it auto logs me in. So far so good.

Reading the Arch Wiki, I realized I could start sxhkd with Systemd directly. There’s even a link to a sample service file; which contains:

[Unit]
Description=Simple X Hotkey Daemon
Documentation=man:sxhkd(1)
BindsTo=display-manager.service
After=display-manager.service

[Service]
ExecStart=/usr/bin/sxhkd
ExecReload=/usr/bin/kill -SIGUSR1 $MAINPID

[Install]
WantedBy=graphical.target

So I wondered, why not? And copied the sxhkd.service file to /etc/systemd/system (after adding the -m 1 argument), enabled the service with sudo systemctl enable sxhkd, commented the lines in the bspwmrc script, and restarted.

Alas, that does not work. When typing systemctl status sxhkd, I get this error message:

Warning: The unit file, source configuration file or drop-ins of sxhkd.service changed on disk. Run 'systemctl daemon-rel>
● sxhkd.service - Simple X Hotkey Daemon
     Loaded: loaded (/etc/systemd/system/sxhkd.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Fri 2020-07-24 10:29:05 CEST; 14min ago
       Docs: man:sxhkd(1)
   Main PID: 662 (code=exited, status=1/FAILURE)

Jul 24 10:29:05 Solgaleo systemd[1]: Started Simple X Hotkey Daemon.
Jul 24 10:29:05 Solgaleo sxhkd[662]: Can't open display.
Jul 24 10:29:05 Solgaleo systemd[1]: sxhkd.service: Main process exited, code=exited, status=1/FAILURE
Jul 24 10:29:05 Solgaleo systemd[1]: sxhkd.service: Failed with result 'exit-code'.

My understanding is that Can't open display means that sxhkd starts too early… and I don’t know why, or how to fix this.

I know I could just go back to my previous configuration, but if there’s something on the Arch Wiki that does not work, I’d rather find out if it’s my fault or if the wiki needs to be updated.

Edit:

Further investigation indicates that running sxhkd as root cannot work.

Here is what I changed:

I moved the sxhkd.service file from /etc/systemd/system to /etc/systemd/user and enabled it via the systemctl --user enable sxhkd command.

This still does not work, but with a different error message:

Failed to start sxhkd.service: Unit display-manager.service not found. 

Typing systemctl status display-manager gives:

● lightdm.service - Light Display Manager
     Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; vendor preset: disabled)
     Active: active (running) since Sat 2020-07-25 11:11:07 CEST; 10min ago
       Docs: man:lightdm(1)
   Main PID: 602 (lightdm)
      Tasks: 4 (limit: 38412)
     Memory: 63.7M
     CGroup: /system.slice/lightdm.service
             ├─602 /usr/bin/lightdm
             └─666 /usr/lib/Xorg -bs -core :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

Jul 25 11:11:05 Solgaleo systemd[1]: Starting Light Display Manager...
Jul 25 11:11:07 Solgaleo lightdm[602]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop>
Jul 25 11:11:07 Solgaleo systemd[1]: Started Light Display Manager.
Jul 25 11:11:08 Solgaleo lightdm[670]: pam_succeed_if(lightdm-autologin:auth): requirement "user ingroup autologin" was m>
Jul 25 11:11:08 Solgaleo lightdm[670]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop>
Jul 25 11:11:08 Solgaleo lightdm[670]: pam_unix(lightdm-autologin:session): session opened for user ben by (uid=0)
lines 1-17/17 (END)

Which means display-manager is properly running. Maybe it can’t be seen by a service launched with --user?

Edit2:

The BindsTo and After are actually not necessary: the service is started as a user, so after the user session has been started. But if I remove them, the service does not start at all upon startup. It works great if I start it manually though.

Edit3:

More details on the steps I followed here: https://bbs.archlinux.org/viewtopic.php?id=257626&p=2


Get this bounty!!!

#StackBounty: #systemd #sxhkd Can't start sxhkd as a systemd service

Bounty: 100

I’m using bspwm on my Arch Linux install and I need to run the sxhkd hotkey daemon to launch my applications.

Up to now, the launch script was in my .config/bspwm/bspwmrc (which is a simple bash script file):

# Keyboard bindings manager
pkill sxhkd
sxhkd -m 1&

The -m 1 argument is there because I don’t have a qwerty keyboard.

The bspwmrc script is executed by my display manager, LightDM, when it auto logs me in. So far so good.

Reading the Arch Wiki, I realized I could start sxhkd with Systemd directly. There’s even a link to a sample service file; which contains:

[Unit]
Description=Simple X Hotkey Daemon
Documentation=man:sxhkd(1)
BindsTo=display-manager.service
After=display-manager.service

[Service]
ExecStart=/usr/bin/sxhkd
ExecReload=/usr/bin/kill -SIGUSR1 $MAINPID

[Install]
WantedBy=graphical.target

So I wondered, why not? And copied the sxhkd.service file to /etc/systemd/system (after adding the -m 1 argument), enabled the service with sudo systemctl enable sxhkd, commented the lines in the bspwmrc script, and restarted.

Alas, that does not work. When typing systemctl status sxhkd, I get this error message:

Warning: The unit file, source configuration file or drop-ins of sxhkd.service changed on disk. Run 'systemctl daemon-rel>
● sxhkd.service - Simple X Hotkey Daemon
     Loaded: loaded (/etc/systemd/system/sxhkd.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Fri 2020-07-24 10:29:05 CEST; 14min ago
       Docs: man:sxhkd(1)
   Main PID: 662 (code=exited, status=1/FAILURE)

Jul 24 10:29:05 Solgaleo systemd[1]: Started Simple X Hotkey Daemon.
Jul 24 10:29:05 Solgaleo sxhkd[662]: Can't open display.
Jul 24 10:29:05 Solgaleo systemd[1]: sxhkd.service: Main process exited, code=exited, status=1/FAILURE
Jul 24 10:29:05 Solgaleo systemd[1]: sxhkd.service: Failed with result 'exit-code'.

My understanding is that Can't open display means that sxhkd starts too early… and I don’t know why, or how to fix this.

I know I could just go back to my previous configuration, but if there’s something on the Arch Wiki that does not work, I’d rather find out if it’s my fault or if the wiki needs to be updated.

Edit:

Further investigation indicates that running sxhkd as root cannot work.

Here is what I changed:

I moved the sxhkd.service file from /etc/systemd/system to /etc/systemd/user and enabled it via the systemctl --user enable sxhkd command.

This still does not work, but with a different error message:

Failed to start sxhkd.service: Unit display-manager.service not found. 

Typing systemctl status display-manager gives:

● lightdm.service - Light Display Manager
     Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; vendor preset: disabled)
     Active: active (running) since Sat 2020-07-25 11:11:07 CEST; 10min ago
       Docs: man:lightdm(1)
   Main PID: 602 (lightdm)
      Tasks: 4 (limit: 38412)
     Memory: 63.7M
     CGroup: /system.slice/lightdm.service
             ├─602 /usr/bin/lightdm
             └─666 /usr/lib/Xorg -bs -core :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

Jul 25 11:11:05 Solgaleo systemd[1]: Starting Light Display Manager...
Jul 25 11:11:07 Solgaleo lightdm[602]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop>
Jul 25 11:11:07 Solgaleo systemd[1]: Started Light Display Manager.
Jul 25 11:11:08 Solgaleo lightdm[670]: pam_succeed_if(lightdm-autologin:auth): requirement "user ingroup autologin" was m>
Jul 25 11:11:08 Solgaleo lightdm[670]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop>
Jul 25 11:11:08 Solgaleo lightdm[670]: pam_unix(lightdm-autologin:session): session opened for user ben by (uid=0)
lines 1-17/17 (END)

Which means display-manager is properly running. Maybe it can’t be seen by a service launched with --user?

Edit2:

The BindsTo and After are actually not necessary: the service is started as a user, so after the user session has been started. But if I remove them, the service does not start at all upon startup. It works great if I start it manually though.

Edit3:

More details on the steps I followed here: https://bbs.archlinux.org/viewtopic.php?id=257626&p=2


Get this bounty!!!

#StackBounty: #systemd #sxhkd Can't start sxhkd as a systemd service

Bounty: 100

I’m using bspwm on my Arch Linux install and I need to run the sxhkd hotkey daemon to launch my applications.

Up to now, the launch script was in my .config/bspwm/bspwmrc (which is a simple bash script file):

# Keyboard bindings manager
pkill sxhkd
sxhkd -m 1&

The -m 1 argument is there because I don’t have a qwerty keyboard.

The bspwmrc script is executed by my display manager, LightDM, when it auto logs me in. So far so good.

Reading the Arch Wiki, I realized I could start sxhkd with Systemd directly. There’s even a link to a sample service file; which contains:

[Unit]
Description=Simple X Hotkey Daemon
Documentation=man:sxhkd(1)
BindsTo=display-manager.service
After=display-manager.service

[Service]
ExecStart=/usr/bin/sxhkd
ExecReload=/usr/bin/kill -SIGUSR1 $MAINPID

[Install]
WantedBy=graphical.target

So I wondered, why not? And copied the sxhkd.service file to /etc/systemd/system (after adding the -m 1 argument), enabled the service with sudo systemctl enable sxhkd, commented the lines in the bspwmrc script, and restarted.

Alas, that does not work. When typing systemctl status sxhkd, I get this error message:

Warning: The unit file, source configuration file or drop-ins of sxhkd.service changed on disk. Run 'systemctl daemon-rel>
● sxhkd.service - Simple X Hotkey Daemon
     Loaded: loaded (/etc/systemd/system/sxhkd.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Fri 2020-07-24 10:29:05 CEST; 14min ago
       Docs: man:sxhkd(1)
   Main PID: 662 (code=exited, status=1/FAILURE)

Jul 24 10:29:05 Solgaleo systemd[1]: Started Simple X Hotkey Daemon.
Jul 24 10:29:05 Solgaleo sxhkd[662]: Can't open display.
Jul 24 10:29:05 Solgaleo systemd[1]: sxhkd.service: Main process exited, code=exited, status=1/FAILURE
Jul 24 10:29:05 Solgaleo systemd[1]: sxhkd.service: Failed with result 'exit-code'.

My understanding is that Can't open display means that sxhkd starts too early… and I don’t know why, or how to fix this.

I know I could just go back to my previous configuration, but if there’s something on the Arch Wiki that does not work, I’d rather find out if it’s my fault or if the wiki needs to be updated.

Edit:

Further investigation indicates that running sxhkd as root cannot work.

Here is what I changed:

I moved the sxhkd.service file from /etc/systemd/system to /etc/systemd/user and enabled it via the systemctl --user enable sxhkd command.

This still does not work, but with a different error message:

Failed to start sxhkd.service: Unit display-manager.service not found. 

Typing systemctl status display-manager gives:

● lightdm.service - Light Display Manager
     Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; vendor preset: disabled)
     Active: active (running) since Sat 2020-07-25 11:11:07 CEST; 10min ago
       Docs: man:lightdm(1)
   Main PID: 602 (lightdm)
      Tasks: 4 (limit: 38412)
     Memory: 63.7M
     CGroup: /system.slice/lightdm.service
             ├─602 /usr/bin/lightdm
             └─666 /usr/lib/Xorg -bs -core :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

Jul 25 11:11:05 Solgaleo systemd[1]: Starting Light Display Manager...
Jul 25 11:11:07 Solgaleo lightdm[602]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop>
Jul 25 11:11:07 Solgaleo systemd[1]: Started Light Display Manager.
Jul 25 11:11:08 Solgaleo lightdm[670]: pam_succeed_if(lightdm-autologin:auth): requirement "user ingroup autologin" was m>
Jul 25 11:11:08 Solgaleo lightdm[670]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop>
Jul 25 11:11:08 Solgaleo lightdm[670]: pam_unix(lightdm-autologin:session): session opened for user ben by (uid=0)
lines 1-17/17 (END)

Which means display-manager is properly running. Maybe it can’t be seen by a service launched with --user?

Edit2:

The BindsTo and After are actually not necessary: the service is started as a user, so after the user session has been started. But if I remove them, the service does not start at all upon startup. It works great if I start it manually though.

Edit3:

More details on the steps I followed here: https://bbs.archlinux.org/viewtopic.php?id=257626&p=2


Get this bounty!!!