Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

4 Answers 4

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 0:

#IdleTimeout=30

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 main.conf are:

DiscoverableTimeout = 0
PairableTimeout = 0
PageTimeout = 8192
share|improve this answer
    
That line was already commented out, but I've set it to 0 now to see if that changes anything (though it says that's the default). I think my device is actually turning itself off, though. Which is fine, I just wish it would auto-reconnect when I turn it back on, like my ones that have manual on/off do. –  singpolyma Jul 17 '11 at 2:32
    
Oh! It seems possible that it is recconecting and is just slow about it. I'll have to test a bit more to be sure. –  singpolyma Jul 17 '11 at 2:45
    
No... more testing seems to confirm that was a fluke. I definitely have to hit the button on my mouse, then select "connect" from the icon on Ubuntu –  singpolyma Jul 17 '11 at 3:24
    
Further testing shows that if I click one of my mouse buttons while it's off, it reconnects... I have no idea why that works an dthe other button didn't work the same way , but this solved now. –  singpolyma Jul 18 '11 at 21:15
    
Energy-saving feature of the mouse? –  Takkat Jul 18 '11 at 21:48

The setting which helped me was the AutoConnectTimeout in /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.)

share|improve this answer

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 AutoConnectTimeout in /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 AutoConnectTimeout to time out.
  • I set my IdleTimeout in input.conf to 240 minutes, this is a computer dedicated to watching movies, so can't hurt.
  • I set RememberPowered in main.conf to false.

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 input.conf and 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.

share|improve this answer

Always try set up PIN to 0000 first. It helps for me and all problems solved. I had exactly same problem looks as is stated above. I already tried all advices there in all related questions but nothing works. The solution is easier than we think (Ubuntu 14.04 LTS, Logitech M557 Bluetooth mouse).

share|improve this answer
    
Where should we do this? –  Tamsyn Michael Oct 27 at 9:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.