# Désactiver le bluetooth avec une commande

**URL:** <https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164>\
**Category:** Support Debian\
**Created:** [Février 21, 2016, 12:55 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164 "2016-02-21T00:55:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:55 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/1 "2016-02-21T00:55:39Z")

</div>

Bonjour, je cherche une commande pour désactiver le bluetooth. J’ai déjà essayé plusieurs choses sans succès :  
-# rmmod bluetooth renvoi l’erreur : “ERROR : Module bluetooth is in use by btusb”.  
-j’ai ajouté blacklist bluetooth à la fin de mon fichier blacklist.conf  
-# /etc/init.d/bluetooth stop me renvoi : “Stopping bluetooth: bluetoothd” mais le bluetooth fonctionne encore.  
-# update-rc.d -f bluetooth remove me renvoie : “update-rc.d: using dependency based boot sequencing”.  
-désactivation du gestionnaire bluetooth dans les applications au démarrage  
-pas de possibilité de le désactiver dans le bios

Pourtant quand j’utilise l’applet de la barre des tâches le bluetooth se désactive correctement. N’y a-t-il pas moyen de savoir quelle commande est envoyée lorsqu’on clique sur désactiver le bluetooth dans l’applet ?

En gros je cherche un moyen de le désactiver au démarrage (je voulais mettre une commande dans les applications au démarrage). Mais j’aimerais aussi pouvoir le réactiver si besoin, pour cela utiliser la souris ne me gène pas. Je veux dire par là que j’aimerais ne pas avoir à le supprimer si c’est possible.

Si quelqu’un pense avoir une solution je suis preneur !

Merci d’avance.

---

<div class="post-metadata">

**Author:** ![sebB](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@sebB](https://www.debian-fr.org/u/sebB)\
**Post date:** [Février 21, 2016, 12:55 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/2 "2016-02-21T00:55:46Z")

</div>

> [@](#):
>
> rmmod bluetooth renvoi l’erreur : "ERROR : Module bluetooth is in use by btusb

Il suffit de blackilster btusb  
Fait un test avec rmmod btusb

---

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:55 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/3 "2016-02-21T00:55:47Z")

</div>

Ca sert a quoi btusb ? Car s’il m’est utile je ne préfère pas le blacklister.

---

<div class="post-metadata">

**Author:** ![sebB](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@sebB](https://www.debian-fr.org/u/sebB)\
**Post date:** [Février 21, 2016, 12:55 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/4 "2016-02-21T00:55:47Z")

</div>

[http://cateee.net/lkddb/web-lkddb/BT\_HCIUSB.html](http://cateee.net/lkddb/web-lkddb/BT_HCIUSB.html)

Ca fait parti de la section bluetooth du kernel, tu peux y aller sans probleme.

Poste lsmod si tu veux

---

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:55 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/5 "2016-02-21T00:55:48Z")

</div>

J’ai fait en root :  
-rmmod btusb  
-rmmod bluetooth

Mon bluetooth fonctionne toujours.

---

<div class="post-metadata">

**Author:** ![sebB](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@sebB](https://www.debian-fr.org/u/sebB)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/6 "2016-02-21T00:56:03Z")

</div>

La je suis pas sur debian pour voir les modules.

Poste lsmod

---

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/7 "2016-02-21T00:56:04Z")

</div>

Ok. Voilà le résultat de lsmod :

`Module Size Used by
btusb 9881 0 
bluetooth 41827 1 btusb
nls_utf8 1208 0 
nls_cp437 5817 0 
vfat 7884 0 
fat 40038 1 vfat
ses 5128 0 
enclosure 5503 1 ses
usb_storage 39625 0 
aes_x86_64 7340 1 
aes_generic 25714 1 aes_x86_64
parport_pc 18855 0 
ppdev 5030 0 
lp 7462 0 
parport 27954 3 parport_pc,ppdev,lp
acpi_cpufreq 5571 1 
cpufreq_stats 2659 0 
cpufreq_userspace 1992 0 
cpufreq_powersave 902 0 
cpufreq_conservative 5162 0 
vboxnetadp 4193 0 
vboxnetflt 12525 0 
vboxdrv 1723671 2 vboxnetadp,vboxnetflt
binfmt_misc 6431 1 
uinput 6376 1 
fuse 50625 1 
loop 11799 0 
firewire_sbp2 11514 0 
snd_hda_codec_conexant 21869 1 
arc4 1274 2 
ecb 1841 2 
pcmcia 19474 0 
snd_hda_intel 20019 1 
snd_hda_codec 54244 2 snd_hda_codec_conexant,snd_hda_intel
snd_hwdep 5380 1 snd_hda_codec
snd_pcm 60503 2 snd_hda_intel,snd_hda_codec
iwlagn 73123 0 
snd_seq 42881 0 
iwlcore 77810 1 iwlagn
snd_timer 15582 2 snd_pcm,snd_seq
snd_seq_device 4493 1 snd_seq
mac80211 137340 2 iwlagn,iwlcore
snd 46446 10 snd_hda_codec_conexant,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_seq,snd_timer,snd_seq_device
thinkpad_acpi 50087 0 
i2c_i801 7830 0 
yenta_socket 19115 1 
rsrc_nonstatic 7294 1 yenta_socket
psmouse 49777 0 
cfg80211 101496 3 iwlagn,iwlcore,mac80211
soundcore 4598 1 snd
video 17445 0 
pcspkr 1699 0 
serio_raw 3752 0 
pcmcia_core 24118 3 pcmcia,yenta_socket,rsrc_nonstatic
i2c_core 15712 1 i2c_i801
nvram 5077 1 thinkpad_acpi
joydev 8459 0 
evdev 7352 32 
rfkill 13044 4 bluetooth,thinkpad_acpi,cfg80211
battery 4998 0 
ac 2192 0 
snd_page_alloc 6249 2 snd_hda_intel,snd_pcm
wmi 4323 0 
output 1692 1 video
fglrx 2648889 96 
button 4650 0 
processor 29935 3 acpi_cpufreq
ext4 289033 2 
mbcache 5050 1 ext4
jbd2 67015 1 ext4
crc16 1319 1 ext4
sg 18744 0 
usbhid 33292 0 
hid 63225 1 usbhid
sr_mod 12602 0 
cdrom 29415 1 sr_mod
sd_mod 29889 2 
crc_t10dif 1276 1 sd_mod
mmc_block 7732 2 
uhci_hcd 18521 0 
sdhci_pci 5581 0 
ahci 32374 1 
sdhci 13966 1 sdhci_pci
libata 133632 1 ahci
firewire_ohci 19676 0 
mmc_core 45686 2 mmc_block,sdhci
led_class 2433 3 iwlcore,thinkpad_acpi,sdhci
ricoh_mmc 3069 0 
firewire_core 36848 2 firewire_sbp2,firewire_ohci
crc_itu_t 1307 1 firewire_core
scsi_mod 122149 7 ses,usb_storage,firewire_sbp2,sg,sr_mod,sd_mod,libata
e1000e 110047 0 
ehci_hcd 31151 0 
usbcore 122034 6 btusb,usb_storage,usbhid,uhci_hcd,ehci_hcd
thermal 11674 0 
nls_base 6377 5 nls_utf8,nls_cp437,vfat,fat,usbcore
thermal_sys 11942 3 video,processor,thermal`

---

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/8 "2016-02-21T00:56:04Z")

</div>

Réctifications : btusb et bluetooth n’apparaissent pas dans mon lsmod suite aux deux commandes précédentes mais le bluetooth fonctionne encore.

`root@Mathieu-PC:/home/mathieu# rmmod btusb
root@Mathieu-PC:/home/mathieu# rmmod bluetooth
root@Mathieu-PC:/home/mathieu# lsmod
Module Size Used by
nls_utf8 1208 0 
nls_cp437 5817 0 
vfat 7884 0 
fat 40038 1 vfat
ses 5128 0 
enclosure 5503 1 ses
usb_storage 39625 0 
aes_x86_64 7340 1 
aes_generic 25714 1 aes_x86_64
parport_pc 18855 0 
ppdev 5030 0 
lp 7462 0 
parport 27954 3 parport_pc,ppdev,lp
acpi_cpufreq 5571 1 
cpufreq_stats 2659 0 
cpufreq_userspace 1992 0 
cpufreq_powersave 902 0 
cpufreq_conservative 5162 0 
vboxnetadp 4193 0 
vboxnetflt 12525 0 
vboxdrv 1723671 2 vboxnetadp,vboxnetflt
binfmt_misc 6431 1 
uinput 6376 1 
fuse 50625 1 
loop 11799 0 
firewire_sbp2 11514 0 
snd_hda_codec_conexant 21869 1 
arc4 1274 2 
ecb 1841 2 
pcmcia 19474 0 
snd_hda_intel 20019 1 
snd_hda_codec 54244 2 snd_hda_codec_conexant,snd_hda_intel
snd_hwdep 5380 1 snd_hda_codec
snd_pcm 60503 2 snd_hda_intel,snd_hda_codec
iwlagn 73123 0 
snd_seq 42881 0 
iwlcore 77810 1 iwlagn
snd_timer 15582 2 snd_pcm,snd_seq
snd_seq_device 4493 1 snd_seq
mac80211 137340 2 iwlagn,iwlcore
snd 46446 10 snd_hda_codec_conexant,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_seq,snd_timer,snd_seq_device
thinkpad_acpi 50087 0 
i2c_i801 7830 0 
yenta_socket 19115 1 
rsrc_nonstatic 7294 1 yenta_socket
psmouse 49777 0 
cfg80211 101496 3 iwlagn,iwlcore,mac80211
soundcore 4598 1 snd
video 17445 0 
pcspkr 1699 0 
serio_raw 3752 0 
pcmcia_core 24118 3 pcmcia,yenta_socket,rsrc_nonstatic
i2c_core 15712 1 i2c_i801
nvram 5077 1 thinkpad_acpi
joydev 8459 0 
evdev 7352 32 
rfkill 13044 3 thinkpad_acpi,cfg80211
battery 4998 0 
ac 2192 0 
snd_page_alloc 6249 2 snd_hda_intel,snd_pcm
wmi 4323 0 
output 1692 1 video
fglrx 2648889 99 
button 4650 0 
processor 29935 3 acpi_cpufreq
ext4 289033 2 
mbcache 5050 1 ext4
jbd2 67015 1 ext4
crc16 1319 1 ext4
sg 18744 0 
usbhid 33292 0 
hid 63225 1 usbhid
sr_mod 12602 0 
cdrom 29415 1 sr_mod
sd_mod 29889 2 
crc_t10dif 1276 1 sd_mod
mmc_block 7732 2 
uhci_hcd 18521 0 
sdhci_pci 5581 0 
ahci 32374 1 
sdhci 13966 1 sdhci_pci
libata 133632 1 ahci
firewire_ohci 19676 0 
mmc_core 45686 2 mmc_block,sdhci
led_class 2433 3 iwlcore,thinkpad_acpi,sdhci
ricoh_mmc 3069 0 
firewire_core 36848 2 firewire_sbp2,firewire_ohci
crc_itu_t 1307 1 firewire_core
scsi_mod 122149 7 ses,usb_storage,firewire_sbp2,sg,sr_mod,sd_mod,libata
e1000e 110047 0 
ehci_hcd 31151 0 
usbcore 122034 5 usb_storage,usbhid,uhci_hcd,ehci_hcd
thermal 11674 0 
nls_base 6377 5 nls_utf8,nls_cp437,vfat,fat,usbcore
thermal_sys 11942 3 video,processor,thermal
`

---

<div class="post-metadata">

**Author:** ![sebB](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@sebB](https://www.debian-fr.org/u/sebB)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/9 "2016-02-21T00:56:04Z")

</div>

Ton bluetooth fonctionne ou c’est juste la led qui reste allumée?  
Si c’est que ca on peut trouver une solution pour l’eteindre.

Je viens de voir que tu a deja tenté "update-rc.d -f bluetooth remove"  
Par contre poste la sortie complete de l’erreur.

Sinon  
Regarde si tu as un fichier /etc/bluetooth/main.conf  
Remplace InitiallyPowered = true  
Par InitiallyPowered = false

Source [ici](http://doc.ubuntu-fr.org/bluetooth)

---

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/10 "2016-02-21T00:56:05Z")

</div>

Bonne question. Comment puis-je faire pour chercher des appareils autour de moi ? La led est effectivement allumé mais je ne peux pas dire avec certitude que le bluetooth fonctionne.

Pour la commande update-rc.d -f bluetooth remove j’ai posté l’intégralité. Cela me retourne seulement ça :

```auto
root@Mathieu-PC:/home/mathieu# update-rc.d -f bluetooth remove
update-rc.d: using dependency based boot sequencing
root@Mathieu-PC:/home/mathieu# 
```

J’ai mis l’option à false dans le fichier main.conf. Je redémarre pour voir.

---

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/11 "2016-02-21T00:56:05Z")

</div>

L’option dans le main.conf du bluetooth n’a rien fait. La led est toujours allumée et je peux désactiver le bluetooth par l’applet de la bare des taches. Je pense qu’il est donc toujours activé.

---

<div class="post-metadata">

**Author:** ![sebB](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@sebB](https://www.debian-fr.org/u/sebB)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/12 "2016-02-21T00:56:05Z")

</div>

Ok meme pas peur

Installe sysv-rc-conf  
Ensuite tu le lance, tu vas voir les services dans le terminal et decoche tous les services bluetooth

EDIT: Pour moi il est bien desactivé, c’est juste la led  
Dis moi si tu as un fichier bluetoothpower dans /sys/devices/platform/marque ton ordi/

---

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/13 "2016-02-21T00:56:05Z")

</div>

Lol.  
J’ai un fichier bluetooth\_enable oui.

J’essaye sysv-rc-conf.

---

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/14 "2016-02-21T00:56:05Z")

</div>

Avec sysv-rc-conf le bluetooth est déjà désactivé de partout.

---

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/15 "2016-02-21T00:56:05Z")

</div>

Dans le fichier bluetooth\_enabled il n’y a qu’un caractère : 1. J’ai tenter de mettre 0 et la kernel error pas moyen de sauvegarder mais la led s’éteint…

---

<div class="post-metadata">

**Author:** ![sebB](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@sebB](https://www.debian-fr.org/u/sebB)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/16 "2016-02-21T00:56:05Z")

</div>

C’est la que je voulais en venir

echo 0 \> /sys/devices/platform/ton ordi/bluetooth\_enable

On peux deja en deduire que que ton bluetooth est desactivé…

---

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/17 "2016-02-21T00:56:06Z")

</div>

C’est parfait !!! Merci beaucoup !  
Je met le sujet en “résolu”.  
J’ai cependant un bug avec le kernel à chaque fois…

---

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/18 "2016-02-21T00:56:06Z")

</div>

Je me suis réjouit trop vite. La commande ne se lance pas au démarrage.

---

<div class="post-metadata">

**Author:** ![sebB](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@sebB](https://www.debian-fr.org/u/sebB)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/19 "2016-02-21T00:56:07Z")

</div>

Sous debian je sais pas trop.

Essaye en mettant la commande dans le fichier /etc/rc.local avant le exit 0  
Sinon tu crée un script

---

<div class="post-metadata">

**Author:** ![Mat0408](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mat0408](https://www.debian-fr.org/u/Mat0408)\
**Post date:** [Février 21, 2016, 12:56 UTC](https://www.debian-fr.org/t/desactiver-le-bluetooth-avec-une-commande/31164/20 "2016-02-21T00:56:07Z")

</div>

Cela fonctionne très bien et me laisse le choix de l’activer avec la souris si j’en ai besoin. Exactement ce que je voulais.

Merci beaucoup !
