Lenovo Essential Wireless Keyboard doesn't works (Primax Electronics manufacturer)

Bug #1771431 reported by Julian Alarcon on 2018-05-15
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
linux
Confirmed
Medium
linux (Fedora)
Confirmed
Medium
linux (Ubuntu)
Medium
Unassigned

Bug Description

Hi
I got an issue on Ubuntu 18.04 with latest packages.
uname -a:
Linux MyLaptop 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

lshw:
              *-usb:0
                   description: Keyboard
                   product: Lenovo USB Receiver
                   vendor: Lenovo
                   physical id: 3
                   bus info: usb@1:3
                   version: 1.05
                   capabilities: usb-2.00
                   configuration: driver=usbhid maxpower=100mA speed=12Mbit/s

My wireless keyboard is not working, Ubuntu only recognize some special keys (Super, Ctrl, Shift, Alt)

This is a Mouse+Keyboard combo using a wireless receiver by usb:

lsusb:
Bus 001 Device 005: ID 17ef:609b Lenovo

Mouse works fine, and in Windows 10 it works with no issues.

I found multiple reported problems with this keyboard in other distros (and from Asus too, as the real manufacturer is Primax Electronics).
https://forums.lenovo.com/t5/Linux-Discussion/Professional-Wireless-Keyboard-not-working-on-Linux/td-p/3726486
https://ubuntuforums.org/showthread.php?t=2378862
https://askubuntu.com/questions/897729/lenovo-professional-wireless-keyboard-and-mouse-combo-not-working-in-ubuntu
https://forums.linuxmint.com/viewtopic.php?f=49&t=260093&sid=20a073d5dd8abb1b7f23be608d7fdfd7
https://unix.stackexchange.com/questions/377830/linux-hid-driver-for-primax-wireless-keyboards/

REPORTS ON KERNEL MAILING LISTS:
https://www.spinics.net/lists/linux-usb/msg168719.html
https://www.spinics.net/lists/linux-input/msg56210.html
https://www.spinics.net/lists/linux-usb/msg173012.html
https://www.spinics.net/lists/linux-input/msg58221.html

There is a workaround (I still didn't tried) but it needs to compile an specific driver.
https://github.com/y-trudeau/linux_lenovo_ultraslim_plus

There is already a kernel report about this.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-generic 4.15.0.20.23
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: julian 1342 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
Date: Tue May 15 15:53:41 2018
InstallationDate: Installed on 2018-05-14 (1 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
MachineType: LENOVO 20FJS0NT07
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-20-generic root=UUID=818481db-36cb-4dba-8da5-8ecf15750b3b ro noapic acpi=off vt.handoff=1
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-20-generic N/A
 linux-backports-modules-4.15.0-20-generic N/A
 linux-firmware 1.173
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/27/2018
dmi.bios.vendor: LENOVO
dmi.bios.version: N1KET38W (1.25 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20FJS0NT07
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40705 WIN
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: None
dmi.modalias: dmi:bvnLENOVO:bvrN1KET38W(1.25):bd03/27/2018:svnLENOVO:pn20FJS0NT07:pvrThinkPadT560:rvnLENOVO:rn20FJS0NT07:rvrSDK0J40705WIN:cvnLENOVO:ct10:cvrNone:
dmi.product.family: ThinkPad T560
dmi.product.name: 20FJS0NT07
dmi.product.version: ThinkPad T560
dmi.sys.vendor: LENOVO

Hello,

I have a Lenovo Professional Keyboard combo which is not working on Linux because it sends an extra byte (0x71) for each key.

Some people explains the situation in the followings links:

https://forums.lenovo.com/t5/Linux-Discussion/Professional-Wireless-Keyboard-not-working-on-Linux/td-p/3726486

https://github.com/y-trudeau/linux_lenovo_ultraslim_plus

Do you think it's possible to make usb keyboard driver able to understand this extra byte?

On Mon, Nov 06, 2017 at 07:56:41AM +0000, <email address hidden> wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=197787
>
> Bug ID: 197787
> Summary: Lenovo Professional Keyboard not working
> Product: Drivers
> Version: 2.5
> Kernel Version: 4.12

All USB bugs should be sent to the <email address hidden> mailing
list, and not entered into bugzilla. Please bring this issue up there,
if it is still a problem in the latest kernel release.

Description of problem:

I bought new wireless keyboard for my Lenovo laptop (T470s) with mouse. The mouse works, but the keyboard doesn't. Only keys "super" and "alt" react on the keyboard. It is really pity, because i would like to use it.

Strange is that the keyboard works in bios and in grub. Same problem I have with Fedora 26.

>> dmesg
[ 100.790513] usb 1-1: USB disconnect, device number 5
[ 104.577088] usb 1-1: new full-speed USB device number 6 using xhci_hcd
[ 104.749378] usb 1-1: New USB device found, idVendor=17ef, idProduct=60a9
[ 104.749381] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 104.749383] usb 1-1: Product: Lenovo Essential Wireless Keyboard and Mouse Combo
[ 104.752210] input: Lenovo Essential Wireless Keyboard and Mouse Combo as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:17EF:60A9.0009/input/input23
[ 104.804226] hid-generic 0003:17EF:60A9.0009: input,hidraw0: USB HID v1.11 Keyboard [Lenovo Essential Wireless Keyboard and Mouse Combo] on usb-0000:00:14.0-1/input0
[ 104.805579] input: Lenovo Essential Wireless Keyboard and Mouse Combo as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/0003:17EF:60A9.000A/input/input24
[ 104.805739] hid-generic 0003:17EF:60A9.000A: input,hidraw1: USB HID v1.11 Mouse [Lenovo Essential Wireless Keyboard and Mouse Combo] on usb-0000:00:14.0-1/input1
[ 104.806528] input: Lenovo Essential Wireless Keyboard and Mouse Combo as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2/0003:17EF:60A9.000B/input/input25
[ 104.858215] hid-generic 0003:17EF:60A9.000B: input,hidraw2: USB HID v1.11 Device [Lenovo Essential Wireless Keyboard and Mouse Combo] on usb-0000:00:14.0-1/input2
[ 104.859445] hid-generic 0003:17EF:60A9.000C: hiddev96,hidraw3: USB HID v1.11 Device [Lenovo Essential Wireless Keyboard and Mouse Combo] on usb-0000:00:14.0-1/input3
[ 114.566488] input input23: event field not found
[ 114.630487] input input23: event field not found
[ 114.854488] input input23: event field not found
....

>> lsusb
Bus 001 Device 006: ID 17ef:60a9 Lenovo

Version-Release number of selected component (if applicable):
kernel 4.13.16-202.fc26.x86_64

How reproducible:
always, except bios and grub

Steps to Reproduce:
1. use Lenovo Essential Wireless Keyboard and Mouse Combo

Actual results:
not work

Expected results:
keyboard and mouse work correctly in gnome-shell

Same problem with
Lenovo keyboard and mouse combo (4X30H567)

lsusb:
  Bus 002 Device 004: ID 17ef:609b Lenovo

The mouse works without issues but pressing any keys on keyboard will result in just
[ 1378.864283] input input12: event field not found
[ 1378.896265] input input12: event field not found
[ 1378.896270] input input12: event field not found
[ 1378.944333] input input12: event field not found

We apologize for the inconvenience. There is a large number of bugs to go through and several of them have gone stale. As kernel maintainers, we try to keep up with bugzilla but due the rate at which the upstream kernel project moves, bugs may be fixed without any indication to us. Due to this, we are doing a mass bug update across all of the Fedora 27 kernel bugs.

Fedora 27 has now been rebased to 4.15.3-300.f27. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you experience different issues, please open a new bug report for those.

Same problem with Lenovo keyboard and mouse combos (4X30M39472 and 4X30H56809).

The issue is still present in kernel version 4.15.3-300.fc27.

Maybe the information on this page can help.
https://unix.stackexchange.com/questions/377830/linux-hid-driver-for-primax-wireless-keyboards/377873#377873

I also found a bugzilla entry on kernel.org that seems to handle the same problem (https://bugzilla.kernel.org/show_bug.cgi?id=197787).

I upgraded system to Fedora 28 and Kernel 4.16.6-302.fc28.x86_64 and the issue is still not resolved. The keyboard doesn't work.

Bus 002 Device 006: ID 17ef:60a9 Lenovo

>> journalctl -f
kvě 06 16:05:16 localhost.localdomain kernel: input input25: event field not found
kvě 06 16:05:16 localhost.localdomain kernel: input input25: event field not found

I have installed Kernel 4.16.6-302.fc28.x86_64 (Fedora) and 4.15.0-20 (Uubntu) and the keyboard still doesn't work. Is ts possible to fixed it?

Julian Alarcon (julian-alarcon) wrote :
summary: Lenovo Essential Wireless Keyboard doesn't works (Primax Electronics
- manufacter)
+ manufacturer)
description: updated

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Fedora):
importance: Unknown → Undecided
status: Unknown → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged

*********** MASS BUG UPDATE **************

We apologize for the inconvenience. There are a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 28 kernel bugs.

Fedora 28 has now been rebased to 4.17.7-200.fc28. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you experience different issues, please open a new bug report for those.

*********** MASS BUG UPDATE **************
This bug is being closed with INSUFFICIENT_DATA as there has not been a response in 5 weeks. If you are still experiencing this issue, please reopen and attach the relevant data from the latest kernel you are running and any data that might have been requested previously.

Download full text (5.6 KiB)

+++ This bug was initially created as a clone of Bug #1521100 +++

Description of problem:

I bought new wireless keyboard for my Lenovo laptop (T470s) with mouse. The mouse works, but the keyboard doesn't. Only keys "super" and "alt" react on the keyboard. It is really pity, because i would like to use it.

Strange is that the keyboard works in bios and in grub. Same problem I have with Fedora 26.

>> dmesg
[ 100.790513] usb 1-1: USB disconnect, device number 5
[ 104.577088] usb 1-1: new full-speed USB device number 6 using xhci_hcd
[ 104.749378] usb 1-1: New USB device found, idVendor=17ef, idProduct=60a9
[ 104.749381] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 104.749383] usb 1-1: Product: Lenovo Essential Wireless Keyboard and Mouse Combo
[ 104.752210] input: Lenovo Essential Wireless Keyboard and Mouse Combo as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:17EF:60A9.0009/input/input23
[ 104.804226] hid-generic 0003:17EF:60A9.0009: input,hidraw0: USB HID v1.11 Keyboard [Lenovo Essential Wireless Keyboard and Mouse Combo] on usb-0000:00:14.0-1/input0
[ 104.805579] input: Lenovo Essential Wireless Keyboard and Mouse Combo as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/0003:17EF:60A9.000A/input/input24
[ 104.805739] hid-generic 0003:17EF:60A9.000A: input,hidraw1: USB HID v1.11 Mouse [Lenovo Essential Wireless Keyboard and Mouse Combo] on usb-0000:00:14.0-1/input1
[ 104.806528] input: Lenovo Essential Wireless Keyboard and Mouse Combo as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.2/0003:17EF:60A9.000B/input/input25
[ 104.858215] hid-generic 0003:17EF:60A9.000B: input,hidraw2: USB HID v1.11 Device [Lenovo Essential Wireless Keyboard and Mouse Combo] on usb-0000:00:14.0-1/input2
[ 104.859445] hid-generic 0003:17EF:60A9.000C: hiddev96,hidraw3: USB HID v1.11 Device [Lenovo Essential Wireless Keyboard and Mouse Combo] on usb-0000:00:14.0-1/input3
[ 114.566488] input input23: event field not found
[ 114.630487] input input23: event field not found
[ 114.854488] input input23: event field not found
....

>> lsusb
Bus 001 Device 006: ID 17ef:60a9 Lenovo

Version-Release number of selected component (if applicable):
kernel 4.13.16-202.fc26.x86_64

How reproducible:
always, except bios and grub

Steps to Reproduce:
1. use Lenovo Essential Wireless Keyboard and Mouse Combo

Actual results:
not work

Expected results:
keyboard and mouse work correctly in gnome-shell

--- Additional comment from Kari Hautio on 2018-01-08 03:51:47 EST ---

Same problem with
Lenovo keyboard and mouse combo (4X30H567)

lsusb:
  Bus 002 Device 004: ID 17ef:609b Lenovo

The mouse works without issues but pressing any keys on keyboard will result in just
[ 1378.864283] input input12: event field not found
[ 1378.896265] input input12: event field not found
[ 1378.896270] input input12: event field not found
[ 1378.944333] input input12: event field not found

--- Additional comment from Pavel Studeník on 2018-01-10 10:02:39 EST ---

Maybe I found solution, but it didn't test.

https://github.com/y-trudeau/linux_lenovo_ultraslim_plus

--- Additional comment from Laura Abbott on 2018-02-20 15:00:09 EST ---

We a...

Read more...

I am still experiencing this issue on the latest kernel (Fedora 28).
4.17.19-200.fc28.x86_64

Few more links to external pages where problem is described:
https://askubuntu.com/questions/897729/lenovo-professional-wireless-keyboard-and-mouse-combo-not-working-in-ubuntu?noredirect=1&lq=1
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1771431
https://bugzilla.kernel.org/show_bug.cgi?id=197787
https://unix.stackexchange.com/questions/377830/linux-hid-driver-for-primax-wireless-keyboards/377873#377873

Workaround (not completely working):
https://github.com/y-trudeau/linux_lenovo_ultraslim_plus
Problems with workaround:
1. mouse stops working when workaround is applied (Lenovo Professional Keyboard combo contains both mouse and keyboard with only one dongle)
2. super key does not work

We apologize for the inconvenience. There is a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 28 kernel bugs.

Fedora 28 has now been rebased to 4.18.10-300.fc28. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 29, and are still experiencing this issue, please change the version to Fedora 29.

If you experience different issues, please open a new bug report for those.

Bug is still present in 4.18.10-200.fc28.x86_64.

Kernel 4.18.11-200.fc28.x86_64 and it still doesn't work.

*** This bug has been marked as a duplicate of bug 1625415 ***

*** Bug 1521100 has been marked as a duplicate of this bug. ***

TJ (tj) wrote :

The kernel has a module for this, "hid-primax", which re-orders the received HID reports to make them compliant.

$ modinfo hid-primax
filename: /lib/modules/4.15.0-34-lowlatency/kernel/drivers/hid/hid-primax.ko
license: GPL
author: Terry Lambert <email address hidden>
srcversion: 9AF9EA4DBFB1326426467BB
alias: hid:b0003g*v00000461p00004E05
depends: hid
retpoline: Y
intree: Y
name: hid_primax
vermagic: 4.15.0-34-lowlatency SMP preempt mod_unload
signat: PKCS#7
signer:
sig_key:
sig_hashalgo: md4

$ git show f6a04605f3038

commit f6a04605f303852963f3f357d19b967aa83c172f
Author: Terry Lambert <email address hidden>
Date: Fri Oct 14 17:18:54 2011 -0700

    HID: support primax keyboards violating USB HID spec

    Primax keyboards with the issue this driver addresses report modifier
    keys as in band key events instead of as out of band modifier bits,
    resulting in the modifier keys generating key up events immediately
    before the keys they are intended to modify. This driver rewrites
    the raw report data from such keyboards into USB HID 1.11 compliant
    report data. It only matches the USB vendor and product IDs for the
    keyboard it has been tested on. Since there are several keyboards,
    notably a number of laptops and folding USB keyboards known to have
    similar unresolved problem reports, the list is expected to grow.

    Signed-off-by: Terry Lambert <email address hidden>
    Signed-off-by: Jiri Kosina <email address hidden>

$ git describe --contains f6a04605f3038
v3.2-rc1~187^2^2~2

Currently the driver only supports the device ID 0461:4e05 and will need the IDs of other devices adding in order to work with them.

# extract from drivers/hid/hid-primax.c

static const struct hid_device_id px_devices[] = {
    { HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) },
    { }
};

$ grep PRIMAX drivers/hid/hid-ids.h
#define USB_VENDOR_ID_PRIMAX 0x0461
#define USB_DEVICE_ID_PRIMAX_MOUSE_4D22 0x4d22
#define USB_DEVICE_ID_PRIMAX_KEYBOARD 0x4e05
#define USB_DEVICE_ID_PRIMAX_REZEL 0x4e72

Collecting additional IDs and adding them would be the best action to take.

Changed in kernel:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in linux (Fedora):
status: Confirmed → Invalid

Changed from old Fedora bug (1521100) to new (1625415)

Changed in linux (Fedora):
importance: Undecided → Unknown
status: Invalid → Unknown

Thu bug is still present in Fedor 29 (kernel version 4.19.10-300.fc29.x86_64)

*********** MASS BUG UPDATE **************

We apologize for the inconvenience. There are a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 28 kernel bugs.

Fedora 28 has now been rebased to 4.20.5-100.fc28. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 29, and are still experiencing this issue, please change the version to Fedora 29.

If you experience different issues, please open a new bug report for those.

The bug is still present in 4.20.5-100.fc28.x86_64.

Could anybody please look into it?

Keyboard is sending extra byte with each key-press, as temporary workaaround you can use mapping in this repository (tested on Fedora 28 with 4.20 kernel)
https://github.com/miskopo/lenovo-professional-wireless-kbd-linux-driver

John Johansson (jkej) wrote :

@Tj

"Currently the driver only supports the device ID 0461:4e05 and will need the IDs of other devices adding in order to work with them."

Here are device IDs for a few models that I have found among the many reports of similar problems with Primax wireless keyboard + mouse combos:

0461:60a9 - Lenovo Wireless Essential
0461:609b - Lenovo Wireless Professional
0461:4e80 - Asus Keyboard and Mouse
0461:4e90 - HP Pavilion Wireless Keyboard and Mouse 800

I have the HP model. What's the proper way to make sure these are added in the future?

Kai-Heng Feng (kaihengfeng) wrote :

Follow commit f6a04605f303852963f3f357d19b967aa83c172f and adds your ID should be suffice.
I can make a patch and build a test kernel if you like.

John Johansson (jkej) wrote :

Ok, I think I understand how to add IDs to the code. What should I do with the modified code? Commit and do a pull request?

Should I only add the ID for the keyboard that I have and can test (the HP one) or should I also add the other ones?

While researching the problem, I also found someone else who had been trying a fix similar to this:
https://unix.stackexchange.com/a/402288
They also seemed to add some additional code, mainly for the Lenovo keyboards. Would any of that be relevant to add too?

Yes, I'd be very thankful if you could help me produce something I can test.

Kai-Heng Feng (kaihengfeng) wrote :
John Johansson (jkej) wrote :

Kai-Heng: I just tested your kernel, but it didn't solve the keyboard issue. However, it seemed to screw up the mouse, which of course has the same vendor and device id, since they operate through the same usb connector. With this kernel the mouse was making large erratic jumps and generating click events when I was just moving the mouse.

Is it possible that the fix was somehow modifying the report data coming from the mouse instead of the report data coming from the keyboard?

Kai-Heng Feng (kaihengfeng) wrote :

John, please file a new bug report and let's continue or discussion there.

Keyboard still doesn't work. Fedora 30 - Kernel 5.0.13-300.fc30.x86_64.

Changed in linux (Fedora):
importance: Unknown → Medium
status: Unknown → Confirmed
Brad Figg (brad-figg) on 2019-07-24
tags: added: cscc

This is finally fixed! I test it in Ubuntu 18.04 kernel: 4.15.0-64, Ubuntu 18.04.3 kernel: 5.0.0-29.

The keyboard and mouse seems to work fine with no issues! I had to disable a workaround used to make it work! https://github.com/y-trudeau/linux_lenovo_ultraslim_plus

Bug report on fedora when they also mention that it was fixed in Fedora 30

https://bugzilla.redhat.com/show_bug.cgi?id=1625415

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

Other bug subscribers

Remote bug watches

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