Published on

Dual Boot Bluetooth Pairing Issue: Why It Happens and How to Fix It

Authors
Dual booth bluetooth

Dual Boot Bluetooth Pairing Issue: Why It Happens and How to Fix It

If you dual-boot Windows and Linux, you may have noticed an annoying problem: every time you switch operating systems, your Bluetooth devices (like headphones, keyboards, or mice) often refuse to connect unless you remove them and pair them again. This blog post explains why this happens and how you can resolve it—permanently—using the open-source tool bt-dualboot.


The Issue: Why Do Bluetooth Devices Need Re-Pairing on Dual Boot?

When you pair a Bluetooth device with your computer, both the device and your OS generate and store a unique pairing key linked to your computer's Bluetooth adapter MAC address. If you dual-boot, both Windows and Linux use the same Bluetooth adapter (and thus the same MAC address), but each OS generates its own pairing key and stores it separately.

Bluetooth devices can only remember one pairing key per host MAC address. So, if you pair your device in Windows, then boot into Linux and pair again, the device's old key is overwritten. The next time you switch back to Windows, the keys no longer match, and you're forced to re-pair. This cycle repeats every time you switch OSes, making for a frustrating user experience.


The Solution: Syncing Bluetooth Pairing Keys

The root of the problem is that the pairing keys are not shared between operating systems. The solution is to synchronize these keys so both Windows and Linux use the same ones. This way, your Bluetooth device sees no difference when you switch OSes, and you won't have to re-pair every time.

There are manual ways to do this—by extracting keys from the Windows registry and copying them into Linux's Bluetooth configuration files, or vice versa—but this process is technical, error-prone, and tedious. Fortunately, there's an easier, automated way.


A User-Friendly Fix: bt-dualboot

bt-dualboot is a user-friendly tool that automates the process of syncing Bluetooth pairing keys between Windows and Linux. It's recommended in the Arch Wiki Bluetooth guide and works with most modern Linux distributions and Windows 10 or later.

Key Features:

  • No need to reboot multiple times or run complicated scripts
  • Minimal user input required
  • Automatically detects your Windows partition
  • Backs up the Windows registry before making changes
  • CLI tool with clear commands and options

How to Use bt-dualboot:

  1. Pair your Bluetooth devices in both Windows and Linux.

  2. Boot into Linux and mount your Windows partition with write access.

  3. Install bt-dualboot:

    For Debian/Ubuntu-based distributions:

    sudo pip install bt-dualboot
    

    You'll also need the chntpw package:

    sudo apt install chntpw
    

    For Arch Linux users:

    sudo pacman -S bt-dualboot
    
  4. Sync your Bluetooth devices:

    To list all available devices:

    sudo bt-dualboot -l
    

    This will show all paired Bluetooth devices with their MAC addresses.

    Example output:

    Works both in Linux and Windows
    ===============================
     [A4:BF:C6:D0:E5:FF] WH-1000XM5
    
    Needs sync
    ==========
    
    Following devices available for sync with `--sync-all` or `--sync MAC` options.
    
     [C2:9E:1D:E2:3D:A5] Keyboard K380
    
    Have to be paired in Windows
    ============================
    
    Following devices unavailable for sync unless you boot Windows and pair them
    
     [E9:1D:FE:2A:C3:C8] JBL GO
    

    To sync all available devices:

    sudo bt-dualboot --sync-all -b
    

    The -b flag ensures a backup of your Windows registry is created before making changes.

    To sync a specific device by its MAC address:

    sudo bt-dualboot --sync C2:9E:1D:E2:3D:A5 -b
    

    Replace C2:9E:1D:E2:3D:A5 with your device's MAC address.

After syncing, your Bluetooth devices should work seamlessly on both Windows and Linux—no more re-pairing every time you switch OSes.