Results 1 to 5 of 5

Thread: Bluetooth USB dongle - not functioning correctly in Ubuntu 22.04

  1. #1
    Join Date
    Jan 2024
    Beans
    4

    Bluetooth USB dongle - not functioning correctly in Ubuntu 22.04

    I recently built a new PC and installed Ubuntu 22.04 (dual-booted with Windows 11). My motherboard does not have in-built bluetooth. I purchased a bluetooth USB dongle. It generally works very well. However, whenever I reboot my machine, I always have to disable and re-enable bluetooth through the desktop GUI (settings) in order for it to work properly. Once I do this, it works great. If I don't do this, it isn't the case that it doesn't work exactly, but it appears extremely sluggish in its scan for nearby devices. Barely any are picked up, and there is barely any output to see in bluetoothctl. Something just isn't right. As soon as I disable/re-enable, as described, a flood of devices are discovered and there is a healthy stream of output in bluetoothctl. If left idle for a while, the scan sometimes needs to be resuscitated again using the same enable/disable trick.

    The packages I installed before using the dongle were:

    bluez
    bluez-tools
    pulseaudio
    pulseaudio-module-bluetooth
    pavucontrol

    I was hoping to be able to mimic the behaviour completely in the terminal (bluetoothctl), but I can only get it to work probably through disabling/re-enabling in settings. Which begs the question, what this is doing exactly. My hunch is that it involves an rfkill block/unblock, but I can't be sure and I didn't find the journalctl output too helpful here.

    Just after some pointers or similar experience really. It's not a massive deal, but I'd like to get to the bottom of it.

    The tests I've done so far are:
    1) Connecting my phone to my PC and playing music from my phone through my headphones which are wired to the PC.
    2) Connecting my PC to a bluetooth speaker and playing music through them from the PC.
    3) Connecting to a raspberry-pi which controls an LED sports-scoreboard.

    This all works fine.
    Last edited by hal9000cta; January 17th, 2024 at 09:27 PM. Reason: More informative subject

  2. #2
    Join Date
    Jan 2024
    Beans
    4

    Re: Bluetooth USB dongle - not functioning correctly in Ubuntu 22.04

    The issue could be related to the power management of the USB port. The disable/re-enable 'trick' in settings is probably a red-herring. The 'trick' to getting it to work can also be effected by simply unplugging and re-inserting the dongle.

    The behaviour I'm seeing on start-up, of tardy performance, could be explained by an insufficiency of power to the USB port (the dongle has been placed in a low-power state). When you disable/re-enable in settings, I suspect the underlying hardware is being power-cycled (switched off and on). When it is left idle for a while I suspect the device is being placed back into a low power state.

    USB autosuspend (which manages this process of power switching between low-power states and normal power states) can be suspended as follows:

    Code:
    sudo nano /etc/default/grub
    Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and add usbcore.autosuspend=-1 to the options. Save the file and run:

    Code:
    sudo update-grub
    And then reboot.

    Interestingly, simply doing bluetoothctl power on/off does not cut it.

    This is obviously not a fix, but it could explain what is going on.
    Last edited by hal9000cta; January 17th, 2024 at 09:28 PM. Reason: More informative subject

  3. #3
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,610
    Distro
    Ubuntu

    Re: Bluetooth USB dongle - not functioning correctly in Ubuntu 22.04

    What's the dongle?
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  4. #4
    Join Date
    Jan 2024
    Beans
    4

    Re: Bluetooth USB dongle - not functioning correctly in Ubuntu 22.04


  5. #5
    Join Date
    Jan 2024
    Beans
    4

    Re: Bluetooth USB dongle - not functioning correctly in Ubuntu 22.04

    Also this one:

    https://www.amazon.co.uk/TP-Link-Blu...ps%2C96&sr=8-2

    But they use the same driver (rtl8761bu_fw.bin) so not too surprising.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •