Git Product home page Git Product logo

Comments (2)

gitthangbaby avatar gitthangbaby commented on June 26, 2024

stopped working when i added a bluetooth mouse.
have to run this repeatedly
systemctl --user start pulseaudio-bluetooth-autoconnect.service
as this service doesn't run.
also after disconnecting the audio returns to a wrong output, not the previous output.

from bluetooth-autoconnect.

jrouleau avatar jrouleau commented on June 26, 2024

@skippa
That is by design. The daemon mode only attempts to connect to paired and trusted bluetooth devices when an adapter is powered on. This package does not constantly probe devices as that would have a huge impact on power consumption. It is generally up to each device to announce itself when it is powered on.

If you want or need a continuous probe functionality, you could create a cron or systemd timer to run either bluetooth-autoconnect for all devices, or just bluetoothctl connect <device_mac> for a specific device, but repeatedly attempting to connect will do little good if your device isn't responding to connection attempts. Behind the scenes, all this script is really doing is running bluetoothctl connect <device_mac> for each device that is paired and trusted, so if running that command manually doesn't work, there's little this script can do to help.

In the case of my bluetooth mouse, it goes to sleep immediately after being disconnected and won't respond to connection attempts, but it wakes up, announces itself, and connects automatically after simply moving it. If I wake it up before my system boots, then bluetooth-autoconnect triggers the connection attempt instead.

@gitthangbaby
You can enable the pulseaudio helper service with systemctl --user enable pulseaudio-bluetooth-autoconnect so you don't have to start it manually every boot. That service is a simple one-shot service that runs bluetooth-autoconnect which in turn, really just runs bluetoothctl connect <device_mac> for each device that is trusted and paired. If your device keeps disconnecting and you have to keep reconnecting repeatedly, then that has nothing to do with this script and you will need to troubleshoot your bluetooth / bluez configuration.

For example, my headset doesn't work correctly if Bluez is operating in LE (Low-Energy) mode so I have ControllerMode = bredr set in my /etc/bluetooth/main.conf to prevent this. Perhaps that may work for you, but it is beyond the scope of what I can support here.

This package has no influence or control over what audio output devices your system uses. That is between you and pulseaudio.

from bluetooth-autoconnect.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.