Announcement

Collapse
No announcement yet.

Bluetooth Dongle

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Bluetooth Dongle

    I have Kubuntu installed on an Intel NUC which unfortunately has relatively poor bluetooth connection. To remedy this I bought a bluetooth dongle in the hopes I would disable the onboard bluetooth on the NUC and use the dongle as my dedicated bluetooth access point. The issue is though is that it seems to go to "sleep". I have listed x cases below that describes what I mean by comparison with how the onboard bluetooth on the NUC behaves with my devices.
    1. On startup I cannot connect to the dongle but I can connect to the NUC. Neither is automatic, however, if I press a key on my bluetooth keyboard it will immediately connect to the NUC but it will not do the same thing with the dongle. The only solution I have is to unplug and replug the dongle while my keyboard is on, after which, as soon as the dongle is replugged in, the keyboard will connect.
    2. Following on from 1. I cannot pair devices with the dongle unless it is recently plugged in. Likewise, if my keyboard is connected and I change its bluetooth channel or turn it off then on (for example if I put the system to sleep and then return) it cannot reconnect to the dongle unless I again unplug and replug it back in.
    The only thing that comes to mind with this behaviour is that possible the dongle is being placed on minimal power consumption by the system? I am not sure how to configure this though. Does anyone have any suggestions?

    Thanks.

    #2
    Remove or disable the onboard Bt if possible (bios setting?) They may be competing.

    Could the NUC's poor Bt be an antenna issue? Usually (but not always) intel Bt is quite superior to a USB dongle, which have a wide range in quality of the chipsets used in them (never Intel)
    With the dongle plugged in, run the lsusb command, which will show both Bt devices and hardware IDs. This can be used to investigate any hardware-specific linux infos.
    Last edited by claydoh; Jul 03, 2023, 07:08 AM.

    Comment


      #3
      If you suspect issues due to energy saving settings, you could try powertop (a nice little CLI tool for this purpose) in Konsole to check the behaviour of your computer's different components.
      I mostly use it on laptops.

      Konsole
      sudo apt install powertop

      To start the tool in Konsole
      sudo powertop

      It is quite self-explanatory and lets you change settings on the fly for the current session to try out things.
      If you can solve your problem this way, you will have to make the settings permanent in config- or startup-files.


      PS: I suggest running lsusb -vt or lsusb -vvt - this will give you a much more informative output than plain lsusb.
      Last edited by Schwarzer Kater; Jul 03, 2023, 07:27 AM. Reason: added PS
      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


        #4
        Originally posted by mowzeh View Post
        ... NUC which unfortunately has relatively poor bluetooth connection...
        I don't understand that; so bad it can't work with a keyboard?

        I have a couple of possibly relevant points:
        • For security reasons, some relatively recent bluetooth standard only allows some devices to be set up with one bluetooth pairing at a time. Note that's not a hardware thing. I have a Logitech mouse that if it's paired to the main install on my work laptop it has to be paired again when I boot the same laptop to another install (both Kubuntu 23.04; why would I do that, you might ask...).
        • How old is the installation on the NUC? On that same laptop bluetooth audio is unusable using the install upgraded from 22.04, but a new install of 23.04 the audio is good. I suspect the problem is a consequence of the transition from pulseaudio to pipewire, so is not relevant you, but it might be.
        Regards, John Little

        Comment


          #5
          To address the questions regarding connection, from my research into the matter it seems that because the NUC is so small and has a metal chassis it makes for a bad scenario with radio signals. My keyboard and earphones connect to it just fine however the connection isn't so great and unpredictable. For instance I could be working and all of a sudden my keystrokes will lag and suddenly get repeated x times. With my earphones the quality can suddenly become extremely poor. The common recommendation is to disable the NUC BT, run a short usb extension and plug in a dongle as I have done. The NUC installation was some time in Q4 2022.

          Regarding the suggestion of powertop I will see what I can get out of this.

          Comment


            #6
            Ok, so tinkering with powertop has provided me a solution. The default control for the dongle is auto which is the problem. If I set it to on then the dongle works as intended. Can I manually alter the control file to keep this setting?

            EDIT: Ironically the USB autosuspend setting in TLP does not work here. Is there any way to configure control with TLP?

            Comment


              #7
              Originally posted by mowzeh View Post
              […] The default control for the dongle is auto which is the problem. If I set it to on then the dongle works as intended. Can I manually alter the control file to keep this setting?
              […]
              When you toggle the setting in powertop it should be displayed what is issued, in your case it should be a command similar to
              echo 'on' > '/sys/bus/usb/devices/2-1.8.1.3/power/control'.

              You will have to execute this command every time the system has booted and there are many ways to do this:
              • write a systemd unit file
              • set up a cron job (there is e.g. a Plasma System Settings module for this to do it in the GUI -> sudo apt install kde-config-cron)
              • write a start script and automatically run it at login in one of several different possible ways
              Last edited by Schwarzer Kater; Jul 03, 2023, 09:17 PM.
              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


                #8
                This issue is now effectively solved. I do have one additional question regarding powertop. The above fix only works if powertop remains installed. I am under the impression that powertop is pretty much a diagnostic/analysis tool. As suggested above, I have implemented the fix by a systemd unit file, so regardless of whether powertop is installed or not the control value for the dongle is always set to on. Why do I additionally require powertop to be installed for this to work?

                Comment


                  #9
                  You don't require powertop itself for this - as you said: this only is a nice little tool.

                  So how exactly did you solve the issue?
                  Could you post the whole command you use to set the value to "on"?
                  Also paste your systemd unit file within CODE tags, please.
                  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


                    #10
                    Sorry, disregard my last post. I hadn't implemented my systemd unit file properly. For full disclosure I use the following on /etc/rc.local.

                    Code:
                    !#/bin/bash
                    echo 'on' > '/sys/bus/usb/drivers/3-2/power/control'
                    exit 0
                    I also had to give this file the appropriate permissions so I ran sudo chmod u+x /etc/rc.local. All is well now.

                    Comment


                      #11
                      Glad to hear that.
                      And thanks for posting it nonetheless.

                      PS: I have to add that /etc/rc.local has been obsolete since 1983 AFAIK…
                      Good that it works for you, but a systemd unit file or a cron job would be more up-to-date.
                      Last edited by Schwarzer Kater; Jul 04, 2023, 03:40 PM. Reason: added PS
                      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

                      Working...
                      X