Announcement

Collapse
No announcement yet.

Bluetooth headset keeps randomly disconnecting

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [RESOLVED] Bluetooth headset keeps randomly disconnecting

    Hello,

    I just moved over to Kubuntu from windows. I'm a fairly new linux user. Everything seems to work well, except my bluetooth headphones. I can connect them, and for a while they work perfectly until they periodically go silent. Then they disconnect and reconnect.

    I've googled the issue, but found nothing that really matches my problem.

    Here is the output from:
    cat /var/log/syslog | grep -i blue

    Code:
    bluetoothd[1142]: profiles/audio/avdtp.c:handle_unanswered_req() No reply to Suspend request
    kernel: [  624.412765] Bluetooth: hci0: Invalid exception type 04
    plasmashell[2108]: org.kde.plasma.pulseaudio: No object for name "bluez_output.88_08_94_01_F4_E9.1"
    wireplumber[1770]: Failed to release transport /org/bluez/hci0/dev_88_08_94_01_F4_E9/fd0: Input/output error
    bluetoothd[1142]: src/profile.c:ext_io_disconnected() Unable to get io data for Hands-Free Voice gateway: getpeername: Transport endpoint is not connected (107)
    bluetoothd[1142]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 88:08:94:01:F4:E9: Host is down (112)
    kernel: [  631.220828] Bluetooth: hci0: Invalid exception type 03
    bluetoothd[1142]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 88:08:94:01:F4:E9: Host is down (112)
    kernel: [  638.220889] Bluetooth: hci0: Invalid exception type 03
    kernel: [  647.336755] Bluetooth: hci0: Invalid exception type 03
    kernel: [  661.340665] Bluetooth: hci0: Invalid exception type 03
    kernel: [  662.120664] Bluetooth: hci0: Invalid exception type 03
    bluetoothd[1142]: message repeated 2 times: [ profiles/audio/avdtp.c:avdtp_connect_cb() connect to 88:08:94:01:F4:E9: Host is down (112)]
    bluetoothd[1142]: plugins/policy.c:reconnect_timeout() Reconnecting services failed: Operation already in progress (114)​


    and here is the output of:
    dmesg | grep -i blue

    Code:
    Bluetooth: hci0: Invalid exception type 04
    Bluetooth: hci0: Invalid exception type 03
    Bluetooth: hci0: Invalid exception type 03
    Bluetooth: hci0: Invalid exception type 03
    Bluetooth: hci0: Invalid exception type 03
    Bluetooth: hci0: Invalid exception type 03​

    I know what some of these words mean!! Are they any other commands I can run to get any more idea of whats going on?

    Thanks,
    -P

    #2
    Could be a driver/hardware related issue.
    If you Bt is internal use the lspci command to find hardware info and IDs, it likely will be your WiFi card
    If it is a USB dongle, then lsusb will show this info.

    The Bt driver's Power saving may be causing issues as well. I can't find a recent a reliable how-to just yet.

    Comment


      #3
      Originally posted by claydoh View Post
      Could be a driver/hardware related issue.
      If you Bt is internal use the lspci command to find hardware info and IDs, it likely will be your WiFi card
      If it is a USB dongle, then lsusb will show this info.

      The Bt driver's Power saving may be causing issues as well. I can't find a recent a reliable how-to just yet.
      I appreciate the help.

      The adapter is internal (laptop).

      lspci does not return a line for bluetooth, but if I grep for "wifi" is as follows:

      Code:
      00:14.3 Network controller: Intel Corporation Comet Lake PCH CNVi WiFi
      I did find a post in my searches that mentioned power saving but it was older and didn't elaborate. I wouldn't begin to have a clue how to change that, but its a lead. I'll see if I can look into it. Any further help is always appreciated.

      Comment


        #4
        Welcome.

        Originally posted by claydoh View Post
        […]
        The Bt driver's Power saving may be causing issues as well. I can't find a recent a reliable how-to just yet.
        In that case you can test it and hopefully also find this out with powertop (a tool you can use in the Konsole terminal emulator).
        Then you can write e.g. a shell script or set a CRON job etc. to execute the appropriate commands (that you have found out with powertop) automatically at every log-in.

        To disable the automatic Bluetooth power saving It might look similar to this (copied from my MacBook Pro):
        echo 'on' > '/sys/bus/usb/devices/2-1.8.1.3/power/control'
        Last edited by Schwarzer Kater; Nov 09, 2023, 06:18 PM. Reason: typos
        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

        Comment


          #5
          Would the power saving feature be specific to bluetooth, or would it knock out the entire adapter? As far as I can tell, when it goes down, the WiFi connection is not interrupted.

          Comment


            #6
            Originally posted by pwlinwin View Post
            Would the power saving feature be specific to bluetooth, or would it knock out the entire adapter? As far as I can tell, when it goes down, the WiFi connection is not interrupted.
            yes, it would be specific to bluetooth, though doing the Black Kitten shows *may* affect wifi.
            There are different ways to handle that. I have had this sort of thing in the past, but can't find out what I used to disable it in the bluetooth configuration itself, but can find it later, after work. I hope, lol. Or link to reliable and current information.

            Though Intel wiif/Bt is usually pretty robust, specific chips may have their own unique bugs or issues, as well.
            I had one HP desktop where Secure Boot mucked with Bluetooth like this, too, but that was not Intel. The real head scratcher was why I had left Secure Boot enabled to begin with

            Comment


              #7
              Originally posted by Schwarzer Kater View Post
              echo 'on' > '/sys/bus/usb/devices/2-1.8.1.3/power/control'
              Dumb newb question here, but how do I go about finding the ID that corresponds with my bluetooth adapter?

              Comment


                #8
                Try the more simple things first:

                /etc/bluetooth/main.conf and /etc/bluetooth/main.conf are starting points


                Some options to try,:
                Increase the IdleTimeout in /etc/bluetooth/input.conf or set it to 0 to disable it.

                Set FastConnectable to true in /etc/bluetooth/main.conf to allow devices to reconnect faster at the trade off of increased power consumption.

                To try turning off bluetooth auto-suspend, create a file /etc/modprobe.d/btusb.conf Add this to it: options btusb enable_autosuspend=0​
                Don't let the "usb' in the driver module name confuse you. Even on m.2 wifi cards, the Bluetooth portion is still using USB.

                A can't remember what worked for me, but I am sure it was one of the above, probably the last one.



                if you are using a laptop, and have installed TLP or something to help battery life, this can do things like you are seeing as well.

                Last edited by claydoh; Nov 09, 2023, 11:41 PM. Reason: typoooooo

                Comment


                  #9
                  Originally posted by claydoh View Post
                  To try turning off bluetooth auto-suspend, create a file /etc/modprobe/btusb.conf Add this to it: options btusb enable_autosuspend=0​
                  Don't let the "usb' in the driver module name confuse you. Even on m.2 wifi cards, the Bluetooth portion is still using USB.

                  I don't seem to have a /etc/modprobe/ directory. I do have a /etc/modprobe.d/

                  Should I place btusb.conf in /etc/modprobe.d, or create a /etc/modprobe directory?

                  Comment


                    #10
                    Originally posted by pwlinwin View Post
                    Should I place btusb.conf in /etc/modprobe.d,
                    Yeah, sorry for the typo

                    After editing the bluetooth configs, you do have to restart it or reboot. Have you tried the first 2 things, yet?

                    Comment


                      #11
                      Originally posted by claydoh View Post
                      Try the more simple things first[…]
                      And then:

                      Originally posted by pwlinwin View Post
                      Dumb newb question here, but how do I go about finding the ID that corresponds with my bluetooth adapter?
                      There are no dumb questions. I have Linux questions every day.

                      The output of the powertop tool will show the ID.
                      Sometimes you will have to experiment a bit with powertop - but the changes you make with it are only valid for the current session (and reversible with powertop at once, like a switch). And after logging out or restarting the values are back to default, therefore you would have to apply them at log-in, e.g. by a CRON job.
                      Last edited by Schwarzer Kater; Nov 10, 2023, 02:31 AM.
                      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                      Comment


                        #12
                        Originally posted by claydoh View Post
                        Yeah, sorry for the typo

                        After editing the bluetooth configs, you do have to restart it or reboot. Have you tried the first 2 things, yet?
                        Yes. The first two things did not resolve the issue. I did reboot after making the changes.

                        I'll try the btusb.conf thing when I get home this afternoon.

                        Thanks for the continued support.

                        Comment


                          #13
                          Originally posted by claydoh View Post
                          To try turning off bluetooth auto-suspend, create a file /etc/modprobe.d/btusb.conf Add this to it: options btusb enable_autosuspend=0​
                          Its still early, but its looking like this fixed it. Before, my bluetooth headset was disconnecting almost every 10-15 minutes. I made the change yesterday afternoon. Since then, I've watched a two hour movie using my bluetooth headset then listened to another couple hours of music, without any disconnection. I'll check back in a few days and if the problem hasn't reappeared we can mark this resolved.

                          Many thanks for the help.

                          Comment


                            #14
                            Sadly, this evening, the problem came back. I'm not sure why some days it works perfectly, then others its problematic.

                            Comment


                              #15
                              Yes. Can confirm its still a problem. The outputs from /var/log/syslog and dmesg are same as before. The changes suggested above are still in place.

                              Comment

                              Working...
                              X