LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-14-2020, 05:06 PM   #1
andigena
Member
 
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141

Rep: Reputation: 66
Bluetooth devices immediately disconnect after being connected regardless of adapter


I purchased a new laptop the other day and installed the most recent weekly snapshot of testing, which works in every way but one: a bizarre Bluetooth issue occurs where if I try to connect a Bluetooth audio device, it will briefly show up as connected and paired and then immediately disconnect.
Here are the specifics:
- This occurs with both my wireless headphones (Skullcandy Uproar Wireless) and a Bluetooth speaker from a different company, so it's not device specific. Unfortunately, I don't have any non-audio Bluetooth devices to test this with.
- Both of those devices work fine with my other devices, including a Debian testing desktop and another Debian laptop.
- The internal laptop Bluetooth adapter is, to my knowledge, part of a combination Realtek RTL8723DE unit and it's supposed to have kernel support built in for the Bluetooth part. However, I am using the Realtek-supplied RTL8723DE Wi-Fi driver because the built-in Realtek drivers don't work.
- I have firmware-realtek, firmware-misc-nonfree, and firmware-linux-nonfree installed.

What I've tried:
- Restarting PulseAudio (pulseaudio -k).
- Restarting bluetooth (systemctl restart bluetooth).
- Deleting all connections and reconnecting with KDE bluedevil.
- Instead of using bluedevil to connect, which I ordinarily use, I have also tried blueman and the command line tools hcitool and bluetoothctl. hcitool produces this output:
Code:
# hcitool cc [MAC address of device]
Can't create connection: Input/output error
bluetoothctl produces this output:
Code:
[bluetooth]# pair [MAC address]
Failed to pair: org.bluez.Error.ConnectionAttemptFailed
- Tried plugging in a cheap knockoff CSR 4.0 Bluetooth radio that I normally use (and which works fine with) my Debian testing desktop, then rfkilling the built-in Bluetooth adapter and retrying hcitool and bluetoothctl. bluetoothctl outputs a different message from before, but still doesn't work:
Code:
[bluetooth]# pair [MAC address]
Attempting to pair with [MAC]
[CHG] Device [MAC] Connected: yes
[CHG] Device [MAC] Paired: yes
Pairing successful
[CHG] Device [MAC] Connected: no
(this happens in the span of a few seconds without any input from me)
hcitool doesn't output anything when run, just drops me back to the prompt. The effects are identical with the GUI tools for both adapters.
- I recall running sdptool with the built-in adapter and it said the SDP server could not be found when targeted at the device, but I neglected to write down the exact output or arguments.

Any ideas? I'm stumped - my best guess is that it has something to do with PulseAudio because it's happening with multiple adapters and affects audio devices, but I am not good with PulseAudio.
 
Old 03-15-2020, 10:27 AM   #2
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,142
Blog Entries: 21

Rep: Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480
Quote:
Any ideas? I'm stumped
Hopefully this will help.

https://www.howtoforge.com/linux-dmesg-command/

Because usually /var/log/dmesg holds pertinent info on what went south on you.
 
Old 03-15-2020, 12:10 PM   #3
andigena
Member
 
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141

Original Poster
Rep: Reputation: 66
Quote:
Originally Posted by rokytnji View Post
Hopefully this will help.

https://www.howtoforge.com/linux-dmesg-command/

Because usually /var/log/dmesg holds pertinent info on what went south on you.
Yeah, I should've included that with the OP. Here:
Code:
root@laptop:/# dmesg | less | grep "Bluetooth"
[   16.303074] Bluetooth: Core ver 2.22
[   16.303111] Bluetooth: HCI device and connection manager initialized
[   16.303119] Bluetooth: HCI socket layer initialized
[   16.303122] Bluetooth: L2CAP socket layer initialized
[   16.303127] Bluetooth: SCO socket layer initialized
[   16.823581] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000d lmp_ver=08 lmp_subver=8723
[   16.824552] Bluetooth: hci0: RTL: rom_version status=0 version=2
[   16.824554] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723d_fw.bin
[   16.972381] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723d_config.bin
[   16.972554] Bluetooth: hci0: RTL: cfg_sz 10, total sz 28214
[   17.210547] Bluetooth: hci0: RTL: fw version 0x826c8873
[   20.225809] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   20.225811] Bluetooth: BNEP filters: protocol multicast
[   20.225819] Bluetooth: BNEP socket layer initialized
[   33.610597] Bluetooth: RFCOMM TTY layer initialized
[   33.610606] Bluetooth: RFCOMM socket layer initialized
[   33.610617] Bluetooth: RFCOMM ver 1.11
Also:
Code:
[   11.067618] rtlwifi: loading out-of-tree module taints kernel.
[   11.067739] rtlwifi: module verification failed: signature and/or required key missing - tainting kernel
[   13.640390] rtl8723de: Using firmware rtlwifi/rtl8723defw.bin
[   13.642382] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   13.642906] rtlwifi: rtlwifi: wireless switch is on
[   13.692336] rtl8723de 0000:03:00.0 wlo1: renamed from wlan0
[   14.655530] rtl8723de 0000:03:00.0: firmware: direct-loading firmware rtlwifi/rtl8723defw.bin
[   16.824554] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723d_fw.bin
[   16.972343] bluetooth hci0: firmware: direct-loading firmware rtl_bt/rtl8723d_fw.bin
[   16.972381] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723d_config.bin
[   16.972531] bluetooth hci0: firmware: direct-loading firmware rtl_bt/rtl8723d_config.bin
[   22.107805] r8169 0000:02:00.0: firmware: direct-loading firmware rtl_nic/rtl8168h-2.fw
The only thing there that I see as potentially being an issue is the "kernel tainting" thing, but I think it may just be because I'm using a custom wifi driver.
And my headphones actually will connect now through bluetoothctl, but they can only be changed to HDP (not A2DP, which is the correct profile) with KDE audio settings, so music is staticky beyond belief. I can connect it to A2DP very briefly after starting up, though it doesn't appear to actually work, but then the audio settings remove the A2DP option and kick it to HDP.

Last edited by andigena; 03-15-2020 at 12:17 PM. Reason: additional info
 
Old 03-15-2020, 12:16 PM   #4
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,142
Blog Entries: 21

Rep: Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480
So. If me. I would look into changing kernels and see if behavior repeats or not.

I am a shotgun trouble shooter that way.

Something like a Liquorix Kernel in Debian.
 
Old 03-15-2020, 12:17 PM   #5
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,142
Blog Entries: 21

Rep: Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480
Kernels are easy to install and uninstall for me.
 
Old 03-15-2020, 01:10 PM   #6
andigena
Member
 
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141

Original Poster
Rep: Reputation: 66
Well, Bluetooth works with Liquorix... but Wi-Fi doesn't. If I install the same driver I used on the regular kernel, I end up with the same problem as before, so that's clearly the problem. Looking into other solutions for enabling the A2DP Sink option right now.
 
Old 03-15-2020, 01:47 PM   #7
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,142
Blog Entries: 21

Rep: Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480
Good luck. I am out of skill set. That is weird as all get out to me. But I run a systemd free distro.

I say this because systemd seems to make some things more complicated.

Quote:
Well, Bluetooth works with Liquorix... but Wi-Fi doesn't. If I install the same driver I used on the regular kernel, I end up with the same problem as before, so that's clearly the problem.
 
Old 03-15-2020, 03:41 PM   #8
andigena
Member
 
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141

Original Poster
Rep: Reputation: 66
Okay, I tentatively think I fixed it. Turns out that even though PulseAudio's Bluetooth modules are present, the startup script in /etc/pulse/default.pa was failing an existence check and not enabling them as a result. I commented out these lines in /etc/pulse/default.pa:
Code:
#.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
#.endif

#.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
#.endif
So I appear to have confirmed my hunch that it's PulseAudio's fault. Only issue is, the Bluetooth signal is really choppy for some reason and I have to sit in a really specific position to get a reliable stream, but I don't know if that's solvable or just has to do with my environment.
Edit: Oh, that was because my normal Wi-Fi is out and my mobile hotspot was broadcasting on 2.4 GHz. It works fine when I turn off the hotspot. Everything works great now!

Last edited by andigena; 03-16-2020 at 09:53 AM.
 
  


Reply

Tags
bluetooth



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to list IP of all devices connected in LAN including wi-fi connected devices unclesamcrazy Linux - Newbie 2 12-10-2015 07:34 AM
14.1, some USB Mass Storage devices disconnect immediately after connection atelszewski Slackware 6 01-11-2014 04:06 PM
VNC disconnect immediately after correct login... tripleseven Linux - Server 4 01-03-2012 03:33 AM
No network packets sent immediately after quick physical disconnect and reconnect miracles Linux - Newbie 10 03-09-2011 11:48 PM
dialup disconnect immediately alma SUSE / openSUSE 6 11-04-2005 04:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration