I've created a service that runs a Bluetooth server application and is started like this:


ExecStartPre=/usr/bin/sdptool add SP
ExecStartPre=/bin/sleep 0.5
ExecStartPre=/bin/hciconfig hci0 piscan
ExecStartPost=/usr/bin/bluetoothctl discoverable on


When I look at the logs for this unit after a system boot, I always see the first start failed and the second succeeds. When looking at the full log, I see that my service is started first, then fails, and later only the bluetooth service is started. My service is retried after that and then the required dependencies are there.

Why does Systemd ignore the After and Requires options in my service?

I've read other web texts, man pages and questions here that suggest using exactly these options for my task. But it's not working for me.

The device is a Raspberry Pi 3B+ with Raspbian OS, Linux kernel 5.4.51 and Systemd 241.

  • Maybe check if your bluetooth.service starts successfully the first time around. If the bluetooth service fails then so will your service
    – hakskel
    Commented Aug 14, 2020 at 17:51
  • @hakskel The bluetooth service is only started after my service, never before, and it never fails. Something else is wrong here (either in my script or in Systemd).
    – ygoe
    Commented Aug 16, 2020 at 8:53

1 Answer 1


Seems to be some quirks with the bluetooth.service from bluez (see this issue). I don't fully understand the reasons behind it. But changing the service WantedBy from multi-user.target to bluetooth.target has fixed it for me.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .