Bluetooth doesn't start

Hi,

I’ve had Manjaro on my PC for a while and for some reason, the Bluetooth doesn’t always start with the system. (If it’s of any help, it is a USB dongle, and yes I’ve tried it in different USB ports).
The System has a B450 M Pro4 motherboard with Ryzen5 2600 CPU and RX 6600 XT graphics card.

I can occasionally solve this issue thanks to BingGPT which sometimes gives me suggestions such as using Systemctl, but since today, that is also not working.
I’ve tried looking into it using journalctl and systemctl status bluetooth. here’s the following:

~]$ journalctl -xeu bluetooth.service
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ An ExecStart= process belonging to unit bluetooth.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
Mej 20 14:46:56 kylemanj systemd[1]: bluetooth.service: Failed with result 'exi>
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ The unit bluetooth.service has entered the 'failed' state with result 'exit->
Mej 20 14:46:56 kylemanj systemd[1]: Failed to start Bluetooth service.
░░ Subject: A start job for unit bluetooth.service has failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ A start job for unit bluetooth.service has finished with a failure.
░░ 
░░ The job identifier is 3230 and the job result is failed.
lines 83-102/102 (END)
~]$ systemctl status bluetooth.service
× bluetooth.service - Bluetooth service
     Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sat 2023-05-20 14:46:56 CEST; 9min ago
       Docs: man:bluetoothd(8)
    Process: 14763 ExecStart=/usr/lib/bluetooth/bluetoothd (code=exited, status=1/FAILURE)
   Main PID: 14763 (code=exited, status=1/FAILURE)
     Status: "Starting up"
        CPU: 86ms

Mej 20 14:46:56 kylemanj systemd[1]: Starting Bluetooth service...
Mej 20 14:46:56 kylemanj bluetoothd[14763]: Bluetooth daemon 5.66
Mej 20 14:46:56 kylemanj bluetoothd[14763]: D-Bus setup failed: Name already in use
Mej 20 14:46:56 kylemanj bluetoothd[14763]: src/main.c:main() Unable to get on D-Bus
Mej 20 14:46:56 kylemanj systemd[1]: bluetooth.service: Main process exited, code=exited, status=1/FAILURE
Mej 20 14:46:56 kylemanj systemd[1]: bluetooth.service: Failed with result 'exit-code'.
Mej 20 14:46:56 kylemanj systemd[1]: Failed to start Bluetooth service.

This is not a one-off, unfortunately lately it has been more broken than working, which is a shame.

PS. as obvious as it is, I’m not an IT professional.

Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

Hello @jetsmonti :wink:

Please check the kernel messages:

sudo dmesg | grep -i bluetooth

Probably this could be a workaround for you if you get an 110 ETIMEDOUT Error of the device:

1 Like

Thanks @megavolt ,

For some reason, Bluetooth is working again right now but I’ll give that a shot next time it stops working.

Off topic: sometimes I wonder whether Linux has any built-in troubleshooting tools that could handle issues like this, since most of the times I had problems like this, the solution was something silly in the background. Of course power-users like yourself would know how to deal with it under 2 seconds flat but regular users who have no background don’t know how to deal with such things, which is why some people are put off from Linux as their daily PC.

I ran the line you posted (while bluetooth is working) and got the following:

[    6.715635] Bluetooth: Core ver 2.22
[    6.715656] NET: Registered PF_BLUETOOTH protocol family
[    6.715657] Bluetooth: HCI device and connection manager initialized
[    6.715660] Bluetooth: HCI socket layer initialized
[    6.715662] Bluetooth: L2CAP socket layer initialized
[    6.715665] Bluetooth: SCO socket layer initialized
[    6.849711] Bluetooth: hci0: unexpected event for opcode 0x0000
[    6.851723] Bluetooth: hci0: CSR: Setting up dongle with HCI ver=6 rev=22bb
[    6.851729] Bluetooth: hci0: LMP ver=6 subver=22bb; manufacturer=10
[    6.955884] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    6.955888] Bluetooth: BNEP filters: protocol multicast
[    6.955891] Bluetooth: BNEP socket layer initialized
[    7.081923] Bluetooth: MGMT ver 1.22
[    7.314288] audit: type=1400 audit(1684610531.366:107): apparmor="DENIED" operation="capable" class="cap" profile="snap.bluez.bluez" pid=860 comm="bluetoothd" capability=12  capname="net_admin"
[    7.474110] audit: type=1400 audit(1684610531.526:108): apparmor="DENIED" operation="capable" class="cap" profile="snap.bluez.bluez" pid=1064 comm="bluetoothd" capability=12  capname="net_admin"
[    7.741857] audit: type=1400 audit(1684610531.793:109): apparmor="DENIED" operation="capable" class="cap" profile="snap.bluez.bluez" pid=1207 comm="bluetoothd" capability=12  capname="net_admin"
[    7.906084] audit: type=1400 audit(1684610531.956:110): apparmor="DENIED" operation="capable" class="cap" profile="snap.bluez.bluez" pid=1256 comm="bluetoothd" capability=12  capname="net_admin"
[   14.137323] Bluetooth: RFCOMM TTY layer initialized
[   14.137335] Bluetooth: RFCOMM socket layer initialized
[   14.137340] Bluetooth: RFCOMM ver 1.11
[  330.287600] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[  330.287606] Bluetooth: HIDP socket layer initialized
[  330.288409] input: NVIDIA Controller v01.04 as /devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-5/1-5:1.0/bluetooth/hci0/hci0:73/0005:0955:7214.0007/input/input20
[  330.288509] hid-generic 0005:0955:7214.0007: input,hidraw6: BLUETOOTH HID v0.01 Gamepad [NVIDIA Controller v01.04] on 00:1a:7d:da:71:15
[ 2324.800895] input: NVIDIA Controller v01.04 as /devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-5/1-5:1.0/bluetooth/hci0/hci0:73/0005:0955:7214.0008/input/input22
[ 2324.800990] hid-generic 0005:0955:7214.0008: input,hidraw6: BLUETOOTH HID v0.01 Gamepad [NVIDIA Controller v01.04] on 00:1a:7d:da:71:15
[ 4099.110175] input: NVIDIA Controller v01.04 as /devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-5/1-5:1.0/bluetooth/hci0/hci0:73/0005:0955:7214.0009/input/input24
[ 4099.110367] hid-generic 0005:0955:7214.0009: input,hidraw6: BLUETOOTH HID v0.01 Gamepad [NVIDIA Controller v01.04] on 00:1a:7d:da:71:15

Will be interesting to compare how it looks when my bluetooth stops working.

Cheers!

Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

Allright.

Well you know, I understand your intention. Something like a “problem solver” like on Windows? You know, Linux is really open by its nature and has by far the best human-readable logs. It’s not that it’s not feasible, it’s that such a tool is inefficient. The reason why windows has a “problem solver” is that the logs are cryptic and almost everything is black-boxed. I remember myself as I was on Windows last month: Why not just run the “problem solver” on Windows to solve my Problem? And you know what, It fixed nothing. In my opinion, such tools won’t help much, but educating users help more. Plus, Linux is really not for every average user due to the open nature, there are many possibilities: I would have pity on that guy who would develop a “problem solver” for all Linux Distros, that would be a life task.

1 Like

Funny that you say that, cause ever since I got access to BingGPT, I’ve mostly been copy-pasting the errors from the terminal into the BingGPT window, asking bingGPT to show me step-by-step and then copying and pasting the instructions from BingGPT back into the Terminal :sweat_smile:
it’s very rudimentary but I’ve had limited success with it. Made me think: if I had just enough skill to write a script that did the copy-pasting for me from the Terminal into the GPT and vice-versa, I’d have a very rough and very basic self-troubleshooter that kept itself up-to-date as it went along.

Anyways, Tangent apart, bluetooth stopped working again, I’ll do what you told me to do yesterday again.

[kyle@kylemanj ~]$ sudo dmesg | grep -i bluetooth
[sudo] password for kyle: 
[    7.880945] Bluetooth: Core ver 2.22
[    7.880969] NET: Registered PF_BLUETOOTH protocol family
[    7.880970] Bluetooth: HCI device and connection manager initialized
[    7.880975] Bluetooth: HCI socket layer initialized
[    7.880977] Bluetooth: L2CAP socket layer initialized
[    7.880979] Bluetooth: SCO socket layer initialized
[    7.881482] audit: type=1400 audit(1684659672.587:107): apparmor="DENIED" operation="capable" class="cap" profile="snap.bluez.bluez" pid=1019 comm="bluetoothd" capability=12  capname="net_admin"
[    7.884595] audit: type=1400 audit(1684659672.590:108): apparmor="DENIED" operation="capable" class="cap" profile="snap.bluez.bluez" pid=1019 comm="bluetoothd" capability=10  capname="net_bind_service"
[    7.889213] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    7.889216] Bluetooth: BNEP filters: protocol multicast
[    7.889219] Bluetooth: BNEP socket layer initialized
[    7.889439] audit: type=1400 audit(1684659672.593:109): apparmor="DENIED" operation="open" class="file" profile="snap.bluez.bluez" name="/sys/devices/virtual/dmi/id/chassis_type" pid=1019 comm="bluetoothd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[    7.889930] audit: type=1400 audit(1684659672.593:110): apparmor="DENIED" operation="open" class="file" profile="snap.bluez.bluez" name="/dev/rfkill" pid=1019 comm="bluetoothd" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
[    8.165875] Bluetooth: hci0: CSR: Setting up dongle with HCI ver=6 rev=22bb
[    8.165880] Bluetooth: hci0: LMP ver=6 subver=22bb; manufacturer=10
[    8.396135] Bluetooth: MGMT ver 1.22
[    8.451471] audit: type=1326 audit(1684659673.157:111): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=snap.bluez.bluez pid=1019 comm="bluetoothd" exe="/snap/bluez/334/usr/lib/bluetooth/bluetoothd" sig=0 arch=c000003e syscall=50 compat=0 ip=0x7f8fc51192cb code=0x50000

:rofl:

You know that the language model acts like a parrot. What ever you teach it, it will just repeat. Maybe you haven’t pushed BingGPT to its limit yet, but I can already say: someday you will. At ChatGPT, I kept coming up against my limits and then it was time to think for myself.


At least the driver is not the problem, but these ones are interessting:

So in fact there is program snap.bluez.bluez which is obviously a snap. Apparmor is a sandbox driver and it does not allow to change capabilities or change anything else on the global system according to Bluetooth.

So, my question: What do you think is the benefit of using bluez in a sandboxed snap? I think the snap and apparmor rules are the root cause of your problem.

1 Like

I know that the GPT is just a language model but the fact that it combines the search engine (even though it is Bing…) already makes it a bit better. Everything has its limits in the end, and yes I’ve noticed it doesn’t know much about cars, even just looking up pricing of old classics. It’s Interesting, anyways…

As for the BlueZ snap thing, I have no idea mate, it probably installed as a dependency with something else or I’ve installed it while troubleshooting something else.

So do I just uninstall bluez or what do I do?

Btw thanks for taking the time to help out.

I guess so. But not the system package, but the snap package. Since I don’t use snaps and don’t have it installed at all, I could just advise you to avoid snaps if possible on Manjaro, Ubuntu is another story, use flatpak instead if needed.

Maybe with that you get a list of packages:

snap list

and remove:

sudo snap remove package_name

I could imagine that you start bluez as snap, apparmor blocks it, so doesn’t work. System bluez should work?!

Ah OK I see what you mean. Yeah, I just did it through the Add/Remove Software GUI :grin:
So far so good, let’s see next time it fails.