何回か起こったので,メモ.

症状

unity-control-center の BluetoothでスライダをONにし,一旦メニューに戻ってからまたBluetoothに戻るとOFFになっている.つまり,BluetoothをONにできない.

Ubuntu 16.04で起こるっぽい?二つのマシンで同じ症状が確認された.以前はこのようなことはなかったのでアップデートした際に起こるようになってしまった模様.

環境

  • Ubuntu 16.04 (4.10.0-42-generic)
  • bluez 5.37-0ubuntu5.1

エラーメッセージ

$ sudo systemctl restart bluetooth.service
Job for bluetooth.service failed because the control process exited with error code. See "systemctl status bluetooth.service" and "journalctl -xe" for details.

というわけで,提案通り systemctl status bluetooth.servicejournalctl -xe の出力を見ましょう. journalctl -xe の出力は次の通り:

Feb 05 08:41:26 kyosen systemd[1]: Starting Bluetooth service...
-- Subject: Unit bluetooth.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit bluetooth.service has begun starting up.
Feb 05 08:41:26 kyosen systemd[12050]: bluetooth.service: Failed at step EXEC spawning /usr/lib/bluetooth/bluetoothd: Permission denied
-- Subject: Process /usr/lib/bluetooth/bluetoothd could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The process /usr/lib/bluetooth/bluetoothd could not be executed and failed.
--
-- The error number returned by this process is 13.
Feb 05 08:41:26 kyosen systemd[1]: bluetooth.service: Main process exited, code=exited, status=203/EXEC
Feb 05 08:41:26 kyosen systemd[1]: Failed to start Bluetooth service.
-- Subject: Unit bluetooth.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit bluetooth.service has failed.
--
-- The result is failed.

Failed at step EXEC spawning /usr/lib/bluetooth/bluetoothd: Permission denied とありますね.

$ ls -l /usr/lib/bluetooth/bluetoothd
-rw-r--r-- 1 root root 1.1M Sep 12 11:04 /usr/lib/bluetooth/bluetoothd

あっ……

$ sudo chmod 755 /usr/lib/bluetooth/bluetoothd

で無事に sudo systemctl start bluetooth.service できるようになりました.

なぜこうなったかは謎.