Pairing mouse Bluetooth

Hi, I have a Manjaro/LMDE dual boot, both running Cinnamon. Every time I change operating systems, I have to re-pair my Bluetooth mouse. Is there a solution that allows me to have the mouse recognized only once on each operating system?

I think I read about a similar problem for having a bluetooth device registred on a Windows / Linux dual boot. It is possible you can apply something similar using this page → Bluetooth - ArchWiki

just an idea - which I can’t test (don’t have a BT mouse):

ls -hl /var/lib/bluetooth

this is a directory, named after the MAC of your BT card

Inside that directory are again directories, this time the name represents the MAC of a device - one of which is your mouse.

I’d try to copy the one referring to your mouse and transfer it to the same place in the other OS.
Or just edit one to be the same as the other.

Compare the two, the files inside that directory - they might be identical, or they might be different,
the [LinkKey] in the “info” file might be different …

1 Like

I did what Nachlese said, but nothing changed. How do I restart all Manjaro Bluetooth services? I think I should do this on Mint, too.

systemctl daemon-reload

It was an idea.
Seemed logical to me … :grimacing:

Was there a difference between the files from Manjaro vs Mint?

systemctl restart bluetooth.service
is what I sometimes use when my headphone acts up
It’s the same on both Manjaro and Mint - both use systemd …

There were differences between the files, I made them the same on both systems.

1 Like

Now you must perform a daemon-reload (as explained above), and then a restart of bluetooth.service.

I would have been interested in knowing what the differences where. :wink:
Just the LinkKey ?
Or more?
Or not even that?

… as I said - it was my idea, based upon what I think how this works …
it was a guess … to solve a problem which I never had and cannot replicate here …

This is the contents of the Manjaro “info” file:

[General]
Name=HP 240/245 Bluetooth Mouse
Appearance=0x03c2
AddressType=static
SupportedTechnologies=LE;
Trusted=false
Blocked=false
CablePairing=false
WakeAllowed=true
Services=00001800-0000-1000-8000-00805f9b34fb;0000180a-0000-1000-8000-00805f9b34fb;0000180f-0000-1000-8000-00805f9b34fb;00001812-0000-1000-8000-00805f9b34fb;0000fe59-0000-1000-8000-00805f9b34fb;6e40ff01-b5a3-f393-e0a9-e50e24dcca9e;

[IdentityResolvingKey]
Key=552797AAD902913586E8B3BED4E6503E

[PeripheralLongTermKey]
Key=1C68A8B8AF3E619F5A58644B582D1FF9
Authenticated=2
EncSize=16
EDiv=0
Rand=0

[SlaveLongTermKey]
Key=1C68A8B8AF3E619F5A58644B582D1FF9
Authenticated=2
EncSize=16
EDiv=0
Rand=0

[ConnectionParameters]
MinInterval=6
MaxInterval=7
Latency=133
Timeout=330

[DeviceID]
Source=2
Vendor=1008
Product=35658
Version=256

And this is the contents of the LMDE “info” file:

[General]
Name=HP 240/245 Bluetooth Mouse
Appearance=0x03c2
AddressType=static
SupportedTechnologies=LE;
Trusted=false
Blocked=false
WakeAllowed=true
Services=00001800-0000-1000-8000-00805f9b34fb;0000180a-0000-1000-8000-00805f9b34fb;0000180f-0000-1000-8000-00805f9b34fb;00001812-0000-1000-8000-00805f9b34fb;0000fe59-0000-1000-8000-00805f9b34fb;6e40ff01-b5a3-f393-e0a9-e50e24dcca9e;

[IdentityResolvingKey]
Key=552797AAD902913588E8B3BED4E6503E

[PeripheralLongTermKey]
Key=574C6A7C1F94717D84149B5D7A4532BE
Authenticated=2
EncSize=16
EDiv=0
Rand=0

[SlaveLongTermKey]
Key=574C6A7C1F94717D84149B5D7A4532BE
Authenticated=2
EncSize=16
EDiv=0
Rand=0

[ConnectionParameters]
MinInterval=6
MaxInterval=7
Latency=133
Timeout=330

[DeviceID]
Source=2
Vendor=1008
Product=35658
Version=256

Mod Edit: Changed “quote” formatting to code-fence (three backticks: ``` above and below pasted text) and tidied the output. :wink:

As mentioned above - the instructions for dual-boot pairing is on the Arch Wiki

In /var/lib/bluetooth/ I placed the folder A0:D3:7A:8A:76:08 on both systems, and inside this folder is the Bluetooth mouse configuration folder, which is identical on both systems. But when I reboot and run the indicated commands to restart the Bluetooth services, a new folder with the Bluetooth mouse configuration is created on each system, with a different name and content than the one I just added. Am I doing everything in the wrong order?

… but they are NOT identical -
the two files contents which you posted above are not identical

These values:

[IdentityResolvingKey]
and
[PeripheralLongTermKey]
and
[SlaveLongTermKey]

are different between the files

which to me looks like the reason why the mouse has to be paired again and again, every time you switch between the two Operating Systems.

Make them the same - use either one as the “original”.
Which one should not matter.



ps:
or just buy a wireless mouse - a device with a small USB-adapter thingy

they are good and cheap as well
My current one was less than € 10,-
a real good one can be had for ~ € 20,-

Downside is: you’ll have one USB port used up

I did have a BT mouse in the past - it was a pain, because it went to sleep after a certain time and needed some time to wake up and reconnect, causing a second or two to pass by until I could move the cursor.
And when the power saving feature was turned off, so it would be more responsive, the battery wouldn’t last very long.

My wireless mouse can go half a year on one battery …

1 Like