Bug 1226823

Summary: bluetooth earphones fail
Product: [openSUSE] openSUSE Tumbleweed Reporter: Dmitry Markov <werwolf131313>
Component: SoundAssignee: Takashi Iwai <tiwai>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: alarrosa, kv, tiwai, werwolf131313
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Dmitry Markov 2024-06-23 15:56:45 UTC
I've been using Redmi Buds 4 Pro TWS headphones for several years now. everything was fine before. However, recently a problem has appeared:
The headphones connect and work well if you listen to music in the player or browser, but if you make a call on telegram or discord, the system starts switching the audio output from the headphones to the speakers and back in an endless loop.

in journalctl I see the following line:
> июн 23 20:47:03 home.itrus.su telegram-desktop[16719]: qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
> июн 23 20:47:09 home.itrus.su bluetoothd[1354]: /org/bluez/hci0/dev_6C_D3_EE_5A_B5_8D/sep2/fd5: fd(30) ready
> июн 23 20:47:11 home.itrus.su kded6[5481]: Registering ":1.131/StatusNotifierItem" to system tray
> июн 23 20:47:11 home.itrus.su plasmashell[5559]: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
> июн 23 20:47:11 home.itrus.su kdeconnectd[5775]: 2024-06-23T20:47:11 org.kde.pulseaudio: No object for name "bluez_output.6C_D3_EE_5A_B5_8D.1"
> июн 23 20:47:11 home.itrus.su kded6[5481]: Service  ":1.131" unregistered
> июн 23 20:47:11 home.itrus.su kded6[5481]: Registering ":1.132/StatusNotifierItem" to system tray
> июн 23 20:47:11 home.itrus.su plasmashell[5559]: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
> июн 23 20:47:13 home.itrus.su kdeconnectd[5775]: 2024-06-23T20:47:13 org.kde.pulseaudio: No object for name "bluez_output.6C_D3_EE_5A_B5_8D.1"
> июн 23 20:47:13 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 69
> июн 23 20:47:14 home.itrus.su kded6[5481]: Service  ":1.132" unregistered
> июн 23 20:47:14 home.itrus.su kded6[5481]: Registering ":1.133/StatusNotifierItem" to system tray
> июн 23 20:47:14 home.itrus.su plasmashell[5559]: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
> июн 23 20:47:14 home.itrus.su kdeconnectd[5775]: 2024-06-23T20:47:14 org.kde.pulseaudio: No object for name "bluez_output.6C_D3_EE_5A_B5_8D.1"
> июн 23 20:47:15 home.itrus.su kded6[5481]: Service  ":1.133" unregistered
> июн 23 20:47:15 home.itrus.su kded6[5481]: Registering ":1.134/StatusNotifierItem" to system tray
> июн 23 20:47:15 home.itrus.su plasmashell[5559]: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
> июн 23 20:47:17 home.itrus.su kdeconnectd[5775]: 2024-06-23T20:47:17 org.kde.pulseaudio: No object for name "bluez_output.6C_D3_EE_5A_B5_8D.1"
> июн 23 20:47:17 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 69
> июн 23 20:47:17 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 64
> июн 23 20:47:17 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 64
> июн 23 20:47:17 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 64
> июн 23 20:47:17 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 64
> июн 23 20:47:18 home.itrus.su kded6[5481]: Service  ":1.134" unregistered
> июн 23 20:47:18 home.itrus.su kded6[5481]: Registering ":1.135/StatusNotifierItem" to system tray
> июн 23 20:47:18 home.itrus.su plasmashell[5559]: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
> июн 23 20:47:19 home.itrus.su kdeconnectd[5775]: 2024-06-23T20:47:19 org.kde.pulseaudio: No object for name "bluez_output.6C_D3_EE_5A_B5_8D.1"
> июн 23 20:47:19 home.itrus.su kded6[5481]: Service  ":1.135" unregistered
> июн 23 20:47:19 home.itrus.su kded6[5481]: Registering ":1.136/StatusNotifierItem" to system tray
> июн 23 20:47:19 home.itrus.su plasmashell[5559]: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
> июн 23 20:47:21 home.itrus.su kdeconnectd[5775]: 2024-06-23T20:47:21 org.kde.pulseaudio: No object for name "bluez_output.6C_D3_EE_5A_B5_8D.1"
> июн 23 20:47:21 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 64
> июн 23 20:47:21 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 63
> июн 23 20:47:21 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 63
> июн 23 20:47:21 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 63
> июн 23 20:47:22 home.itrus.su kded6[5481]: Service  ":1.136" unregistered
> июн 23 20:47:22 home.itrus.su kded6[5481]: Registering ":1.137/StatusNotifierItem" to system tray
> июн 23 20:47:22 home.itrus.su plasmashell[5559]: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
> июн 23 20:47:22 home.itrus.su kded6[5481]: Service  ":1.137" unregistered
> июн 23 20:47:22 home.itrus.su kdeconnectd[5775]: 2024-06-23T20:47:22 org.kde.pulseaudio: No object for name "bluez_output.6C_D3_EE_5A_B5_8D.1"
> июн 23 20:47:24 home.itrus.su kdeconnectd[5775]: 2024-06-23T20:47:24 org.kde.pulseaudio: No object for name "bluez_output.6C_D3_EE_5A_B5_8D.1"
> июн 23 20:47:25 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 63
> июн 23 20:47:25 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 62
> июн 23 20:47:25 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 62
> июн 23 20:47:25 home.itrus.su kernel: Bluetooth: hci0: SCO packet for unknown connection handle 62

I tried several usb bluetooth adapters on different chips, the behavior does not change when changing the adapter.


Unfortunately, I could not understand the reasons for this behavior, so I hope for help.
Comment 1 Takashi Iwai 2024-06-24 07:01:33 UTC
Is this a kernel regression?  Please boot with the older kernels and verify whether the problem still persists or not.
Comment 2 Dmitry Markov 2024-06-24 07:24:14 UTC
(In reply to Takashi Iwai from comment #1)
> Is this a kernel regression?  Please boot with the older kernels and verify
> whether the problem still persists or not.

Unfortunately, I didn't have enough of the old kernel left.
At the moment there are kernel versions on this pc:
> vmlinuz-6.8.5-1-default
> vmlinuz-6.8.7-1-default
> vmlinuz-6.8.8-1-default
> vmlinuz-6.9.1-1-default
> vmlinuz-6.9.3-1-default
> vmlinuz-6.9.5-1-default

I tried versions 6.8.5 & 6.8.7, but in these versions the problem is already present.

I’m also not sure that the problem is in the kernel, this seemed to me the most logical assumption based on the log that I see above, but I could be wrong.
Comment 3 Takashi Iwai 2024-06-24 07:38:07 UTC
You can try 6.7 and older from my OBS repos,
  http://download.opensuse.org/repositories/home:/tiwai:/kernel:/6.7/standard/
  http://download.opensuse.org/repositories/home:/tiwai:/kernel:/6.6/standard/

Judging from your description, it's a problem that is rather new.  If so, and if neither of the above kernels works, it would imply that it's no kernel regression but something else.
Comment 4 Dmitry Markov 2024-06-24 08:29:29 UTC
(In reply to Takashi Iwai from comment #3)
> You can try 6.7 and older from my OBS repos,
>  
> http://download.opensuse.org/repositories/home:/tiwai:/kernel:/6.7/standard/
>  
> http://download.opensuse.org/repositories/home:/tiwai:/kernel:/6.6/standard/
> 
> Judging from your description, it's a problem that is rather new.  If so,
> and if neither of the above kernels works, it would imply that it's no
> kernel regression but something else.

and so I found out something
1) changing the kernel to the one suggested did not help, the situation remains unchanged
2) when the A2DP+AAC profile is set, when trying to make an audio call, the profile tries to switch to HSP/HFP and cannot do this, but if the A2DP+LDAC profile is initially set, the profile switches to HSP/HFP without problems

As far as I can understand, the issue here is definitely not in the kernel, but I don’t understand what target to choose for this bug report if not the kernel, I would be grateful for a hint.
Comment 5 Dmitry Markov 2024-06-24 13:06:47 UTC
repeated the experiment several times
Apparently it’s not a matter of specific profiles, since sometimes changing the profile helps and sometimes it doesn’t.
Comment 6 Takashi Iwai 2024-06-25 13:15:31 UTC
Are you using PulseAudio?  Or was it already switched to pipewire?
If not yet, it might be worth to switch to pipewire, especially if it's about BT.

Just install pipewire-pulseaudio package, and it'll replace the needed ones automatically.
Comment 7 Dmitry Markov 2024-06-25 13:33:51 UTC
(In reply to Takashi Iwai from comment #6)
> Are you using PulseAudio?  Or was it already switched to pipewire?
> If not yet, it might be worth to switch to pipewire, especially if it's
> about BT.
> 
> Just install pipewire-pulseaudio package, and it'll replace the needed ones
> automatically.

I switched to pipewire a long time ago.
Comment 8 Takashi Iwai 2024-06-25 13:39:03 UTC
OK.  I just worried from the messages like

> июн 23 20:47:11 home.itrus.su kdeconnectd[5775]: 2024-06-23T20:47:11 org.kde.pulseaudio: No object for name "bluez_output.6C_D3_EE_5A_B5_8D.1"
Comment 9 Dmitry Markov 2024-06-25 13:47:58 UTC
(In reply to Takashi Iwai from comment #8)
> OK.  I just worried from the messages like
> 
> > июн 23 20:47:11 home.itrus.su kdeconnectd[5775]: 2024-06-23T20:47:11 org.kde.pulseaudio: No object for name "bluez_output.6C_D3_EE_5A_B5_8D.1"

I'm a little confused that inxi does not show the connected headphones even when they work normally. but as they explained to me, this is normal for BT.

Also you can see that pipewire

> Audio:
>   Device-1: Intel C600/X79 series High Definition Audio vendor: Dell
>     driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1d20
>     class-ID: 0403
>   Device-2: NVIDIA GP104 High Definition Audio driver: snd_hda_intel
>     v: kernel pcie: speed: 8 GT/s lanes: 16 bus-ID: 02:00.1 chip-ID: 10de:10f0
>     class-ID: 0403
>   Device-3: Realtek FULL HD 1080P Webcam driver: snd-usb-audio,uvcvideo
>     type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 2-1.6:6
>     chip-ID: 0bda:58b0 class-ID: 0102 serial: 200901010001
>   API: ALSA v: k6.9.5-1-default status: kernel-api with: aoss
>     type: oss-emulator
>   Server-1: PipeWire v: 1.0.7 status: active with: 1: pipewire-pulse
>     status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin

I tried it a few more times today. Still, sometimes changing the profile helps and sometimes it doesn’t, I can’t find a pattern.
Comment 10 Takashi Iwai 2024-06-25 14:13:39 UTC
OK, thanks for clarification.

As this might be a problem of pipewire, let's add Antonio to Cc.
Comment 11 Konstantin Voinov 2024-07-05 05:14:01 UTC
I've got the same issue with my BT Headphones.
What info is needed and how to properly get it (btmon, pw-dump, etc)?
Comment 12 Antonio Larrosa 2024-07-05 21:29:16 UTC
What version of pipewire and wireplumber are you using? There was a bluetooth related fix in wireplumber 0.5.5 which was submitted 3 days ago to TW. If you're not using that version, can you update and test it?
Comment 13 Konstantin Voinov 2024-07-05 22:29:13 UTC
(In reply to Antonio Larrosa from comment #12)
> What version of pipewire and wireplumber are you using? There was a
> bluetooth related fix in wireplumber 0.5.5 which was submitted 3 days ago to
> TW. If you're not using that version, can you update and test it?

Yes, it was broken on wireplumber-0.5.4+git2.96dc045
After update to 0.5.5 the problem was fixed on my side.
Comment 14 Antonio Larrosa 2024-07-06 06:54:26 UTC
Thanks for the confirmation. Dmitry Markov, can you confirm that the update to wireplumber 0.5.5 fixes the issue for you too?
Comment 15 Dmitry Markov 2024-07-07 18:06:15 UTC
(In reply to Antonio Larrosa from comment #14)
> Thanks for the confirmation. Dmitry Markov, can you confirm that the update
> to wireplumber 0.5.5 fixes the issue for you too?

I confirm, I made several test calls, everything works fine
Comment 16 Antonio Larrosa 2024-07-09 08:59:26 UTC
Thanks for confirming that it's fixed.