cannot connect to K380 bluetooth keyboard

Bug #2000798 reported by Tomislav
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Confirmed
Undecided
Unassigned
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Had trouble connecting my K380 keyboard with the laptop (previously used it without issues), unpaired and now I can no longer pair it.

Other bluetooth devices work with this particular laptop (mouse, earbuds), the keyboard works flawlessly with a different laptop (running the same Ubuntu 20.04 OS) and an Android phone.

Used bluetoothctl to peek under the hood and got nowhere after turning scan on on the controller and activating the keyboard:
[NEW] Device [...mac address of the keyboard...] Keyboard K380
[CHG] Device [...mac address of the keyboard...] Connected: no
[DEL] Device [...mac address of the keyboard...] Keyboard K380

After this action, I get:

# connect [...mac address of the keyboard...]
Device [...mac address of the keyboard...] not available

When I activate the keyboard (by pressing any key on it while it's turned on), in the bluetooth settings GUI tool I see the keyboard appear for a fraction of a second in the list of unpaired devices and then it disappears.

Help?

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: bluez 5.53-0ubuntu3.6
ProcVersionSignature: Ubuntu 5.15.0-56.62~20.04.1-generic 5.15.64
Uname: Linux 5.15.0-56-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.25
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Fri Dec 30 19:41:41 2022
InstallationDate: Installed on 2022-11-03 (57 days ago)
InstallationMedia: Ubuntu 20.04.5 LTS "Focal Fossa" - Release amd64 (20220831)
InterestingModules: rfcomm bnep btusb bluetooth
MachineType: Intel(R) Client Systems LAPKC71E
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.15.0-56-generic root=/dev/mapper/vgubuntu-root ro quiet splash vt.handoff=7
SourcePackage: bluez
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 07/12/2021
dmi.bios.release: 5.19
dmi.bios.vendor: Intel Corp.
dmi.bios.version: KCTGL357.0037.2021.0712.0948
dmi.board.name: LAPKC71E
dmi.board.vendor: Intel Corporation
dmi.board.version: M22221-402
dmi.chassis.type: 10
dmi.chassis.vendor: Intel(R) Corporation
dmi.chassis.version: 2.0
dmi.ec.firmware.release: 1.5
dmi.modalias: dmi:bvnIntelCorp.:bvrKCTGL357.0037.2021.0712.0948:bd07/12/2021:br5.19:efr1.5:svnIntel(R)ClientSystems:pnLAPKC71E:pvrM38559-402:rvnIntelCorporation:rnLAPKC71E:rvrM22221-402:cvnIntel(R)Corporation:ct10:cvr2.0:skuBKC71EBFB6000:
dmi.product.family: KC
dmi.product.name: LAPKC71E
dmi.product.sku: BKC71EBFB6000
dmi.product.version: M38559-402
dmi.sys.vendor: Intel(R) Client Systems
hciconfig:
 hci0: Type: Primary Bus: USB
  BD Address: 20:1E:88:3C:4C:FD ACL MTU: 1021:4 SCO MTU: 96:6
  UP RUNNING PSCAN ISCAN
  RX bytes:221779 acl:5063 sco:0 events:6018 errors:0
  TX bytes:785416 acl:104 sco:0 commands:4168 errors:0

Revision history for this message
Tomislav (hefest) wrote :
Revision history for this message
Tomislav (hefest) wrote :

Forgot to mention: I use this utility to invert Fn key behaviour:

https://github.com/jergusg/k380-function-keys-conf

...and it's set up to start on boot using a variant of the procedure described here:

https://github.com/embuc/k480_conf

My /etc/udev/rules.d/80-k380.rules looks as follows:

ACTION=="add", KERNEL=="hidraw[0-9]*", RUN+="/usr/local/bin/fn_on.sh /dev/%k"

Tried temporarily removing the udev rule (without a reboot, though), but nothing changed.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If the same keyboard works on a different 20.04 machine then it's likely to be a difference in kernel driver (or associated hardware).

Revision history for this message
Tomislav (hefest) wrote :

Thanks for responding, Daniel. If it was the driver, I don't know how the keyboard would have worked until a week ago. If it was the hardware, I imagine other BT devices wouldn't connect either, but they do (mouse, earbuds). I might be wrong, of course.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If the machines are in different locations then they will experience different interference. It might only fail in the presence of too much 2.4GHz noise like wifi networks or other Bluetooth devices. Such interference will come and go over time.

Revision history for this message
Tomislav (hefest) wrote :

That's generally possible, but unlikely, given that everything worked well for a couple of months and then suddenly stopped working altogether (rather than occasionally).

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Tomislav (hefest) wrote :

Any other ideas, anything I can do to help diagnostics?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bluez (Ubuntu):
status: New → Confirmed
Revision history for this message
Tomislav (hefest) wrote (last edit ):

I revisited this and have apparently found a way to work around it.

The keyboard can be reset, which I understand to mean that it forgets pairing information. The following sequence of keys resets it:

<Esc>
o
<Esc>
o
<Esc>
b

You should see all 3 lights turn on, signalising that the reset was successful. After that, I paired the keyboard with my phone and both of my laptops without issue, including the laptop that refused to connect to the keyboard for the last year or so. (What a relief!)

As a reminder, to pair device #1 to the keyboard, press and hold F1 for 3 s, until the light starts to blink. Then connect to the keyboard from device #1, enter the confirmation code and you're done: repeat for the remaining 2 devices.

Given that the workaround seems unrelated to the computer on which I've had a problem, I believe this bug can be considered closed.

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.