I have a nice little bluetooth mouse, but there is one problem. When it is not used for awhile (I primarily use keyboard) it turns off. Fine, so I have to turn it back on by pushing the button. But when I do I find that it does not get recognized by Ubuntu again until I click "connect" for that device specifically under the bluetooth-applet. I have a bluetooth touchpad+keyboard combo that I use with another Ubuntu computer that des not have this issue. Is there any reason mwhy this might be the case? It's very annoying.
Bluetooth settings are controlled from configuration files in
/etc/bluetooth. For input devices we can define a timeout before a connection will be disconnected. To disable this open
/etc/bluetooth/input.conf as root in an editor and either comment out the following line by adding
# (as it is done in the example below), or set timeout value to
Other timeouts that can be set in
/etc/bluetooth/main.conf may not be affected in your case as they only play a role when a service may be interrupted (e.g. by bad signal strength) and will not be reconnected in case a timeout is set here. Default values for timeouts in
DiscoverableTimeout = 0 PairableTimeout = 0 PageTimeout = 8192
I appear to have solved my problem, and perhaps yours as well. After going through troubleshooting steps, here's I what have working now:
- I commented out
/etc/bluetooth/main.conf-- not set to
0, but commented it out completely. Not sure if this matters, but I'm keeping it that way for now. I don't want
AutoConnectTimeoutto time out.
- I set my
240minutes, this is a computer dedicated to watching movies, so can't hurt.
- I set
I was really wracking my brain on this, fearing I would ultimately have to write an F-ing script to ping my mouse via Bluetooth. However, after trying out different combinations of settings in the
main.conf files. My eyes rested on the
RememberPowered option in
main.conf. It was set to
true. Wait, I want my computer to remember that my mouse was powered off? I don't want my computer to remember any power-state of any mouse. Just go connect and keep powered and keep connected and keep talking, and I don't care if the mouse isn't listening because I turned it off. So I set that to
false. It appears this has solved my problem of my Bluetooth mouse not re-syncing up and re-connecting to input services after a long time of being turned off, with the computer still on.
I hope this helps you.
Note: It doesn't matter if you have USB mice or USB keyboards connected to your computer.
Check out my answer here:
Uninstall/purge blueman-manager or any extra bluetooth software. Go vanilla and just leave the original Ubuntu bluetooth software to rule out any conflicts.
Press the bluetooth mouse's discovery mode.
Open a terminal and type the command
Then paste the first half of your bluetooth address as the OUI.
So if your bluetooth mouse's address is
It would look like this:
<device oui="AB:CD:EF:" type="mouse" name="Microsoft Sculpt Comfort Mouse" pin="0000"/>
Insert that line with the rest of the entries in
This helps to reconnect mice that may require a pin to pair.
This should solve most reconnection issues because Ubuntu doesn't know the PIN when it reconnects. You need to provide it with one (if it needs it default is
name isn't required,
pin isn't required either.
oui is required however. First find out if your mouse needs a
pin then try this. You can also try without using the
name parameter if you don't know it.
The setting which helped me was the
/etc/bluetooth/main.conf file. Originally it was set to
60, after changing that to
AutoConnectTimeout = 0
the mouse connects in about 2 seconds after either the notebook or the mouse wake up. This is on Ubuntu 12.04 (Precise) on MacBook Air with a Logitech bluetooth mouse.
(The other settings mentioned in the previous answer mostly affect device pairing but won't help in re-establishing a connection with an already paired device.)
It may sound strange but my wireless apple (mac) mouse re-connects on resuming/starting-up ubuntu only when I press few clicks and bang it randomly. Takes a couple of seconds to get connected.
I have tested this more than 10 times. If I don't bang (click) it doesn't connects upto 3-4 minutes. And on banging (clicking) it connects in less than 5 seconds.
Don't know if it would work with your mouse too least you could do is try.
PS: I paired it using hcitool scan.