Pulseaudio prevents the use of impress remote over bluetooth
Summary
For the last couple of years it has been impossible to use the "impress remote" over bluetooth on linux systems. Impress is the presentation program in Libreoffice and the impress remote is a way to control the presentation from a mobile phone by means of an application.
The issue has been open on Libreoffice for a long time now (https://bugs.documentfoundation.org/show_bug.cgi?id=120663). However the problem has recently been diagnosed (By Felix Huber, if you follow the thread in the bug report). It looks like the impress remote works in bluetooh mode by using the default channel (3) for the RFCOMM protocol. However, in the last couple of years, when impress tries to bind to the channel it fails because another process has already bound that channel via DBUS.
This other process is PulseAudio: apparently the HS profile needs the RFCOMM for the AT Commands and registers channel 3.
However, it is unclear to me why pulseaudio needs to stay bound to the channel unconditionally. Is there any need from PA to bind to channel 3 even when there is no BT connection to any device? If, in general, it cannot be possible to "automatically" bind only when needed, would it be possible to provide a switch on the DBUS interface to manually activate/disactivate this binding?
Incidentally, I think that there is the same issue on the Libreoffice side. When impress starts, it immediately tries to bind to the RFCOMM channel 3 even before a presentation is being started and without a switch to control this behavior. This means that if one stopped PA, started Impress and then restarted PA, then it would be PA to fail the binding, even if LibO is not yet using it.
environment
Steps to reproduce
- On a recent linux system, with PA started up, launch
libreoffice --impress
. - Check the systems log, e.g. via
journactl --since today
What is the current bug behavior?
- Notice that there is an entry saying
bluetoothd[xxxx]: RFCOMM server failed for LibreOffice Impress Remote: rfcomm_bind: Address already in use (98)
After this, Impress remote does not work on bluetooth.
What is the expected correct behavior?
Impress should be able to bind to the RFCOMM Channel