1

My workstation already has a wifi card with bluetooth on it, but that bluetooth is extremely unstable and last month, it is unable to turn on (although the wifi is still ok). I thought it was dead so I plugged in a USB bluetooth dongle and it works just fine.
But recently, the bluetooth on wifi card suddenly turned on again, now I have 2 bluetooth, I dont know which is which, and how to connect to the USB bluetooth, not the PCIE card

This is the output of lsusb:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 005: ID 04d9:1603 Holtek Semiconductor, Inc. Keyboard
Bus 001 Device 014: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 008: ID 2b89:6209 ibasso IBASSO-DC-Series
Bus 001 Device 004: ID 0a05:7211 Unknown Manufacturer hub
Bus 001 Device 003: ID 0529:0003 Aladdin Knowledge Systems Sentinel HL
Bus 001 Device 013: ID 0cf3:e005 Qualcomm Atheros Communications
Bus 001 Device 016: ID 262a:187a ibasso IBASSO-DC-Series
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

  • For a quick workaround, you could try echo 1 | sudo tee /sys/bus/pci/devices/the_id_of_your_undesired_bluetooth_pci_device/remove. Otherwise, there should be a userspace solution that I didn't find yet – Daniel T Jan 30 '24 at 01:47

1 Answers1

3

Normal solution

You can use rfkill to disable the specific device:

  1. Run rfkill without arguments and identify the ID of the device you want to block. If you're not sure, just pick one of the hci ones and retry if necessary:
rfkill
ID TYPE      DEVICE      SOFT      HARD
 0 bluetooth hci0   unblocked unblocked
 1 bluetooth hci1   unblocked unblocked
[...]
 2 bluetooth hciX   unblocked unblocked
 3 wlan      phy0   unblocked unblocked
 4 wlan      phy1   unblocked unblocked
[...]
 5 wlan      phyX   unblocked unblocked
  1. Run rfkill block <the number 0 or 1 or etc.>
  2. If it was the wrong one, run rfkill unblock <that number> and repeat step 2

sudo is not usually necessary. systemd-rfkill.service is responsible for saving and loading this file across reboots.

Last-resort solution

Run echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="0cf3", ATTRS{idProduct}=="e005", ATTR{authorized}="0"' | sudo tee /etc/udev/rules.d/81-disable-internal-bluetooth.rules and reboot.

This is based on the other answer and how in your lsusb, the "Qualcomm Atheros Communications" is the internal one and "Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)" is your dongle. The device ID for the Qualcomm one changed from 2 to 13 (perhaps it unloaded and loaded a few times), while the dongle's ID remained the same, and this explains why rfkill didn't save.

Daniel T
  • 4,594
  • Thanks, this is what I was looking for. Just run the block command and the rfkill service auto save the setting and block the device I have choosen permanently until I unblock it right? or I have to edit some file? – Euphoria Celestial Jan 30 '24 at 07:11
  • Yes, it is automatic. You can see in the activation time in systemctl status systemd-rfkill.service that it activates every time you change the setting. Then it should load the setting on boot – Daniel T Jan 30 '24 at 07:13
  • I'll assume you didn't press enable bluetooth. Let's see if we can blacklist something. Can you do a ls -l /var/lib/systemd/rfkill when it is working? – Daniel T Jan 30 '24 at 07:25
  • 1
    @EuphoriaCelestial Does you deleting the comment mean the problem went away? Anyway, I was going to suggest taking that id, and finding the corresponding section in lspci -vnvn. Make sure the WiFi and Bluetooth are not the same device or driver. Then take the "kernel device in use:" and put a line install name_of_the_driver /bin/false in /etc/modprobe.d/blacklist.conf and then sudo update-initramfs. Or for more details about this more forceful alternative solution, you can look in the related questions in the sidebar. – Daniel T Jan 30 '24 at 07:29
  • sadly, the problem did not go away, I deleted the comment because I can't format it for easy reading then I forgot to write another. Anyway, the result of ls -l /var/lib/systemd/rfkill showing 2 bluetooth devices and 1 wifi normally, but I can't see anything with "bluetooth" in its name in lspci -vnvn result, I only found the wireless adapter. – Euphoria Celestial Jan 31 '24 at 02:06
  • @EuphoriaCelestial Please post the output of the ls in your question – Daniel T Jan 31 '24 at 02:07
  • by related question, do you mean this: link – Euphoria Celestial Jan 31 '24 at 02:07
  • this is the result of ls: total 12 -rw-r--r-- 1 root root 2 Thg 12 29 10:00 pci-0000:00:14.0-usb-0:14:1.0:bluetooth -rw-r--r-- 1 root root 2 Thg 1 10 08:29 pci-0000:00:14.0-usb-0:2:1.0:bluetooth -rw-r--r-- 1 root root 2 Thg 1 2 10:01 pci-0000:02:00.0:wlan *how do you make new line in comment?
    does not work
    – Euphoria Celestial Jan 31 '24 at 02:08
  • @EuphoriaCelestial No that is a "linked question". There's another section for "related questions" – Daniel T Jan 31 '24 at 02:08
  • @EuphoriaCelestial I was going to post the pci link, but it seems that both of your bluetooth devices connect to the same USB controller. Some computers use an internal USB device for those things. In that case, follow https://askubuntu.com/a/1338686/1004020 – Daniel T Jan 31 '24 at 02:11
  • @EuphoriaCelestial Oh the link I was going to post was the second half of https://askubuntu.com/a/821846/1004020 . You can either follow it yourself, or you can edit your question with the output of lsusb – Daniel T Jan 31 '24 at 02:17
  • @EuphoriaCelestial I added the alternative solution to my answer. – Daniel T Jan 31 '24 at 02:55