Bug#995399: bluez: bluetooth disable after few seconds

2024-01-25 Thread Martin Tonusoo
Package: bluez
Version: 5.71-1
Followup-For: Bug #995399
X-Debbugs-Cc: mar...@tonusoo.ee

I observed pretty much the identical behavior described by Flavio Amieiro after
upgrading to 5.71-1. The bluetooth speaker connected for ~5 seconds,
after which the bluetoothd segfaulted:

[Thu Jan 25 23:37:29 2024] input: Bedroom speaker (AVRCP) as 
/devices/virtual/input/input36
[Thu Jan 25 23:37:36 2024] bluetoothd[8904]: segfault at 5621e0155f79 ip 
562480a64375 sp 7ffd9e9c66e0 error 4 in bluetoothd[562480a42000+ec000] 
likely on CPU 0 (core 0, socket 0)
[Thu Jan 25 23:37:36 2024] Code: 00 31 c0 e9 54 ff ff ff 66 66 2e 0f 1f 84 00 
00 00 00 00 66 90 f3 0f 1e fa 41 55 41 54 55 53 48 83 ec 08 48 8b 2a 48 8b 7a 
08 <48> 8b 45 20 4c 8b ad 88 00 00 00 4c 8b 20 48 85 ff 74 19 c7 47 08


Upgrading to 5.72 from the upstream fixed this issue.


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.6.13-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages bluez depends on:
ii  dbus [default-dbus-system-bus]  1.14.10-4
ii  init-system-helpers 1.66
ii  kmod31-1
ii  libasound2  1.2.10-3
ii  libc6   2.37-14
ii  libdbus-1-3 1.14.10-4
ii  libdw1  0.190-1+b1
ii  libglib2.0-02.78.3-2
ii  libreadline88.2-3
ii  libudev1255.3-1
ii  udev255.3-1

bluez recommends no packages.

Versions of packages bluez suggests:
ii  pulseaudio-module-bluetooth  16.1+dfsg1-3

-- Configuration Files:
/etc/bluetooth/main.conf changed [not included]

-- no debconf information



Bug#995399: bluez: bluetooth disable after few seconds

2024-01-22 Thread Flávio Amieiro
Package: bluez
Followup-For: Bug #995399
X-Debbugs-Cc: flavio.amie...@gmail.com

Dear Maintainer,


I have similar behavior with a bluetooth speaker instead of a mouse. In my
case, when I pair the speaker, it connects fine and stays connected. The
problem comes up as soon as I pause any audio or video. About 3 seconds
after pausing media playback, `bluetooth.service` restarts (`code=killed,
status=11/SEGV`) and the speaker disconnects.

Following are the bluetooth service logs and dmesg output around the time
where playback was paused and the speaker disconnected.

-- bluetooth service journal:

jan 22 08:31:10 berlin bluetoothd[11332]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/faststream
jan 22 08:31:10 berlin bluetoothd[11332]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/faststream_duplex
jan 22 08:31:10 berlin bluetoothd[11332]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSink/opus_05
jan 22 08:31:10 berlin bluetoothd[11332]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/opus_05
jan 22 08:31:10 berlin bluetoothd[11332]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSink/opus_05_duplex
jan 22 08:31:10 berlin bluetoothd[11332]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/opus_05_duplex
jan 22 08:55:40 berlin bluetoothd[11332]: 
/org/bluez/hci0/dev_04_21_44_B5_B0_FC/sep1/fd0: fd(40) ready
jan 22 08:55:54 berlin systemd[1]: bluetooth.service: Main process exited, 
code=killed, status=11/SEGV
jan 22 08:55:54 berlin systemd[1]: bluetooth.service: Failed with result 
'signal'.
jan 22 08:55:54 berlin systemd[1]: Starting bluetooth.service - Bluetooth 
service...
jan 22 08:55:54 berlin (uetoothd)[18037]: bluetooth.service: 
ConfigurationDirectory 'bluetooth' already exists but the mode is different. 
(File system: 755 ConfigurationDirectoryMode: 555)
jan 22 08:55:54 berlin bluetoothd[18037]: Bluetooth daemon 5.71
jan 22 08:55:54 berlin systemd[1]: Started bluetooth.service - Bluetooth 
service.
jan 22 08:55:54 berlin bluetoothd[18037]: Starting SDP server
jan 22 08:55:54 berlin bluetoothd[18037]: src/plugin.c:plugin_init() System 
does not support csip plugin
jan 22 08:55:54 berlin bluetoothd[18037]: profiles/audio/micp.c:micp_init() 
D-Bus experimental not enabled
jan 22 08:55:54 berlin bluetoothd[18037]: src/plugin.c:plugin_init() System 
does not support micp plugin
jan 22 08:55:54 berlin bluetoothd[18037]: src/plugin.c:plugin_init() System 
does not support vcp plugin
jan 22 08:55:54 berlin bluetoothd[18037]: src/plugin.c:plugin_init() System 
does not support mcp plugin
jan 22 08:55:54 berlin bluetoothd[18037]: src/plugin.c:plugin_init() System 
does not support bass plugin
jan 22 08:55:54 berlin bluetoothd[18037]: src/plugin.c:plugin_init() System 
does not support bap plugin
jan 22 08:55:54 berlin bluetoothd[18037]: Bluetooth management interface 1.22 
initialized
jan 22 08:55:54 berlin bluetoothd[18037]: Battery Provider Manager created
jan 22 08:55:54 berlin bluetoothd[18037]: 
profiles/sap/server.c:sap_server_register() Sap driver initialization failed.
jan 22 08:55:54 berlin bluetoothd[18037]: sap-server: Operation not permitted 
(1)
jan 22 08:55:54 berlin bluetoothd[18037]: Failed to set privacy: Rejected (0x0b)
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/ldac
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSink/aptx_hd
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/aptx_hd
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSink/aptx
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/aptx
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSink/sbc
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/sbc
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSink/sbc_xq
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/sbc_xq
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/aptx_ll_1
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/aptx_ll_0
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_1
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_0
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 
path=/MediaEndpoint/A2DPSource/faststream
jan 22 08:55:54 berlin bluetoothd[18037]: Endpoint registered: sender=:1.71 

Bug#995399: bluez: bluetooth disable after few seconds - ADV Monitor

2021-12-29 Thread Stefano Callegari
Package: bluez
Version: 5.62-2
Followup-For: Bug #995399

Dear Maintainer,

yesterday I switch to win10 (dual boot) and bluetooth works so isn't a
hardware problem (good new!).

Back to Debian I done new tests.

Again the bluetoothd is up when I move the mouse and goes down if not, but
I've noticed a new line in system.log

Dec 29 10:36:43 G5045 bluetoothd[1386]: 
src/adv_monitor.c:btd_adv_monitor_power_down() Unexpected NULL 
btd_adv_monitor_manager object upon power down

after that the bluetooth is definitely disable!

Thanks


-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (903, 'unstable'), (500, 'testing'), (400, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.15.0-2-amd64 (SMP w/4 CPU threads)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:it
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages bluez depends on:
ii  dbus 1.12.20-3
ii  init-system-helpers  1.61
ii  kmod 29-1
ii  libasound2   1.2.5.1-1
ii  libc62.33-1
ii  libdbus-1-3  1.12.20-3
ii  libdw1   0.186-1
ii  libglib2.0-0 2.70.2-1
ii  libreadline8 8.1-2
ii  libudev1 249.7-1
ii  lsb-base 11.1.0
ii  udev 249.7-1

bluez recommends no packages.

Versions of packages bluez suggests:
pn  pulseaudio-module-bluetooth  

-- Configuration Files:
/etc/bluetooth/main.conf changed:
[General]
ControllerMode = dual
[BR]
[LE]
EnableAdvMonInterleaveScan=0
[GATT]
[AVDTP]
[Policy]
AutoEnable=true
[AdvMon]

/etc/default/bluetooth changed:
BLUETOOTH_ENABLED=1
HID2HCI_ENABLED=1
HID2HCI_UNDO=1


-- no debconf information



Bug#995399: bluez: bluetooth disable after few seconds

2021-09-30 Thread Stefano Callegari
Package: bluez
Version: 5.61-1
Severity: important

Dear Maintainer,

from 2 days when I try to connect a bluetooth device paired (2 mouse) the
daemon hangs (system settings tell me it's disconnected, in kde tray the
icon disappear).

After few seconds the BT auto restart and connects the mouse. If I use the
mouse the BT works, but when I stop to move the mouse (for example)
for few seconds, just I move it again the BT repeat the loop.

Also the add wizard is unusable: the BT hangs repeatedly.

Thinkig some time out problems, I've tried:
1) put in black list the USB address in tlp;
2) stop tlp;
3) stop upower;
4) restart bluetooth.

Nothing solve.

If I don't use BT devices, the BT hangs again but rarely.

>From /var/log/syslog

Sep 30 17:05:37 G5045 kernel: [21749.597087] usb 2-1.3: USB disconnect, device 
number 57
Sep 30 17:05:37 G5045 kernel: [21749.688289] usb 2-1.3: new full-speed USB 
device number 58 using ehci-pci
Sep 30 17:05:37 G5045 kernel: [21749.797459] usb 2-1.3: New USB device found, 
idVendor=0cf3, idProduct=3004, bcdDevice= 0.01
Sep 30 17:05:37 G5045 kernel: [21749.797472] usb 2-1.3: New USB device strings: 
Mfr=0, Product=0, SerialNumber=0
Sep 30 17:05:37 G5045 kernel: [21749.799241] usb 2-1.3: firmware: 
direct-loading firmware ar3k/ramps_0x3101_40.dfu
Sep 30 17:05:37 G5045 NetworkManager[1212]:   [1633014337.2818] device 
(E0:C3:77:CC:2F:39): state change: disconnected -> unmanaged (reason 'removed', 
sys-iface-state: 'removed')
Sep 30 17:05:37 G5045 systemd[6371]: Stopped target Bluetooth.
Sep 30 17:05:37 G5045 kernel: [21750.001032] usb 2-1.3: USB disconnect, device 
number 58
Sep 30 17:05:37 G5045 systemd[1]: Stopped target Bluetooth.
Sep 30 17:05:37 G5045 upowerd[166548]: treating change event as add on 
/sys/devices/pci:00/:00:13.0/usb2/2-1/2-1.3
Sep 30 17:05:37 G5045 kernel: [21750.224291] usb 2-1.3: new full-speed USB 
device number 59 using ehci-pci
Sep 30 17:05:43 G5045 kernel: [21755.481456] usb 2-1.3: New USB device found, 
idVendor=0cf3, idProduct=3004, bcdDevice= 0.02
Sep 30 17:05:43 G5045 kernel: [21755.481476] usb 2-1.3: New USB device strings: 
Mfr=0, Product=0, SerialNumber=0
Sep 30 17:05:43 G5045 NetworkManager[1212]:   [1633014343.3598] manager: 
(E0:C3:77:CC:2F:39): new Bluetooth device 
(/org/freedesktop/NetworkManager/Devices/160)
Sep 30 17:05:43 G5045 NetworkManager[1212]:   [1633014343.3645] device 
(E0:C3:77:CC:2F:39): state change: unmanaged -> unavailable (reason 'managed', 
sys-iface-state: 'external')
Sep 30 17:05:43 G5045 NetworkManager[1212]:   [1633014343.4235] device 
(E0:C3:77:CC:2F:39): state change: unavailable -> disconnected (reason 'none', 
sys-iface-state: 'managed')
Sep 30 17:05:43 G5045 NetworkManager[1212]:   [1633014343.4618] audit: 
op="statistics" arg="refresh-rate-ms" pid=7738 uid=1000 result="success"
Sep 30 17:05:43 G5045 NetworkManager[1212]:   [1633014343.4768] audit: 
op="statistics" arg="refresh-rate-ms" pid=7738 uid=1000 result="success"
Sep 30 17:05:43 G5045 upowerd[166548]: treating change event as add on 
/sys/devices/pci:00/:00:13.0/usb2/2-1/2-1.3
Sep 30 17:05:43 G5045 systemd-udevd[185675]: hci0: Process '/usr/bin/hciconfig 
hci0 up' failed with exit code 1.
Sep 30 17:05:43 G5045 systemd[6371]: Reached target Bluetooth.
Sep 30 17:05:43 G5045 systemd[1]: Reached target Bluetooth.
Sep 30 17:05:44 G5045 bluetoothd[166557]: 
profiles/input/hog-lib.c:report_value_cb() bt_uhid_send: Invalid argument (22)
Sep 30 17:05:44 G5045 bluetoothd[166557]: 
profiles/input/hog-lib.c:report_value_cb() bt_uhid_send: Invalid argument (22)
Sep 30 17:05:44 G5045 bluetoothd[166557]: 
profiles/input/hog-lib.c:report_value_cb() bt_uhid_send: Invalid argument (22)
Sep 30 17:05:44 G5045 bluetoothd[166557]: 
profiles/input/hog-lib.c:report_value_cb() bt_uhid_send: Invalid argument (22)
Sep 30 17:05:44 G5045 bluetoothd[166557]: 
profiles/input/hog-lib.c:report_value_cb() bt_uhid_send: Invalid argument (22)
Sep 30 17:05:44 G5045 kernel: [21756.930985] input: CORSAIR HARPOON as 
/devices/virtual/misc/uhid/0005:1B5E:1B1C.0013/input/input41
Sep 30 17:05:44 G5045 kernel: [21756.931465] hid-generic 0005:1B5E:1B1C.0013: 
input,hidraw5: BLUETOOTH HID v1.0d Mouse [CORSAIR HARPOON] on 18:cf:5e:50:20:bc
Sep 30 17:05:51 G5045 kernel: [21763.441496] usb 2-1.3: USB disconnect, device 
number 59
Sep 30 17:05:51 G5045 systemd[6371]: Stopped target Bluetooth.
Sep 30 17:05:51 G5045 systemd[1]: Stopped target Bluetooth.
Sep 30 17:05:51 G5045 NetworkManager[1212]:   [1633014351.2100] device 
(E0:C3:77:CC:2F:39): state change: disconnected -> unmanaged (reason 'removed', 
sys-iface-state: 'removed')
Sep 30 17:05:51 G5045 kernel: [21763.568200] usb 2-1.3: new full-speed USB 
device number 60 using ehci-pci
Sep 30 17:05:51 G5045 kernel: [21763.677327] usb 2-1.3: New USB device found, 
idVendor=0cf3, idProduct=3004, bcdDevice= 0.01
Sep 30 17:05:51 G5045 kernel: [21763.677340] usb 2-1.3: New USB device strings: 
Mfr=0, Product=0, SerialNumber=0
Sep 30 17:05:51