How to disable Bluetooth in FatDog completely?

versatile 64-bit multi-user Linux distribution

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

Post Reply
Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

How to disable Bluetooth in FatDog completely?

Post by Neo_78 »

The BIOS of my mainboard does not give an option to deactivate the Bluetooth chip, which I would like to disable completely.

I tried to add the Kernel boot option rfkill.default_state=0 from the suggested list of additional Kernel parameters:

Code: Select all

rfkill.default_state=
		0	"airplane mode".  All wifi, bluetooth, wimax, gps, fm,
			etc. communication is blocked by default.
		1	Unblocked.

I was able to boot the machine without errors, but the bluetoothd process was still running by default, so the mentioned boot parameter is probably not supported.

According to the documentation, FatDog uses the BlueZ stack. Related packages can be uninstalled in Gslapt. I think this should remove the Bluetooth drivers, but those could be re-installed.

Is there a way to permanently disable Bluetooth also at Kernel level to make it impossible to re-install drivers and re-start it?

Also, which system and service manager is FatDog using exactly in order to start / stop and enable / disable processes and to control which processes should be allowed at boot time?

jamesbond
Posts: 718
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 124 times
Been thanked: 402 times

Re: How to disable Bluetooth in FatDog completely?

Post by jamesbond »

Neo_78 wrote: Sun Jan 30, 2022 10:30 pm

Also, which system and service manager is FatDog using exactly in order to start / stop and enable / disable processes and to control which processes should be allowed at boot time?

GUI way --> Open Control Panel -> System -> Manage Servers and Services
CLI way --> Open terminal -> type "service"

Example: To disable Bluetooth service, in terminal type "service --disable bluetooth". You can re-enable it again in the future by typing "service --enable bluetooth".

Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

Re: How to disable Bluetooth in FatDog completely?

Post by Neo_78 »

@jamesbond is there a kernel parameter to disable the bluetooth module entirely?

jamesbond
Posts: 718
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 124 times
Been thanked: 402 times

Re: How to disable Bluetooth in FatDog completely?

Post by jamesbond »

Neo_78 wrote: Mon Jan 31, 2022 12:27 pm

@jamesbond is there a kernel parameter to disable the bluetooth module entirely?

You have to know the name of the kernel module. Let's pretend that the name of the module is "btusb".
Then create a file called /etc/modprobe.d/blacklist-bt.conf (the name can be anything as long as it ends with .conf).
This file should contain

Code: Select all

blacklist btusb

And the module will not be loaded.
This is not Fatdog specific, this is how other Linuxes do it too.

Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

Re: How to disable Bluetooth in FatDog completely?

Post by Neo_78 »

Will try that @jamesbond. The best way to find the correct bluetooth module name would probably be with lsusb, right?

jamesbond
Posts: 718
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 124 times
Been thanked: 402 times

Re: How to disable Bluetooth in FatDog completely?

Post by jamesbond »

Neo_78 wrote: Wed Feb 02, 2022 2:38 am

Will try that @jamesbond. The best way to find the correct bluetooth module name would probably be with lsusb, right?

It's lsmod.

Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

Re: How to disable Bluetooth in FatDog completely?

Post by Neo_78 »

Thanks :thumbup:

Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

Re: How to disable Bluetooth in FatDog completely?

Post by Neo_78 »

Running lsmod | grep bluetooth returns the following:

Code: Select all

bluetooth     315392     7     bnep
ecdh_generic     16384     1     bluetooth
rfkill     20480     3     bluetooth, cfg80211

Which one exactly is the bluetooth module name?

User avatar
Keef
Posts: 278
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 75 times

Re: How to disable Bluetooth in FatDog completely?

Post by Keef »

Mmm... let's guess :)

cfg80211 is used for wireless cards, so it depends if you need wifi or not.
Just try:

Code: Select all

modprobe -r bluetooth

(or rmmod, it does the same thing) to unload the module and see if anything explodes or not.

Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

Re: How to disable Bluetooth in FatDog completely?

Post by Neo_78 »

@Keef removing bluetooth with modprobe gives the following error despite having stopped and disabled bluetooth in the system services manager and uninstalled Bluez in Gslapt:

Code: Select all

modprobe: Fatal: Module bluetooth is in use

The board does not have wifi. Removing cfg80211, ecdh_generic and bnep with modprobe checked out silently without an error.

User avatar
Keef
Posts: 278
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 75 times

Re: How to disable Bluetooth in FatDog completely?

Post by Keef »

Try

Code: Select all

modprobe -r rfcomm

I was able to remove bluetooth after that.

Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

Re: How to disable Bluetooth in FatDog completely?

Post by Neo_78 »

Thanks @Keef Disabling bluetooth in the service manager, uninstalling Bluez and then blacklisting rfcomm and bluetooth did the trick. :thumbup:

I am just wondering why tcpdump and nethogs are dependencies for Bluez in Gslapt. If you remove Bluez and then try to reinstall tcpdump individually, it will also re-install Bluez. :|

Installed the tcpdump amd64 .deb package from Debian Sid, but execution fails with a missing dependency. Not sure which version FatDog64 currently ships that could also be sourced from the Debian repositories...

jamesbond
Posts: 718
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 124 times
Been thanked: 402 times

Re: How to disable Bluetooth in FatDog completely?

Post by jamesbond »

... blacklisting rfcomm and bluetooth ...

1. The hardware-specific driver for your bluetooth normally starts with "bt".
So lsmod | grep ^bt will show you the module you want to blacklist. The "bluetooth" and "rfcomm" are standard protocol drivers and have nothing to do with removing the power from your bluetooth hardware. If you disable the hardware-specific driver, even if bluetooth and rfcomm are loaded, you won't be communicating with bt devices anytime soon.

... uninstalling Bluez ...

2. You don't need to uninstall bluez. You just need to disable the service (so it doesn't automatically start at boot), and I already told you how to do that.

I am just wondering why tcpdump and nethogs are dependencies for Bluez in Gslapt. If you remove Bluez and then try to reinstall tcpdump individually, it will also re-install Bluez. :|

3. Both nethogs and tcpdump depends on the library called "libpcap". "libpcap" is a library to perform packet capture, so the packet can be analysed. It is a very versatile library and is able to capture packets from many different sources, such as network cards, bluetooth cards ... and that's why "libpcap" depends on "bluez"; and hence bluez is pulled each time you want to install an app that depends on libpcap (which tcpdump and nethogs do).

However, If you still insist that you want to uninstall bluez, this is how you do it:
a) First, install tcpdump and nethogs from gslapt, and then
b) remove bluez from terminal this way:

Code: Select all

slapt-get --no-dep --remove bluez

This forces bluez to be removed without checking the dependency, so libpcap (and tcpdump and nethogs) will remain. (You can't do this from gslapt, you need to do it from CLI using slapt-get).

I just checked, nethogs and tcpdump seems to continue running afterward; so apparently they both don't use the "bluetooth" capture component of libpcap.

Neo_78
Posts: 407
Joined: Wed Dec 29, 2021 10:45 pm
Has thanked: 232 times
Been thanked: 11 times

Re: How to disable Bluetooth in FatDog completely?

Post by Neo_78 »

Thanks for your detailed feedback @jamesbond

lsmod | grep ^bt does not return anything. So I am not sure what the bluetooth chip really is.

Using slapt-get to remove packages without dependencies works well! :thumbup:

jamesbond
Posts: 718
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 124 times
Been thanked: 402 times

Re: How to disable Bluetooth in FatDog completely?

Post by jamesbond »

Neo_78 wrote: Mon Feb 07, 2022 3:50 pm

lsmod | grep ^bt does not return anything. So I am not sure what the bluetooth chip really is.

Yeah, every machine is a bit different from others, aren't they?
Post the entire content of your lsmod, and perhaps we can guess which one is your hardware bluetooth driver.

Post Reply

Return to “FatDog64”