No keyboard input possible after turning off a connected BT keyboard

Bug #1619001 reported by Pat McGowan
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Confirmed
High
Michał Sawicz

Bug Description

Connect a BT keyboard and see it function correctly
While connected turn the keyboard off
The device is no longer shown as connected but
The OSK is not available

Tested with a Logitech K830, also reported with MS folding keyboard

A reboot is required to restore key inputs with the osk

tags: added: regression-proposed
Changed in canonical-devices-system-image:
assignee: nobody → Michał Sawicz (saviq)
importance: Undecided → High
milestone: none → 13
status: New → Confirmed
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

Some keyboards needs to be explicitly put into connecting mode in order to reconnect. On the other hand I have observed that the mouses reconnect flawlessly. Could it be the case that the mouse bit reconnects just fine and the keyboard part does not?

Any chance that you could debug this using bluetoothctl and/or syslog?

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :
  • syslog Edit (846.4 KiB, application/octet-stream)

syslog, connected at around 17:11 and disconnected/reconnected a min or so later
It adds the input device but never seems to remove it or re-add it

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

similar in u-s-c log

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

bluetoothctl just shows it disconnect and reconnect

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :
Changed in canonical-devices-system-image:
milestone: 13 → backlog
Revision history for this message
Tomas Öqvist (tomoqv) wrote :

I have experienced this with my MS foldable keyboard. Testing this today again, I ran into the same issue, no OSK and no keyboard presses registered. However, toggling bluetooth off/on in system settings and then reconnecting the keyboard gave me external keyboard input back.

Are there any logs I can supply to help troubleshoot this issue?

Revision history for this message
Tomas Öqvist (tomoqv) wrote :

Further testing shows that I can disconnect and reconnect the foldable keyboard without any issues. OSK doesn't come back when KB disconnected though.

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

Tomas, the syslog with Bluetooth logging enabled is usually a good point of start. In order to enable logging either start the bluetoothd with -d option or send SIGUSR2 to bluetoothd process. Also it is good to remember the timestamp [approx] when the keyboard has connected, etc... so that it is easier to find the interesting spots in the syslog which sometimes is quite long.

Revision history for this message
Tomas Öqvist (tomoqv) wrote :

Konrad,
I am getting errors trying to issue the "sudo bluetoothd -d" command.
"D-Bus setup fialed: Name already in use"

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

I revised the description, the BT kbd does work when turned back on

description: updated
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

log with -d

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

@tomas you need to edit the /etc/init/bluetooth.conf file to add the option

Revision history for this message
Tomas Öqvist (tomoqv) wrote :

@Pat: I am trying to do that, but despite "sudo mount -o remount,rw /" I don't get permission to edit bluetooth.conf.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

@tomas right its own by root so you need sudo to access it. I generally make a copy and cp it over the one in /etc/init. In any case my log may be enough already. I am not sure its actually a BT issue.

Revision history for this message
Michał Sawicz (saviq) wrote :

There's a chance bluetooth.conf is coming from a custom tarball, in which case you won't be able to edit it because it's bind-mounted over the original one.

Easiest is to move /usr/sbin/bluetoothd to /usr/sbin/bluetoothd.real and create a script in place of the original file:

#!/bin/sh
/usr/sbin/bluetoothd.real -d $@

Revision history for this message
Tomas Öqvist (tomoqv) wrote :

@Pat: My bad, forgot sudo in the cp command. syslog attached, fiddled with foldable keyboard starting around 4:15pm today.

Revision history for this message
Tomas Öqvist (tomoqv) wrote :

I can add to this bug report that a BLE mouse doesn't reconnect properly either. I have used my MS Designer Mouse with my Pro 5. When I turn the mouse off it disappears from the connected devices in bluetooth system settings, but the Pro 5 remains in windowed mode until a reboot.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.