You are not logged in.

#1 2019-05-17 23:54:33

user578
Member
Registered: 2019-05-17
Posts: 1

Bluetooth keyboard disconnects right after connect

I sucessfully paired my bluetooth keyboard but it disconnects constantly right after it powered on and connected.

Though I can make it discoverable and connect to it with:

bluetoothctl connect DC:2C:26:AF:B2:9E

And connection successfully establishing.

But autoconnection don't work.

I tried to use another bt dongle, another usb port, delete/pair keyboard again, reinstall bluetooth packages, tried to disable autosuspend for btusb kernel module.
Any idea how can I handle this?

$ hciconfig hci0   
hci0:	Type: Primary  Bus: USB
	BD Address: 00:1A:7D:DA:71:13  ACL MTU: 310:10  SCO MTU: 64:8
	UP RUNNING PSCAN 
	RX bytes:44214 acl:1923 sco:0 events:744 errors:0
	TX bytes:9057 acl:126 sco:0 commands:343 errors:0
$ bluetoothctl                             
Agent registered
[CHG] Device DC:2C:26:AF:B2:9E Connected: yes
[CHG] Device DC:2C:26:AF:B2:9E Connected: no
[CHG] Device DC:2C:26:AF:B2:9E Connected: yes
[CHG] Device DC:2C:26:AF:B2:9E Connected: no
$ btmon
< HCI Command: Disconnect (0x01|0x0006) plen 3                    #6752 [hci0] 3993.095097
        Handle: 69
        Reason: Authentication Failure (0x05)
> HCI Event: Command Status (0x0f) plen 4                         #6753 [hci0] 3993.161392
      Disconnect (0x01|0x0006) ncmd 1
        Status: Success (0x00)
> HCI Event: Disconnect Complete (0x05) plen 4                    #6754 [hci0] 3993.239390
        Status: Success (0x00)
        Handle: 69
        Reason: Connection Terminated By Local Host (0x16)
@ MGMT Event: Device Disconnected (0x000c) plen 8              {0x0001} [hci0] 3993.239449
        BR/EDR Address: DC:2C:26:AF:B2:9E (Iton Technology Limited)
        Reason: Connection terminated by local host (0x02)
@ MGMT Event: Device Disconnected (0x000c) plen 8              {0x0002} [hci0] 3993.239449
        BR/EDR Address: DC:2C:26:AF:B2:9E (Iton Technology Limited)
        Reason: Connection terminated by local host (0x02)
$ bluetoothd -d
May 18 02:25:14 hpc bluetoothd[6222]: src/agent.c:register_agent() agent :1.1178
May 18 02:25:20 hpc bluetoothd[6222]: src/adapter.c:connected_callback() hci0 device DC:2C:26:AF:B2:9E connected eir_len 5
May 18 02:25:24 hpc bluetoothd[6222]: src/adapter.c:dev_disconnected() Device DC:2C:26:AF:B2:9E disconnected, reason 2
May 18 02:25:24 hpc bluetoothd[6222]: src/adapter.c:adapter_remove_connection()
May 18 02:25:24 hpc bluetoothd[6222]: plugins/policy.c:disconnect_cb() reason 2
May 18 02:25:24 hpc bluetoothd[6222]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr DC:2C:26:AF:B2:9E type 0 status 0xe
May 18 02:25:24 hpc bluetoothd[6222]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
May 18 02:25:24 hpc bluetoothd[6222]: src/device.c:device_bonding_failed() status 14
May 18 02:25:24 hpc bluetoothd[6222]: src/adapter.c:resume_discovery()
May 18 02:25:30 hpc bluetoothd[6222]: src/adapter.c:connected_callback() hci0 device DC:2C:26:AF:B2:9E connected eir_len 5
May 18 02:25:35 hpc bluetoothd[6222]: src/adapter.c:dev_disconnected() Device DC:2C:26:AF:B2:9E disconnected, reason 2
May 18 02:25:35 hpc bluetoothd[6222]: src/adapter.c:adapter_remove_connection()
May 18 02:25:35 hpc bluetoothd[6222]: plugins/policy.c:disconnect_cb() reason 2
May 18 02:25:35 hpc bluetoothd[6222]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr DC:2C:26:AF:B2:9E type 0 status 0xe
May 18 02:25:35 hpc bluetoothd[6222]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
May 18 02:25:35 hpc bluetoothd[6222]: src/device.c:device_bonding_failed() status 14
May 18 02:25:35 hpc bluetoothd[6222]: src/adapter.c:resume_discovery()
$ systool -v -m btusb                              
Module = "btusb"        

  Attributes:
    coresize            = "57344"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "0"
    srcversion          = "B4E519F2A9D492C2C322726"
    taint               = ""
    uevent              = <store method only>
    version             = "0.8"

  Parameters:
    disable_scofix      = "N"
    enable_autosuspend  = "Y"
    force_scofix        = "N"
    reset               = "Y"

  Sections:
$ pacman -Q | egrep "bluez|blueman"
blueman 2.0.8-2
bluez 5.50-6
bluez-libs 5.50-6
bluez-utils-compat 5.50-3

UPD:

$ uname -a 
Linux hpc 5.1.2-arch1-1-ARCH #1 SMP PREEMPT Thu May 16 20:59:36 UTC 2019 x86_64 GNU/Linux

Last edited by user578 (2019-05-20 19:58:20)

Offline

#2 2019-05-18 07:09:51

memeplex
Member
Registered: 2008-11-10
Posts: 33

Re: Bluetooth keyboard disconnects right after connect

I've reported a similar problem to both:

* bluez mailing list: https://marc.info/?t=155807293600001&r=1&w=2
* pulseaudio gitlab: https://gitlab.freedesktop.org/pulseaud … issues/674

Maybe you can help tracking down the problem by reporting your case there.

This is not happening with latest kernels up to 5.1 (althought it's happening with LTS!), so I downgraded the kernel for now, as a workaround.

Last edited by memeplex (2019-05-18 07:11:54)

Offline

#3 2019-05-18 09:06:26

yazzz
Member
Registered: 2008-10-01
Posts: 6

Re: Bluetooth keyboard disconnects right after connect

I have the same problem with ps3 controller, working on 5.0.13, does not work on 5.1.2, 5.1.1 and lts.

Last edited by yazzz (2019-06-13 08:08:03)

Offline

#4 2019-05-18 21:14:03

darnrain
Member
Registered: 2019-05-18
Posts: 3

Re: Bluetooth keyboard disconnects right after connect

I have the same problem with my arch install also. I can connect to my Bluetooth keyboard but if I reboot it will not auto connect just connects and disconnects. Almost like it's not trusted any more.

Offline

#5 2019-05-19 07:17:59

yazzz
Member
Registered: 2008-10-01
Posts: 6

Re: Bluetooth keyboard disconnects right after connect

From the mailing list "When both devices support SSP, encryption is required for any non-SDP PSM. The kernel \
enforces this regardless of what kind of options were set for the socket."

Offline

#6 2019-05-21 23:21:01

quan2m
Member
Registered: 2012-01-27
Posts: 7

Re: Bluetooth keyboard disconnects right after connect

@yazzz

Nice catch, I wasn't able to find that bit in the LKML (which is what I assumed you referenced). If not, care to provide a link?

In either case, it seems either like a nasty regression in the 5.x kernel, or a change where the tools (bluetoothctl/blueberry et al) have not caught up.

Did you suss out a solution? So far, the least time consuming for me has been to remove and add the device. However, if I leave the keyboard for an hour, I have to do it all over again. That's pretty lame.

Using a FreeStyle2 Blue and have been... for 5yrs. I've had a couple of issues that broke with either blueman/blueberry or bluetoothctl, but this seems to be kernel dependent and kind of retarded.

Offline

#7 2019-05-21 23:41:24

tuvistavie
Member
From: London
Registered: 2012-02-12
Posts: 15
Website

Re: Bluetooth keyboard disconnects right after connect

I am running into the same issue with my bluetooth keyboard.
For now my workaround is to run the connect command in bluetoothctl and then to put my keyboard in pairing mode.
It seems to be working, at least for my keyboard.
Not great but still better than having to pair every time.

Offline

#8 2019-05-22 04:22:45

yazzz
Member
Registered: 2008-10-01
Posts: 6

Re: Bluetooth keyboard disconnects right after connect

@quan2m
https://marc.info/?l=linux-bluetooth&m= … 128594&w=2
Am just using kernel 5.0.13 for now.

Offline

#9 2019-05-22 15:59:50

quan2m
Member
Registered: 2012-01-27
Posts: 7

Re: Bluetooth keyboard disconnects right after connect

Thanks yazzz

I was up too late, I found it by SCROLLING UP! The horror!

Offline

#10 2019-05-24 22:50:51

Warper
Member
From: Quito, Ecuador
Registered: 2008-04-08
Posts: 47

Re: Bluetooth keyboard disconnects right after connect

Hey guys,

Today I updated my installation and my Bluetooth mouse that was working perfectly simply stopped doing so.
I can see the B icon on the taskbar in Plasma attempting to connect but not being able.

Probably this is also related to the OP issue.

bluetoothctl shows three types of messages:

[NEW] Device xx:xx:xx:xx:xx:xx Bluetooth Mouse
[CHG] Device xx:xx:xx:xx:xx:xx Connected: no
[DEL] Device xx:xx:xx:xx:xx:xx Bluetooth Mouse

I really don't want to downgrade my kernel. Do you think there's another way to solve the problem?

Warper

Offline

#11 2019-05-25 15:59:49

nicman23
Member
Registered: 2016-09-03
Posts: 13

Re: Bluetooth keyboard disconnects right after connect

https://lore.kernel.org/linux-bluetooth … nn.org/raw works for me on 5.0.18 and fedora has merged it

Offline

#12 2019-05-25 21:51:34

Warper
Member
From: Quito, Ecuador
Registered: 2008-04-08
Posts: 47

Re: Bluetooth keyboard disconnects right after connect

Interesting.
I'll try it.

Thank you

nicman23 wrote:

https://lore.kernel.org/linux-bluetooth … nn.org/raw works for me on 5.0.18 and fedora has merged it

Offline

#13 2019-05-30 19:08:31

jlp2
Member
Registered: 2013-11-06
Posts: 5

Re: Bluetooth keyboard disconnects right after connect

Bug-Report:

https://bugs.archlinux.org/task/62845

Last edited by jlp2 (2019-06-08 11:20:16)

Offline

#14 2019-06-18 00:41:43

magodo
Member
Registered: 2016-11-08
Posts: 18

Re: Bluetooth keyboard disconnects right after connect

Is there any update on this issue? I'm using the latest linux-lts (4.19.50-1) package, and still suffering this..

Offline

#15 2019-06-18 09:32:32

Anez007
Member
Registered: 2017-03-14
Posts: 5

Re: Bluetooth keyboard disconnects right after connect

I too still have this problem. Kernel version is 5.1.9-arch1-1-ARCH
Downgrading isn't really an option as it messes with the nvidia driver. (something about targeting the wrong kernel version.)

Offline

#16 2019-06-18 11:55:04

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: Bluetooth keyboard disconnects right after connect

I use hardened, linux-hardened 5.1.11.a-2 solved the issue for me, probably linux 5.1.11.arch1-1 will also solve it, it's in testing...

Offline

#17 2019-06-18 15:16:14

kgtuning
Member
From: New Hampshire
Registered: 2015-09-30
Posts: 44

Re: Bluetooth keyboard disconnects right after connect

Can anyone confirm 5.1.11 fixed this issue?

Offline

#18 2019-06-18 17:02:11

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: Bluetooth keyboard disconnects right after connect

You could have found this yourself, they revert a patch.. anyway,  https://cdn.kernel.org/pub/linux/kernel … Log-5.1.10
commit b528880e8b0167c34cb36c1b4e6165192f76267c

Offline

#19 2019-06-18 17:24:06

kgtuning
Member
From: New Hampshire
Registered: 2015-09-30
Posts: 44

Re: Bluetooth keyboard disconnects right after connect

qinohe wrote:

You could have found this yourself, they revert a patch.. anyway,  https://cdn.kernel.org/pub/linux/kernel … Log-5.1.10
commit b528880e8b0167c34cb36c1b4e6165192f76267c

I did. But 5.1.10 did not fix it for me hence why i asked. No need to tell i could find it on my own.

Offline

#20 2019-06-18 17:32:33

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: Bluetooth keyboard disconnects right after connect

It wasn't really meant to attack you ;-) though, that patch should have fixed it...

edit: If you'd like to know immediately, install testing or try hardened.

Last edited by qinohe (2019-06-18 17:41:11)

Offline

#21 2019-06-18 17:49:11

kgtuning
Member
From: New Hampshire
Registered: 2015-09-30
Posts: 44

Re: Bluetooth keyboard disconnects right after connect

qinohe wrote:

It wasn't really meant to attack you ;-) though, that patch should have fixed it...

edit: If you'd like to know immediately, install testing or try hardened.

When 5.1.10 was in testing I tried it but it didn’t help my situation. Im not home to check on 5.1.11 and I was curious.

Offline

#22 2019-06-18 18:01:03

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: Bluetooth keyboard disconnects right after connect

I understand. but it will work, I had the same problems, and they are really solved,I promise ( as far as I can ;-)

Offline

#23 2019-06-18 18:29:06

woodape
Member
Registered: 2015-03-25
Posts: 159

Re: Bluetooth keyboard disconnects right after connect

Since this thread is still alive...

yazzz wrote:

I have the same problem with ps3 controller, working on 5.0.13, does not work on 5.1.2, 5.1.1 and lts.

Had the same issue, just tested with the 5.1.11 kernel and it now connects.

Offline

#24 2019-06-18 23:55:48

Anez007
Member
Registered: 2017-03-14
Posts: 5

Re: Bluetooth keyboard disconnects right after connect

I'm aware that this is a noob question, but please help me out here if you could, what is the best way to get the in-testing linux kernel?
1. Enable the testing repository, upgrade just "linux" (and "linux-header" maybe) and disable testing
2. Enable testing and upgrade the whole system, disable testing and wait for the day that the normal repositories catch up
3. some other method?

Offline

#25 2019-06-19 01:33:24

magodo
Member
Registered: 2016-11-08
Posts: 18

Re: Bluetooth keyboard disconnects right after connect

Hi, also confirmed that linux-lts 4.19.52-1 has fixed this issue..

Offline

Board footer

Powered by FluxBB