After daemon restart, previously added device won't reconnect. Reproducible: Always Steps to Reproduce: 1. Add a BT device (via gnome-control-center or bluetoothctl) 2. Restart bluetooth.service Actual Results: > bluetoothd[1234]: Refusing input device connect: No such file or directory (2) > bluetoothd[1234]: Refusing connection from xx:xx:xx:xx:xx:xx: unknown device Expected Results: Previously added device will restore connection The device key is present in /var/lib/bluetooth/<adapter:addr>/<device:addr>/info, but running '/usr/libexec/bluetooth/bluetoothd -dn' will produce: > src/adapter.c:load_link_keys() hci0 keys 0 debug_keys 0
Created attachment 380362 [details, diff] changes to src/adapter.c After applying this, bluetoothd will read the stored key and connect to the device: > src/adapter.c:load_link_keys() hci0 keys 1 debug_keys 0
Created attachment 380364 [details] emerge --info
Do you get the same with bluez-5.20-r1?
Or even better with 5.21 that upstream released a few days ago :)
(In reply to Pacho Ramos from comment #3) > Do you get the same with bluez-5.20-r1? Yes, as with every bluez5 release starting from v5.10, including v5.21.
By the way, Jeroen, mine bug summary was correct. I can reconnect a device _while daemon is running_ (eg switch mouse off, back on and it will connect). It's when the daemon is restarted - it searches for previously stored devices, and _finds none_: > load_link_keys() hci0 keys 0
You would need to upstream this patch either in bluetooth mailing list or in https://bugzilla.kernel.org/enter_bug.cgi?product=Drivers (Component -> bluetooth)
Please try if you still need this with 5.21-r1
(In reply to Pacho Ramos from comment #8) > Please try if you still need this with 5.21-r1 Yes, it's the same. Proper fix was added to the git: http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=aeb998cac207ca2134618c5567fb2d5503d94245 which fixes the issue for me. It will land in 5.22, I guess
Nice to know, thanks. 5.21-r1 fixed a long standing bug that was causing many different failures and I wanted to ensure this wasn't a side effect of that too ;)
should be ok in 5.23