Broken Bluetooth

Hi there :slightly_smiling_face:

I spent a lot of time trying to fix this issue and I even had it on Manjaro, part of my previous life before I fell in love with NixOS. Here is my issue.

So I have a Bluetooth adapter which was working perfectly before my tweaks. I had my Bluetooth Headset paired and listened some great metal band before I broke something. I wanted to chill one midday, and I tried to pair a Xbox One Controller. It wasn’t working, so I started to ask Internet about it. Many forum mentioned the same fix: boot.extraModprobeConfig = '' options bluetooth disable_ertm=1 '';

Apparently it wasn’t a good idea because I rebooted, I tried to pair the Xbox controller and the bluetooth started to react weirdly. He asked for the pin number of the controller and the bluetooth started to stop answering. To I tried to connect my headset and this is the tragedy. It wasn’t working. And it still bugs. Even after rollbacking the configuration.

Since then, I’m crying everyday, hoping that one day, a nixos-rebuild switch would fix my issue.
Does somebody can dry my eyes and warm my heart by helping me fixing this?

Here is journalctl of the computer trying to pair the device after I removed all supposed trace of the device.

mars 03 13:35:18 MyComputer xsession[3665]: Icon theme "gnome" not found.
mars 03 13:35:18 MyComputer xsession[3665]: bluedevil.wizard: Manager initialized
mars 03 13:35:18 MyComputer xsession[3665]: bluedevil.wizard: Initialize Discover Page
mars 03 13:35:18 MyComputer xsession[3665]: bluedevil.wizard: Starting scanning
mars 03 13:35:21 MyComputer xsession[3665]: bluedevil.wizard: Stopping scanning
mars 03 13:35:21 MyComputer xsession[3665]: bluedevil.wizard: PIN:  "0000"
mars 03 13:35:21 MyComputer xsession[3665]: bluedevil.wizard: Device type:  "headset"
mars 03 13:35:21 MyComputer xsession[3665]: bluedevil.wizard: Legacy:  false
mars 03 13:35:21 MyComputer xsession[3665]: bluedevil.wizard: From DB:  true
mars 03 13:35:21 MyComputer xsession[3665]: bluedevil.wizard: PIN:  "0000"
mars 03 13:35:21 MyComputer xsession[3665]: bluedevil.wizard: Initialize Pairing Page
mars 03 13:35:22 MyComputer systemd[3655]: Reached target Bluetooth.
mars 03 13:35:25 MyComputer xsession[3665]: [03/03/20, 13:35:25:819] info: Store: UPDATE_SETTINGS {
mars 03 13:35:25 MyComputer xsession[3665]:   "lastClogForProxyInfo": 1583238925818
mars 03 13:35:25 MyComputer xsession[3665]: }
mars 03 13:35:25 MyComputer xsession[3665]: [03/03/20, 13:35:25:835] info: [DESKTOP-SIDE-EFFECT] Update from desktop for keys  ["settings"]
mars 03 13:35:28 MyComputer xsession[3665]: [03/03/20, 13:35:28:656] info: [CHECK-FOR-OLD-IMS] (T03CB5TJK) Within limit: 11
mars 03 13:35:28 MyComputer xsession[3665]: [03/03/20, 13:35:28:978] info: [CHECK-FOR-OLD-IMS] (T03ADHSV0) Within limit: 10
mars 03 13:35:29 MyComputer xsession[3665]: [03/03/20, 13:35:29:313] info: [CHECK-FOR-OLD-IMS] (T03VA46NL) Within limit: 6
mars 03 13:35:30 MyComputer xsession[3665]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 31094, resource id: 31460318, major code: 3 (GetWindowAttributes), minor code: 0
mars 03 13:35:30 MyComputer xsession[3665]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 31098, resource id: 31460318, major code: 3 (GetWindowAttributes), minor code: 0
mars 03 13:35:30 MyComputer xsession[3665]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 31099, resource id: 31460318, major code: 14 (GetGeometry), minor code: 0
mars 03 13:35:32 MyComputer xsession[3665]: [03/03/20, 13:35:32:623] info: [API-Q] (T03VA46NL) 02aadcb3-1583238932.621 client.counts called with reason: client-counts-api/fetchClientCounts
mars 03 13:35:32 MyComputer xsession[3665]: [03/03/20, 13:35:32:623] info: [API-Q] (T03VA46NL) 02aadcb3-1583238932.621 client.counts is ENQUEUED
mars 03 13:35:32 MyComputer xsession[3665]: [03/03/20, 13:35:32:623] info: [API-Q] (T03VA46NL) 02aadcb3-1583238932.621 client.counts is ACTIVE
mars 03 13:35:32 MyComputer xsession[3665]: [03/03/20, 13:35:32:777] info: [API-Q] (T03VA46NL) 02aadcb3-1583238932.621 client.counts is RESOLVED
mars 03 13:35:32 MyComputer xsession[3665]: [03/03/20, 13:35:32:780] info: [COUNTS] (T03VA46NL) Applying counts to channels
mars 03 13:35:32 MyComputer xsession[3665]: [03/03/20, 13:35:32:782] info: [COUNTS] (T03VA46NL) Recounted C03VA46Q0; initial: {"unreadCnt":0,"unreadHighlightCnt":0}; after: {"unreadCnt":0,"unreadHighlightCnt":0}
mars 03 13:35:32 MyComputer xsession[3665]: [03/03/20, 13:35:32:783] info: [COUNTS] (T03VA46NL) Threads has_unreads:false mention_count:0
mars 03 13:35:32 MyComputer xsession[3665]: [03/03/20, 13:35:32:783] info: [COUNTS] (T03VA46NL) Completed counts processing
mars 03 13:35:39 MyComputer xsession[3665]: [03/03/20, 13:35:39:834] info: [API-Q] (T03ADHSV0) 02aadcb3-1583238939.832 client.counts called with reason: client-counts-api/fetchClientCounts
mars 03 13:35:39 MyComputer xsession[3665]: [03/03/20, 13:35:39:834] info: [API-Q] (T03ADHSV0) 02aadcb3-1583238939.832 client.counts is ENQUEUED
mars 03 13:35:39 MyComputer xsession[3665]: [03/03/20, 13:35:39:834] info: [API-Q] (T03ADHSV0) 02aadcb3-1583238939.832 client.counts is ACTIVE
mars 03 13:35:40 MyComputer xsession[3665]: [03/03/20, 13:35:40:206] info: [API-Q] (T03ADHSV0) 02aadcb3-1583238939.832 client.counts is RESOLVED
mars 03 13:35:40 MyComputer xsession[3665]: [03/03/20, 13:35:40:209] info: [COUNTS] (T03ADHSV0) Applying counts to channels
mars 03 13:35:40 MyComputer xsession[3665]: [03/03/20, 13:35:40:211] info: [COUNTS] (T03ADHSV0) Threads has_unreads:false mention_count:0
mars 03 13:35:40 MyComputer xsession[3665]: [03/03/20, 13:35:40:211] info: [COUNTS] (T03ADHSV0) Completed counts processing
mars 03 13:35:40 MyComputer xsession[3665]: [03/03/20, 13:35:40:456] info: [API-Q] (T03CB5TJK) 02aadcb3-1583238940.453 client.counts called with reason: client-counts-api/fetchClientCounts
mars 03 13:35:40 MyComputer xsession[3665]: [03/03/20, 13:35:40:456] info: [API-Q] (T03CB5TJK) 02aadcb3-1583238940.453 client.counts is ENQUEUED
mars 03 13:35:40 MyComputer xsession[3665]: [03/03/20, 13:35:40:456] info: [API-Q] (T03CB5TJK) 02aadcb3-1583238940.453 client.counts is ACTIVE
mars 03 13:35:40 MyComputer xsession[3665]: [03/03/20, 13:35:40:628] info: [API-Q] (T03CB5TJK) 02aadcb3-1583238940.453 client.counts is RESOLVED
mars 03 13:35:40 MyComputer xsession[3665]: [03/03/20, 13:35:40:632] info: [COUNTS] (T03CB5TJK) Applying counts to channels
mars 03 13:35:40 MyComputer xsession[3665]: [03/03/20, 13:35:40:639] info: [COUNTS] (T03CB5TJK) Recounted DMM1CPCQ7; initial: {"unreadCnt":0,"unreadHighlightCnt":0}; after: {"unreadCnt":0,"unreadHighlightCnt":0}
mars 03 13:35:40 MyComputer xsession[3665]: [03/03/20, 13:35:40:639] info: [COUNTS] (T03CB5TJK) Threads has_unreads:false mention_count:0
mars 03 13:35:40 MyComputer xsession[3665]: [03/03/20, 13:35:40:640] info: [COUNTS] (T03CB5TJK) Completed counts processing
mars 03 13:35:46 MyComputer xsession[3665]: org.kde.bluez: PendingCall Error: "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."
mars 03 13:35:46 MyComputer xsession[3665]: bluedevil.wizard: Pairing finished:
mars 03 13:35:46 MyComputer xsession[3665]: bluedevil.wizard:          error     :  true
mars 03 13:35:46 MyComputer xsession[3665]: bluedevil.wizard:          errorText :  "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."
mars 03 13:35:46 MyComputer xsession[3665]: bluedevil.wizard: Initialize Fail Page
mars 03 13:36:02 MyComputer xsession[3665]: [03/03/20, 13:36:02:097] info: [API-Q] (T03CB5TJK) 02aadcb3-1583238962.094 channels.suggestions called with reason: channels-suggestions
mars 03 13:36:02 MyComputer xsession[3665]: [03/03/20, 13:36:02:097] info: [API-Q] (T03CB5TJK) 02aadcb3-1583238962.094 channels.suggestions is ENQUEUED
mars 03 13:36:02 MyComputer xsession[3665]: [03/03/20, 13:36:02:097] info: [API-Q] (T03CB5TJK) 02aadcb3-1583238962.094 channels.suggestions is ACTIVE
mars 03 13:36:02 MyComputer xsession[3665]: [03/03/20, 13:36:02:259] info: [API-Q] (T03CB5TJK) 02aadcb3-1583238962.094 channels.suggestions is RESOLVED
mars 03 13:36:06 MyComputer xsession[3668]: [03/03/20, 13:36:06:217] info: Store: SET_SYSTEM_IDLE idle_taskbar
mars 03 13:36:08 MyComputer bluetoothd[1064]: 74:5C:4B:D2:D9:FF: error updating services: Connection timed out (110)

Thanks guys for your future help :slight_smile:

I’ve recently setup a WH-1000XM3 on NixOS 19.09, and for me I was able to pair and control the headset at the cmdline with sudo bluetoothctl after putting hardware.bluetooth.enable = true; in my NixOS config.

In particular, it has options to delete a paired device, start pairing, connect/disconnect, etc. Does it work for you?

Hi :slight_smile:

No sadly it does not work with bluetoothctl neither. I will try again later today and post what it says when I try to pair/connect but from my memory, it does nothing. The pairing process is stuck and then the whole Bluetooth interface does not answer after this.

PS: I’m on the unstable channel, I forgot to mention it

1 Like

Hi, I’m having similar problems after the latest upgrade (following nixos-unstable). Cannot connect to bluetooth headset, and getting the following errors in dmesg:

[  746.833513] Bluetooth: hci0: Ignoring HCI_Connection_Complete for invalid handle
[ 3209.401551] Bluetooth: hci0: link tx timeout

Did you find any solution to this?

Hey! It has been 2 years since I met this bug. I changed my old computer since then, and I didn’t met this issue again. So no, I didn’t find any solution :confused:

OK, seems to happen when I switch from kernel 5.17.3 to 5.17.5…

I was having problems with bluetooth as well, but in my case it was a matter of changing bluezFull to bluez in my NixOS config, maybe this can help in your case too

OK, really weird. Just rebooted, after having connected to the device in old kernel (5.17.3) and now it seems to work also in 5.17.5. Maybe some intermittent problem…

@kamadorueda thanks for the suggestion, but I only have

  hardware.bluetooth.enable = true;
  services.blueman.enable = true;

in my configuration. It seems like that installs bluez as a dependency, unless I’m mistaken.

Possibly related to this bugfix? bluez: add upstream patch for /var/lib/bluetooth by mightyiam · Pull Request #170194 · NixOS/nixpkgs · GitHub

I have an AX200 Wi-Fi/Bluetooth chip and sometimes the Bluetooth controller stops being recognized and shutting down and disconnecting the motherboard from power for 5 seconds fixes it.

1 Like

It’s apparently a power management thing, I’ve seen it on a few recent motherboards, though never been able to pinpoint the exact cause or a long-term fix.

Unfortunately it sounds like op has a USB dongle, so probably not applicable.

1 Like
Hosted by Flying Circus.