0

I'm running standard Ubuntu 18.04. After an upgrade a week ago the bluetooth stopped working. top shows bluetoothd running 100% CPU

top - 20:35:01 up 19 min,  1 user,  load average: 1,74, 2,32, 1,62
Tasks: 347 total,   2 running, 281 sleeping,   0 stopped,   0 zombie
%Cpu(s): 27,7 us,  1,3 sy,  0,0 ni, 71,1 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
KiB Mem :  8024888 total,   979120 free,  3965944 used,  3079824 buff/cache
KiB Swap:  8242172 total,  8242172 free,        0 used.  3400808 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                
 1180 root      20   0  121108  88060   4152 R 100,0  1,1  19:37.59 bluetoothd                                                                                             

I upgraded bluez to 5.50-0ubuntu0ppa1 but this didn't help.

Studying syslog I found some interesting lines:

NetworkManager[1259]: <info>  [1603476921.1850] Loaded device plugin: NMBluezManager (/usr/lib/x86_64-linux-gnu/NetworkManager/libnm-device-plugin-bluetooth.so)
gnome-bluetooth-panel.desktop[4733]: Agent registration failed: Timeout was reached
dbus-daemon[3607]: [session uid=1000 pid=3607] Activating via systemd: service name='org.bluez.obex' unit='dbus-org.bluez.obex.service' requested by ':1.85' (uid=1000 pid=4733 comm="gnome-control-center bluetooth " label="unconfined")
obexd[4964]: bluetooth: RequestProfile error: org.freedesktop.DBus.Error.NoReply, Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
systemd[1]: bluetooth.target: Unit not needed anymore. Stopping.
gnome-bluetooth-panel.desktop[4733]: Agent unregistration failed: Timeout was reached 'g-io-error-quark'

I can disable bluetooth altogether using sudo systemctl disable bluetooth.service and restart.

My question:

  • How can I fix my bluetooth?

2 Answers 2

1

It still happens on Ubuntu 20.04.5 LTS, top shows a process bluetoothd using 100% of a cpu.

usually a restart of the service solves the case.

Get information about the service:

systemctl status bluetooth

in my case, it gave this output:

● bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2022-10-09 15:58:25 CEST; 1 day 17h ago
       Docs: man:bluetoothd(8)
   Main PID: 1139 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 38124)
     Memory: 3.2M
     CGroup: /system.slice/bluetooth.service
             └─1139 /usr/lib/bluetooth/bluetoothd

oct 10 23:32:10 ljaouen-Precision-5560 bluetoothd[1139]: Can't get HIDP connection info
oct 10 23:32:15 ljaouen-Precision-5560 bluetoothd[1139]: connect error: Host is down (112)
oct 10 23:32:40 ljaouen-Precision-5560 bluetoothd[1139]: Can't get HIDP connection info
oct 10 23:32:45 ljaouen-Precision-5560 bluetoothd[1139]: connect error: Host is down (112)
oct 10 23:33:10 ljaouen-Precision-5560 bluetoothd[1139]: Can't get HIDP connection info
oct 10 23:33:15 ljaouen-Precision-5560 bluetoothd[1139]: connect error: Host is down (112)
oct 10 23:33:40 ljaouen-Precision-5560 bluetoothd[1139]: Can't get HIDP connection info
oct 10 23:33:45 ljaouen-Precision-5560 bluetoothd[1139]: connect error: Host is down (112)
oct 10 23:34:10 ljaouen-Precision-5560 bluetoothd[1139]: Can't get HIDP connection info
oct 10 23:34:15 ljaouen-Precision-5560 bluetoothd[1139]: connect error: Host is down (112)

This tells that:

  • it is this service that starts bluetoothd (it was probable, but better safe than sorry)
  • there is a part of the log and it shows errors

restarting the service:

sudo systemctl restart bluetooth

The process bluetoothd has disappeared from the top page of htop.

1
  • It was not that easy for me :) After restart the bluetoothd stayed on the top with 100% cpu until I found that weird rm -rf /var/lib/bluetooth/* trick. Still nice answer for other cases though. Commented Oct 11, 2022 at 11:21
0

The user "svartalf" found the solution (https://bbs.archlinux.org/viewtopic.php?id=229740)

I quote:

Well, it seems like removing /var/lib/bluetooth/ did the thing. Still have no idea what it was. perf for bluetooth process said it just stuck on some strlen call.

So just

rm -rf /var/lib/bluetooth/*

in my case did the trick.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .