You are not logged in.

#1 2021-11-04 17:28:40

vt220
Member
Registered: 2012-10-03
Posts: 23

Bluetooth usb dongle recognized only when plugged in physically

I have a bluetooth usb dongle which is recognized correctly and works as expected after being plugged in. But if it was already plugged in and the machine is started (from powered off state or after a reboot) or wakes up from suspended/hybernated state - the dongle is not recognized. For example, after waking up from suspended state, the following messages appear in the logs:

16:24:20 arch upowerd[533]: treating change event as add on /sys/devices/pci0000:00/0000:00:1d.0/usb5/5-2
16:24:20 arch bluetoothd[325]: Endpoint unregistered: sender=:1.28 path=/MediaEndpoint/A2DPSink/sbc
16:24:20 arch bluetoothd[325]: Endpoint unregistered: sender=:1.28 path=/MediaEndpoint/A2DPSource/sbc
16:24:20 arch bluetoothd[325]: Endpoint unregistered: sender=:1.28 path=/MediaEndpoint/A2DPSink/sbc_xq_453
16:24:20 arch bluetoothd[325]: Endpoint unregistered: sender=:1.28 path=/MediaEndpoint/A2DPSource/sbc_xq_453
16:24:20 arch bluetoothd[325]: Endpoint unregistered: sender=:1.28 path=/MediaEndpoint/A2DPSink/sbc_xq_512
16:24:20 arch bluetoothd[325]: Endpoint unregistered: sender=:1.28 path=/MediaEndpoint/A2DPSource/sbc_xq_512
16:24:20 arch bluetoothd[325]: Endpoint unregistered: sender=:1.28 path=/MediaEndpoint/A2DPSink/sbc_xq_552
16:24:20 arch bluetoothd[325]: Endpoint unregistered: sender=:1.28 path=/MediaEndpoint/A2DPSource/sbc_xq_552
16:24:20 arch upowerd[533]: treating change event as add on /sys/devices/pci0000:00/0000:00:1d.0/usb5/5-2
16:24:20 arch systemd[1]: Stopped target Bluetooth Support.
16:24:20 arch upowerd[533]: treating change event as add on /sys/devices/pci0000:00/0000:00:1d.0/usb5/5-1
16:24:20 arch systemd[378]: Stopped target Bluetooth.
16:24:21 arch systemd[378]: Reached target Bluetooth.
16:24:23 arch kernel: Bluetooth: hci0: command 0x1001 tx timeout
16:24:26 arch systemd[1]: systemd-rfkill.service: Deactivated successfully.
...
16:24:31 arch kernel: Bluetooth: hci0: RTL: HCI_OP_READ_LOCAL_VERSION failed (-110)

During start/reboot or after device's removal/addition is simulated via udevadm, only the following lines appear:

<some time> arch kernel: Bluetooth: hci0: command 0x1001 tx timeout
<some time> arch systemd[1]: systemd-rfkill.service: Deactivated successfully.
...
<a couple of seconds later> arch kernel: Bluetooth: hci0: RTL: HCI_OP_READ_LOCAL_VERSION failed (-110)

When the device is physically plugged in (and then everything works), the following appears in the logs:

16:14:11 arch kernel: usb 5-2: USB disconnect, device number 3
16:14:11 arch systemd[378]: Stopped target Bluetooth.
16:14:11 arch systemd[1]: Starting Load/Save RF Kill Switch Status...
16:14:11 arch systemd[1]: Stopped target Bluetooth Support.
16:14:11 arch systemd[1]: Started Load/Save RF Kill Switch Status.
16:14:11 arch audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
16:14:12 arch kernel: audit: type=1130 audit(1635862451.990:286): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
16:14:17 arch systemd[1]: systemd-rfkill.service: Deactivated successfully.
16:14:17 arch audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
16:14:17 arch kernel: audit: type=1131 audit(1635862457.000:287): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
16:14:17 arch kernel: usb 5-2: new full-speed USB device number 4 using uhci_hcd
16:14:17 arch kernel: usb 5-2: New USB device found, idVendor=0bda, idProduct=8771, bcdDevice= 2.00
16:14:17 arch kernel: usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
16:14:17 arch kernel: usb 5-2: Manufacturer: Realtei
16:14:17 arch kernel: usb 5-2: SerialNumber: 00E04C239987
16:14:17 arch kernel: Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000b lmp_ver=0a lmp_subver=8761
16:14:17 arch upowerd[533]: treating change event as add on /sys/devices/pci0000:00/0000:00:1d.0/usb5/5-2
16:14:17 arch kernel: Bluetooth: hci0: RTL: rom_version status=0 version=1
16:14:17 arch kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8761b_fw.bin
16:14:17 arch systemd[378]: Reached target Bluetooth.
16:14:17 arch systemd[1]: Starting Load/Save RF Kill Switch Status...
16:14:17 arch systemd[1]: Reached target Bluetooth Support.
16:14:17 arch audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
16:14:17 arch systemd[1]: Started Load/Save RF Kill Switch Status.
16:14:17 arch kernel: audit: type=1130 audit(1635862457.350:288): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
16:14:17 arch kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8761b_config.bin
16:14:17 arch kernel: Bluetooth: hci0: RTL: cfg_sz 25, total sz 21389
16:14:17 arch slim[3027]: thunar-volman: Unsupported USB device type "usb".
16:14:17 arch kernel: Bluetooth: hci0: RTL: fw version 0x0d99646b
16:14:17 arch slim[3035]: thunar-volman: Unsupported USB device type "btusb".
16:14:17 arch slim[3039]: thunar-volman: Unsupported USB device type "btusb".
16:14:17 arch kernel: NET: Registered protocol family 38
16:14:17 arch kernel: Bluetooth: RFCOMM TTY layer initialized
16:14:17 arch kernel: Bluetooth: RFCOMM socket layer initialized
16:14:17 arch kernel: Bluetooth: RFCOMM ver 1.11
16:14:17 arch bluetoothd[325]: Endpoint registered: sender=:1.28 path=/MediaEndpoint/A2DPSink/sbc
16:14:17 arch bluetoothd[325]: Endpoint registered: sender=:1.28 path=/MediaEndpoint/A2DPSource/sbc
16:14:17 arch bluetoothd[325]: Endpoint registered: sender=:1.28 path=/MediaEndpoint/A2DPSink/sbc_xq_453
16:14:17 arch bluetoothd[325]: Endpoint registered: sender=:1.28 path=/MediaEndpoint/A2DPSource/sbc_xq_453
16:14:17 arch bluetoothd[325]: Endpoint registered: sender=:1.28 path=/MediaEndpoint/A2DPSink/sbc_xq_512
16:14:17 arch bluetoothd[325]: Endpoint registered: sender=:1.28 path=/MediaEndpoint/A2DPSource/sbc_xq_512
16:14:17 arch bluetoothd[325]: Endpoint registered: sender=:1.28 path=/MediaEndpoint/A2DPSink/sbc_xq_552
16:14:17 arch bluetoothd[325]: Endpoint registered: sender=:1.28 path=/MediaEndpoint/A2DPSource/sbc_xq_552
16:14:22 arch systemd[1]: systemd-rfkill.service: Deactivated successfully.

What can be done so that the device is recognized without having to physically unplug/plug it back?

Last edited by vt220 (2021-11-16 13:23:49)

Offline

#2 2021-11-05 18:04:06

aldyrius
Member
Registered: 2015-12-31
Posts: 39

Re: Bluetooth usb dongle recognized only when plugged in physically

Seems similar to https://bbs.archlinux.org/viewtopic.php?id=226312, given:

16:24:23 arch kernel: Bluetooth: hci0: command 0x1001 tx timeout

right when systemd reaches the Bluetooth target in the undesirable case.

Are you using a laptop, and what happens if you go down the same trail as in that thread, accounting for any possible power management concerns and/or the use of AUTOSUSPEND_DEVID_BLACKLIST ?

Offline

#3 2021-11-06 17:44:09

vt220
Member
Registered: 2012-10-03
Posts: 23

Re: Bluetooth usb dongle recognized only when plugged in physically

Yes, I am using a laptop, but it doesn't have any power management software beyond the standard XFCE power manager. It is a very old laptop (Dell Inspiron 1525, almost 14 years old) who's battery died more than a decade ago, so it is always connected to electricity.

Offline

Board footer

Powered by FluxBB