I am on Manjaro with kernel 5.15.28-1
My problem relates to bluetooth. I have bluez 5.61-1 (which I downgraded from 5.63-2).
I can activate bluetooth with systemctl but not from a systemd service that I wrote:
#/etc/systemd/system/bt-restart.service
[Unit]
Description=restart bt and connect keypad
[Service]
Type=oneshot
User=root
RemainAfterExit=yes
ExecStart=/usr/bin/sleep 1
ExecStart=-/usr/lib/systemd/system/bluetooth
ExecStart=/usr/bin/sleep 3
ExecStart=/home/jcw/bin/enable-bt.sh
[Install]
WantedBy=multi-user.target
Output from
sudo systemctl status bt-restart
● bt-restart.service - restart bt and connect keypad
Loaded: loaded (/etc/systemd/system/bt-restart.service; enabled; vendor preset: disabled)
Active: active (exited) since Sat 2022-03-19 09:00:35 CET; 1h 27min ago
Process: 2762 ExecStart=/usr/bin/sleep 1 (code=exited, status=0/SUCCESS)
Process: 2763 ExecStart=/usr/lib/systemd/system/bluetooth (code=exited, status=0/SUCCESS)
Process: 2764 ExecStart=/usr/bin/sleep 3 (code=exited, status=0/SUCCESS)
Process: 2766 ExecStart=/home/jcw/bin/enable-bt.sh (code=exited, status=0/SUCCESS)
Main PID: 2766 (code=exited, status=0/SUCCESS)
CPU: 41ms
mars 19 08:59:50 jcw-k30amjafk31amj systemd[1]: Starting restart bt and connect keypad...
mars 19 08:59:51 jcw-k30amjafk31amj systemd[2763]: bt-restart.service: Executable /usr/lib/systemd/system/bluetooth missing,>
mars 19 09:00:35 jcw-k30amjafk31amj enable-bt.sh[2767]: Attempting to connect to 2B:24:13:DB:7C:99
mars 19 09:00:35 jcw-k30amjafk31amj enable-bt.sh[2767]: Failed to connect: org.bluez.Error.Failed
mars 19 09:00:35 jcw-k30amjafk31amj systemd[1]: Finished restart bt and connect keypad.
As you can see from Executable /usr/lib/systemd/system/bluetooth missing, systemd did not find bluetooth.service.
But the file exists. It can be reached by systemctl. So what?
EDIT: End of the second line is "Executable /usr/lib/systemd/system/bluetooth missing, skipping: No such file or directory"
>
at the end of the messageExecutable /usr/lib/systemd/system/bluetooth missing,>
indicates there is more text that was cut off. It's probablyExecutable ... missing, or <some other error condition that might be applicable in this case>
. Usesystemctl status -l bt-restart
: you won't needsudo
when you're just querying a service status.As you can see from Executable /usr/lib/systemd/system/bluetooth missing, systemd did not find bluetooth.service.
How did you come to that conclusion?