38

Just installed a fresh copy of Ubuntu 22.04 LTS on my Lenovo laptop and the entire Bluetooth system doesn't work (I mean the toggle doesn't work). I'm getting the message shown in the below screenshot:

Bluetooth settings

Here is the output of lspci -knn | grep Net -A3; lsusb; dmesg | grep -i blue:

09:00.0 Network controller [0280]: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter [168c:0036] (rev 01)
    Subsystem: Lenovo QCA9565 / AR9565 Wireless Network Adapter [17aa:4026]
    Kernel driver in use: ath9
    Kernel modules: ath9k
Bus 001 Device 002: ID 8087:8001 Intel Corp. Integrated Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 004: ID 0cf3:3004 Qualcomm Atheros Communications 
AR3012 Bluetooth 4.0
Bus 002 Device 003: ID 13d3:5727 IMC Networks Lenovo EasyCamera
Bus 002 Device 002: ID 1c4f:0c07 SiGma Micro USB Keyboard
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
dmesg: read kernel buffer failed: Operation not permitted

I tried everything, but can't make it work. Am I missing something?

DSKTP
  • 491
  • 3
    Can I write here to say "I have the same problem"? And I would like to add my own noob question: "Why is bluetooth not working?". Angry.. – koofe jood Apr 23 '22 at 04:59
  • 2
    @koofejood Normally when you write 'I have the same problem' in a place where an answer should be this would be removed by the Moderation team. I sense your frustration though and I have let this one through as a comment... – andrew.46 Apr 23 '22 at 05:07
  • Is linux-firmware installed or needs updating? – lxx Apr 24 '22 at 04:37
  • 6
    You are able to fix this issue as of now without installing anything or rebooting. Just run the following: sudo rfkill unblock all sudo hciconfig hci0 down sudo rmmod btusb sudo modprobe btusb sudo hciconfig hci0 up – AndreGraveler May 15 '22 at 22:48
  • I have a similar problem: https://askubuntu.com/questions/1461389/bluetooth-sometimes-not-working-in-ubuntu-22-04-lts – Chris W. Mar 29 '23 at 06:57
  • sudo rfkill unblock all sudo hciconfig hci0 down sudo rmmod btusb sudo modprobe btusb sudo hciconfig hci0 up -- worked for me! – Terence Milbourn Jan 23 '24 at 01:31

6 Answers6

11

So, I finally found the fix for this

(THIS WORKED FOR ME)*

$ sudo systemctl status bluetooth.service

Your Output should be similar to:

 bluetooth.service
 Loaded: masked (Reason: Unit bluetooth.service is masked.)
 Active: inactive (dead)

To fix this,

$ systemctl unmask bluetooth.service

$ sudo systemctl start bluetooth.service

$ sudo rmmod btusb

$ sudo systemctl enable bluetooth

bluetooth.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable bluetooth

$ sudo systemctl status bluetooth.service

bluetooth.service - LSB: Start bluetooth daemons
 Loaded: loaded (/etc/init.d/bluetooth; generated)
 Active: active (exited) since Wed 2022-05-11 22:00:50 +0545; 1min 31>
   Docs: man:systemd-sysv-generator(8)
    CPU: 2ms

$ sudo apt-get remove bluez

$ sudo apt install bluez

These are just for checking:

$ sudo systemctl start bluetooth

$ sudo systemctl status bluetooth.service

bluetooth.service - Bluetooth service
 Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vend>
 Active: active (running) since Wed 2022-05-11 22:08:13 +0545; 1min 2>
   Docs: man:bluetoothd(8)
 Main PID: 84272 (bluetoothd)
 Status: "Running"
  Tasks: 1 (limit: 4525)
 Memory: 692.0K
    CPU: 102ms
 CGroup: /system.slice/bluetooth.service
         └─84272 /usr/lib/bluetooth/bluetoothd

$ sudo apt-get install pulseaudio-module-bluetooth

$ killall pulseaudio

Reboot

BOOM!

DSKTP
  • 491
7

Try this:

sudo apt update && sudo apt upgrade
sudo systemctl start bluetooth
rfkill unblock bluetooth

edit: try reebooting after as well

  • 5
    Sorry, but it didn't work! – DSKTP Apr 22 '22 at 17:25
  • 10
    Here is a more up-to-date answer. You are able to fix this issue as of now without installing anything or rebooting. Just run the following: sudo rfkill unblock all sudo hciconfig hci0 down sudo rmmod btusb sudo modprobe btusb sudo hciconfig hci0 up – AndreGraveler May 15 '22 at 22:53
  • 1
    did the trick for me on Ubuntu 22.04, internal Bluetooth. Thanks Andre! – Oscar Montoya Jul 11 '22 at 15:09
  • sudo hciconfig hci0 up Can't init device hci0: Operation not supported (95) – msch Aug 16 '22 at 12:16
  • 3
    What was important for me to make the Bluetooth work was power off (instead of restart) to make the hardware being loaded. Also check out these tips:

    https://support.system76.com/articles/bluetooth/

    especially:

    sudo apt reinstall --purge bluez gnome-bluetooth

    – msch Aug 17 '22 at 12:21
  • 3
    sudo rmmod btusb sudo modprobe btusb did the trick for me :) thanks! – user1013346 Aug 31 '22 at 07:07
  • On a second occasion, this fixed it for me (Ubuntu 22):

    <sudo apt reinstall --purge bluez gnome-bluetooth> <sudo apt install --reinstall bluez gnome-bluetooth indicator-bluetooth pulseaudio-module-bluetooth>

    – Oscar Montoya Oct 10 '22 at 04:40
7

So I finally found the fix for this.

Source: Nilson Oliveira's answer to Ubuntu 22.04 LTS says no bluetooth found plug in a dongle to use bluetooth

Check the result for this:

sudo dmesg |grep -i bluetooth

My case was identical to yours, and I was giving this error in the result:

[    3.935429] Bluetooth: Patch file not found ar3k/AthrBT_0x11020000.dfu

And the solution was to follow zxcde's answer to Patch file not found ar3k/AthrBT_0x31010000.dfu:

You can try my solution:

  1. Download linux-firmware_1.201.tar.xz from http://archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.201.tar.xz (you can visit https://packages.ubuntu.com/impish/linux-firmware for more details).
  2. Extract linux-firmware_1.201.tar.xz and copy the ar3k folder into /lib/firmware.
  3. Restart your computer.
  1. If you get the output in the blockquote above, download linux-firmware_1.201.tar.xz from here.

  2. Extract it and go to the folder as shown below:

    extracted folder

  3. Copy the folder ar3k to /lib/firmware. You can also use the following command:

    sudo cp -R ar3k /lib/firmware
    

    Note: Make sure you open the terminal within the extracted folder.

  4. Restart your PC and you should be able to use Bluetooth again.

Sujit
  • 229
  • Yeah I got similar results like "[ 3.935429] Bluetooth: Patch file not found ar3k/AthrBT_0x11020000.dfu " and followed the steps you mentioned above. But it didn't work. Now, toggle switch is responsive.. – DSKTP Apr 26 '22 at 18:03
  • 5
    Didn't work for me. Running sudo dmesg | grep -i bluetooth shows nothing. – Omid Apr 28 '22 at 12:33
4

I faced similar issue and I made a script to run whenever it occurs:

echo 'clearing dmesg...';
sudo dmesg -c && clear;
DEVICE=$(rfkill list all | grep -o 'hci*.');
sudo hciconfig ${DEVICE} down;
sudo rmmod btusb;
sudo service bluetooth disable;

sudo modprobe btusb; sudo hciconfig ${DEVICE} up; sudo service bluetooth enable; echo '\nrfkill:'; rfkill unblock bluetooth; rfkill list all; echo "\n~DMESG:"; sudo dmesg | grep -i bluetooth; echo '\n~~~bluetooth status:'; sudo service bluetooth status;

echo '\n~if failed try manually:'; bluetoothctl power on; bluetoothctl devices; read DEVICE_TO_CONNECT; bluetoothctl connect ${DEVICE_TO_CONNECT} echo "~\nFINISH UP:\n~~run bluetoothctl;\n~~~power on && devices && connect";

Success not guaranteed, but at least you'll have some errors to google and possibly find a solution.

Mike K.
  • 254
2

Please try the following in a terminal (verify that the system is down): ~$ hciconfig

hci0:   Type: Primary  Bus: USB
    BD Address: C0:18:85:50:33:42  ACL MTU: 1022:8  SCO MTU: 121:3
    DOWN 
    RX bytes:1087 acl:0 sco:0 events:128 errors:0
    TX bytes:4933 acl:0 sco:0 commands:95 errors:18

If the system is indeed down, enter the following and then reboot

~$ sudo hciconfig -a hci0 up

Raffles
  • 768
1

I had the toggle issue when using 20.04 and installed Blueman Bluetooth Manager sort of solved it. Reason I said sort of is because sometimes, I can't toggle back and forth after turning it off and requires a reboot for it to work again.

sudo apt update
sudo apt install bluez bluez-tools

ManOnTheMoon
  • 1,142
  • Facing the same issue on 23.04 as well.. I cannot toggle back and forth at times and requires a reboot for it to work again – DineshKP Nov 06 '23 at 11:07