Thursday, October 6, 2011

Blacklist (Disable) Bluetooth kernel module in Debian


$ sudo /sbin/modinfo bluetooth

filename:       /lib/modules/3.0.0-1-amd64/kernel/net/bluetooth/bluetooth.ko
alias:          net-pf-31
license:        GPL
version:        2.16
description:    Bluetooth Core ver 2.16
author:         Marcel Holtmann
srcversion:     D9F269479383424EF3535A5
depends:        rfkill,crc16
intree:         Y
vermagic:       3.0.0-1-amd64 SMP mod_unload modversions
parm:           disable_esco:Disable eSCO connection creation (bool)
parm:           disable_ertm:Disable enhanced retransmission mode (bool)
parm:           enable_mgmt:Enable Management interface (bool)

$ sudo vi /etc/modprobe.d/bluetooth.conf

blacklist bnep
blacklist btusb
blacklist bluetooth

$ sudo update-initramfs -u -k `uname -r` -v


Big Thanks http://linux.koolsolutions.com/2009/10/11/howto-blacklisting-kernel-module-from-auto-loading-in-debian/


Bluetooth coexistence
=================
http://wireless.kernel.org/en/users/Documentation/Bluetooth-coexistence
= An 802.11 device and Bluetooth can interfere with each other when the 802.11 device operates on the 2.4 GHz band.
All Bluetooth devices operate at the 2.4 GHz band.

ath9k supports Bluetooth coexistence
Ref http://wireless.kernel.org/en/users/Drivers/ath9k/btcoex

$ cat /sys/module/ath9k/parameters/btcoex_enable

To disable it
options ath9k btcoex_enable=0


Note
====
There is also a file called blacklist.conf inside the /etc/modprobe.d/ directory.
Do not add the blacklist line inside that file.
It won’t prevent the module from auto loading. In fact the beginning of that file states the same:

$ head /etc/modprobe.d/blacklist.conf
....
It does not affect autoloading of modules by the kernel. This file is provided by the udev package.
...


Related Information
===============







The easiest way to control the behavior of an init script is by changing environment variable assignments in the file named like the init script in the /etc/default directory.
Ref: http://qref.sourceforge.net/quick/ch-tune.en.html


$ sudo vi /etc/default/bluetooth
then set
BLUETOOTH_ENABLED=0



# bluetooth daemon
$ sudo update-rc.d bluetooth remove

$ cat /etc/modprobe.d/aliases.conf




http://www.sebdangerfield.me.uk/2010/06/disabling-bluetooth-on-ubuntu-debian/

1 comment:

  1. THANK YOU
    I have ath9k (ar9565) on my ubuntu (xubuntu) machine. I experienced complete system freezes at random times for apparently no reason. Looks like wireless was conflicting with bluetooth (hope I'm not speaking too soon)

    ReplyDelete