To sync the Bluetooth pairing keys between Linux and Microsoft Windows 10/11 on a dual boot computer, so that every Bluetooth device works on Linux just as well as on Microsoft Windows, without having to (re)pair it on every reboot:

  1. Pair the Bluetooth devices in Microsoft Windows.
  2. Then, in Linux, pair the Low Energy devices last, but first all other ones:

Non Low-Energy devices

  • For non-Low-Energy devices, use bt-dualboot, that exports the pairing keys to Microsoft Windows from Linux as follows:

    1. Install chntpw by your package manager, say sudo zypper install chntpw on Opensuse.
    2. install bt-dualboot by sudo pip install git+https://github.com/Simon128/bt-dualboot
    3. Pair the Bluetooth devices on Linux.
    4. run lsblk to find out your Microsoft Windows partition, say /dev/sdb1, and mount it by sudo mount /dev/sdb1 /mnt.
    5. run it by sudo bt-dualboot --backup --sync-all to export the pairing keys from Linux’s /var/lib/bluetooth folder into the Microsoft Windows registry.

Low-Energy devices

  • for newer Low Energy devices, such as Microsoft Designer Mouse and Keyboard, use this script that imports the pairing keys from Microsoft Windows to Linux, as follows:

    1. Install chntpw by your package manager, say sudo zypper install chntpw on Opensuse.
    2. Download the script as export-ble-infos.py into, say, ~/bin.
    3. Run lsblk to find out your Microsoft Windows partition, say /dev/sdb1, and mount it by sudo mount /dev/sdb1 /mnt.
    4. run

       $ cd ~/bin
       $ chmod a+x ./export-ble-infos.py
       $ ./export-ble-infos.py
       $ sudo bash -c 'cp -r ./bluetooth /var/lib && systemctl restart bluetooth'
       $ rm -r bluetooth
      

    to import all Bluetooth Low Energy devices from the Microsoft Windows registry into Linux’s /var/lib/bluetooth folder.

Manually

If you need to export your Bluetooth keys from a Windows Virtual machine to Linux, then manual effort seems called for. To export the Bluetooth key from the Windows registry, either add your user to those having access permissions to its folder or download psexec to start regedit by psexec -s -i regedit.exe for additional access rights.