So, my bluetooth mouse disconnects when Iceweasel loads YouTube… The reason this is such an issue is that the mouse also refuses to reconnect automatically. (my StackExchange post on this here)

There is obviously some other process creating the disconnect coincidence though, but it works every time I do the following:

1. Connect BT mouse
2. Open Iceweasel
3. Without using the mouse (it is not moving from this point) open a new tab and go to
4. As soon as loaded, try using the mouse and it will be disconnected

Of course the mouse also disconnects at other points but it was uncanny how the above also forces a disconnect. I added it in case someone knows of some connection that could help solve the problem.

I have of course tried a number of other fixes… I even have a script I have set up to reconnect the mouse when it disconnects (as it will not reconnect using the Gnome-Settings bluetooth window).

Finding one of the similar issues online here I did set the timeout to 0 which did in fact work the best of all the solutions so far. I was able to leave the mouse alone and come back and it will still be connected but after following the steps above it would still disconnect and then go back to the timeout disconnect until restarting the bluetooth service again.

Every disconnect is visible in my logs as:

bluetoothd[19123]: g_attrib_unregister: invalid id

but it is very often after one of the following:

dleyna-server-service[20572]: dLeyna: Exit

or while I was using Iceweasel (I’ve moved to Chrome for the time being):

iceweasel.desktop[19712]: Custom widget with id loop-button does not return a valid node

Going back to the inability to reconnect, after the mouse disconnects (it’s the Razer Orochi if that makes a difference) I cannot just reconnect even if I try force it in the normal GUI based bluetooth settings. I found out the only way it reconnects is through bluetoothctl. While in the bluetoothctl prompt a simple reconnect works but after many variations, the below seems to be the only script that will work in the same way:

    echo 'power on\npair D1:A8:11:CC:DB:9A' | bluetoothctl
    sleep 1
    echo 'trust D1:A8:11:CC:DB:9A' | bluetoothctl
    sleep 1
    echo 'connect D1:A8:11:CC:DB:9A' | bluetoothctl

So yes, that’s my predicament… I’m hoping someone might see something here that will lead to the solution and I will update here when I do end up sorting this out. Of course my mouse is pretty awesome so in the mean time I can just connect the cable and bypass the issue completely, but still, problems need solutions so this puzzle must be solved!