Bluetooth will automatically start despite being disabled

versatile 64-bit multi-user Linux distribution

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
Neo_78
Posts: 380
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 209 times
Been thanked: 9 times

Bluetooth will automatically start despite being disabled

Post by Neo_78 »

Despite having stopped and disabled the bluetooth module in the service manager in FatDog 813, the bluetooth module and applet will automatically start when I reboot a remastered FatDog.

Is there a way around this to ensure that bluetooth has to be started manually when required?

Thanks for your feedback! :thumbup:

User avatar
JakeSFR
Posts: 260
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 135 times

Re: Bluetooth will automatically start despite being disabled

Post by JakeSFR »

Ok, there are 3 things:

1. Bluetooth kernel module,
2. Bluetooth service,
3. Bluetooth applet (in system tray).

1. My understanding is that if there is a BT device available, the appropriate module will be loaded at boot automatically.
A way to prevent it would be to blacklist it in /etc/modprobel.d.

2. The BT service provides the BT functionality in userland. You disabled it, so effecively BT is inactive.

3. The BT applet is loaded regardless of the state of the service or the module. You need to disable it independently in Control Panel -> System -> Manage desktop startup programs -> System startup -> bluetooth-applet.
Although, given the 2nd point, you don't really have to, unless the icon itself annoys you.
It provides you with a quick and direct access to the Bluetooth Manager, where you can actually (re)start or stop the BT service.

Greetings!

[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Neo_78
Posts: 380
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 209 times
Been thanked: 9 times

Re: Bluetooth will automatically start despite being disabled

Post by Neo_78 »

Thanks @JakeSFR.

I never had this bluetooth issue in 812, where the service would remain disabled if I disabled it in the remaster.

Could this be related to the reported bluetooth bug and something is auto-enabling bluetooth which overwrites other configurations?

1. PROBLEM: Bluetooth does not seem to function.
CAUSE: Newer kernels (5.19) do not automatically power up bluetooth adapters at boot the way old kernel (5.4) did.
FIX: Open /etc/init.d/85-bluetooth with geany, and insert the following line: bluetoothctl power on __after__ hciconfig hci0 up

User avatar
JakeSFR
Posts: 260
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 135 times

Re: Bluetooth will automatically start despite being disabled

Post by JakeSFR »

I never had this bluetooth issue in 812, where the service would remain disabled if I disabled it in the remaster.

Have you actually verified that it remains enabled?
If it's really enabled, the bluetoothd process should be running:

Code: Select all

# pidof bluetoothd
1317

and:

Code: Select all

# service bluetooth status
bluetooth is running.

Also, is the /etc/init.d/85-bluetooth file executable or not?

Could this be related to the reported bluetooth bug and something is auto-enabling bluetooth which overwrites other configurations?

No, it's something else.

3. The BT applet is loaded regardless of the state of the service or the module. You need to disable it independently in Control Panel -> System -> Manage desktop startup programs -> System startup -> bluetooth-applet.

Correction, in 813 it is started depending on these factors:

Code: Select all

# Show the icon only if the bluetooth service is running
# and there is actually a bluetooth device available.
if [ -x /etc/init.d/85-bluetooth ] && [ ! -z "$(hciconfig)" ]; then

Technically, it doesn't check whether the service is running or not, only for the executable bit of the BT service script.
Also, we dropped the hciconfig condition for 813+.

Greetings!

[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Post Reply

Return to “FatDog64”