Ever since I've had my JBL-E50BT headphones I've been struggling to make them work properly on Ubuntu.
For instance every time I connect them, I have to switch the audio profile to HSP/HFP, disconnect, reconnect and switch back to A2DP before they will make any sound with A2DP. But it's something I can live with.
The JBL headphones have a "feature" that turns them off after no sound is played for n minutes, probably to preserve power. I'm not sure of the exact time, but it's something around 15-30 minutes.
Previously my Ubuntu system kept the headphones from idling, and a static noise could be heard from the headphones at any time it was connected. But ever since an update I did 2 weeks ago (not a dist upgrade) this does not seem to happen anymore. Right now, when sound is not playing, the system will stop outputting sound after 5 seconds and the headphones will go into idle-mode. No noise is then heard out of the headphones.
My question is: How do I prevent my headphones from going into idle-mode, answers to resolve issue with connecting the headphones would also be appreciated, as this will make reconnecting them after the timout a lot less annoying.
I am not concerned about the battery of the headphones, they can easily last a full work day playing music.
As suggested by @MadMike I tried the commands from this post.
$ pactl list cards short 0 alsa_card.pci-0000_00_03.0 module-alsa-card.c 1 alsa_card.pci-0000_00_1b.0 module-alsa-card.c 4 bluez_card.00_22_37_3F_C9_A4 module-bluez5-device.c $ pactl set-card-profile 4 a2dp Failure: No such entity
I'm not sure what to do with this result.