Saturday, July 08, 2017

Permanently Disable Bluetooth Service On Ubuntu

How to permanently disable Bluetooth on Ubuntu 17.04 Linux.


In the upper-left-hand corner of the screen, click the "Dash" icon and type "terminal". Click on the terminal icon.

Show the current version of Linux:
$ uname -a
Linux TC605 4.10.0-26-generic #30-Ubuntu SMP Tue Jun 27 09:30:12 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


In the terminal window, run the systemctl command. Note the Bluetooth service is enabled:
$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset
   Active: active (running) since Sat 2017-07-08 18:34:29 MDT; 35min ago
     Docs: man:bluetoothd(8)
 Main PID: 872 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/bluetooth.service
           └─872 /usr/lib/bluetooth/bluetoothd

Jul 08 18:34:29 TC605 bluetoothd[872]: Failed to obtain handles for "Service Cha
Jul 08 18:34:29 TC605 bluetoothd[872]: Sap driver initialization failed.
Jul 08 18:34:29 TC605 bluetoothd[872]: sap-server: Operation not permitted (1)
Jul 08 18:34:29 TC605 bluetoothd[872]: Failed to set mode: Blocked through rfkil
Jul 08 18:34:40 TC605 bluetoothd[872]: Endpoint registered: sender=:1.89 path=/M
Jul 08 18:34:40 TC605 bluetoothd[872]: Endpoint registered: sender=:1.89 path=/M
Jul 08 18:35:37 TC605 bluetoothd[872]: Endpoint unregistered: sender=:1.89 path=
Jul 08 18:35:37 TC605 bluetoothd[872]: Endpoint unregistered: sender=:1.89 path=
Jul 08 18:35:40 TC605 bluetoothd[872]: Endpoint registered: sender=:1.124 path=/
Jul 08 18:35:40 TC605 bluetoothd[872]: Endpoint registered: sender=:1.124 path=/


Stop the Bluetooth service:
$ sudo systemctl stop bluetooth.service


Permanently disable the Bluetooth service:
$ sudo systemctl disable bluetooth.service
Synchronizing state of bluetooth.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable bluetooth
Removed /etc/systemd/system/dbus-org.bluez.service.


$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; disabled; vendor prese
   Active: inactive (dead)
     Docs: man:bluetoothd(8)

Jul 08 19:27:53 TC605 bluetoothd[908]: Endpoint registered: sender=:1.85 path=/M
Jul 08 19:27:59 TC605 bluetoothd[908]: Endpoint unregistered: sender=:1.85 path=
Jul 08 19:27:59 TC605 bluetoothd[908]: Endpoint unregistered: sender=:1.85 path=
Jul 08 19:28:00 TC605 bluetoothd[908]: Endpoint registered: sender=:1.123 path=/
Jul 08 19:28:00 TC605 bluetoothd[908]: Endpoint registered: sender=:1.123 path=/
Jul 08 19:30:11 TC605 systemd[1]: Stopping Bluetooth service...
Jul 08 19:30:11 TC605 bluetoothd[908]: Terminating
Jul 08 19:30:11 TC605 bluetoothd[908]: Endpoint unregistered: sender=:1.123 path
Jul 08 19:30:11 TC605 bluetoothd[908]: Endpoint unregistered: sender=:1.123 path
Jul 08 19:30:11 TC605 systemd[1]: Stopped Bluetooth service.


Restart the machine to verify the Bluetooth service does not restart.


After the machine has been restarted, open a terminal window and check the Bluetooth service:
$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; disabled; vendor prese
   Active: inactive (dead)
     Docs: man:bluetoothd(8)

No comments:

Post a Comment