If you are here, you probably already know the issue.
When you pair your devices with an operating system (OS), a unique "link key" is generated and stored on both the devices and the OS. The catch is that both Windows and Linux see your laptop's internal Bluetooth adapter as the same hardware, and thus, the same MAC address. When you switch OSes and reconnect, the new OS generates a different link key, which overwrites the previous one on your devices. This invalidates the pairing for the other OS, forcing you to "forget" and re-pair.
- OS: Manjaro 25 and Windows 11
- Device: Lenovo Legion 5 Pro i
This is the simplest solution that worked for me. It did not require installing extraordinary packages. I will not guarantee that this will work for you. The most effective way to deal with this is to make both Windows and Linux use the same Bluetooth pairing key for your devices. This involves:
- Pairing your device with one OS.
- Extracting the pairing key from that OS.
- Importing that key into the other OS.
Steps (I found importing keys from Windows to Linux is easier):
- In Linux
- Pair your device with Linux
- That's it. The pairing will come in handy later. Remember, do not try to forget and re-pair later when you reboot to Linux in step 3.
- In Windows
- Pair your device with Windows.
- Find your Bluetooth Adapter's MAC Address: In Windows, open Command Prompt (Admin) and type
getmac /V /FO LIST
. Look for your Bluetooth adapter's MAC address (it's usually listed with "Bluetooth Device" or similar). Note this down. - Find your Devices' MAC Address: In Windows, go to "Settings" > "Bluetooth & devices" > "Devices". Find your device, click on them, and look for their MAC address. Note this down.
- Install PsExec on Windows. This tool allows you to run
regedit
with SYSTEM privileges, which is necessary to access the Bluetooth keys. Put this file inC://windows/system32
. - Open Command Prompt as Administrator.
- Run
psexec -s -i regedit.exe
. This will open the Registry Editor with SYSTEM privileges. - Navigate to the Bluetooth keys in the Registry Editor:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\
Under this key, you'll see folders named after the MAC addresses of your Bluetooth adapters. Find the one corresponding to your laptop's internal Bluetooth adapter. - Find your Bluetooth Adapter's Key: Under
Keys
, you should see a subkey named after your Bluetooth adapter's MAC address (the one you noted earlier, without colons, e.g.,AA11BB22CC33
). - Find your Devices' Link Key: Inside your Bluetooth adapter's key, you'll find entries for paired devices. Look for an entry whose name corresponds to your devices' MAC address (again, without colons, e.g.,
112233445566
). The "Value Data" of this entry is the link key. Copy this hexadecimal value. Copying is hard. I just typed it out character by character. It will be a long string of numbers and letters.
- In Linux Again
- Find your Bluetooth Adapter's MAC Address in Linux: Open a terminal and run
bluetoothctl
. Then typelist
. You'll see your Bluetooth adapter's MAC address. Note it down. In Manjaro, I installed this usingyay install bluez-utils
- Find your Devices' MAC Address in Linux: In
bluetoothctl
, typedevices
. You'll see a list of paired devices with their MAC addresses. Note your devices' MAC address. - Navigate to the Bluetooth configuration directory: Open a terminal.
- Navigate to
/var/lib/bluetooth/
. - You'll find a directory named after your Bluetooth adapter's MAC address (e.g.,
AA:11:BB:22:CC:33
).cd
into that directory. - Inside, you'll find a directory named after your devices' MAC address (e.g.,
11:22:33:44:55:66
).cd
into that directory.
- Navigate to
- Edit the
info
file: Open theinfo
file in your favorite text editor withsudo
permissions.- Look for a section like
[LinkKey]
and a line likeKey=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
. - Replace
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
with the link key you copied from Windows. Ensure there are no spaces. The format of the key in Linux might be reversed or slightly different in terms of capitalization compared to Windows, so be careful to match the length and content exactly. In my case, the spaces needed to be removed and every alphabetical letter needed to be capitalized.
- Look for a section like
- Restart the Bluetooth service:
sudo systemctl restart bluetooth
- Find your Bluetooth Adapter's MAC Address in Linux: Open a terminal and run
- Check if it worked for you.
Thanks!