Some of Lenovo Lenovo Essential Wireless Keyboard Fn keys doesn't work

Bug #1927545 reported by Anton Sudak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

I found that some of the Lenovo Lenovo Essential Wireless Keyboard Fn keys don't work. First one is Mute mic (Fn+F4), second one is Scissors (Fn+F10, probably hotkey for Windows Snipping Tool for selective screenshot).gnome-control-panel, xev and evtest doesn't react on pressing these buttons.

Here what I was able to get via sudo cat /dev/usb/hiddev0 | hexdump -v -e '/1 "%02X\n"' :
For Mute key
00 00 00 FF DC 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 FF 00 00 00 00

For Scissors
00 00 00 FF DB 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 FF 00 00 00 00

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: linux-image-generic 5.11.0.16.17
ProcVersionSignature: Ubuntu 5.11.0-16.17-generic 5.11.12
Uname: Linux 5.11.0-16-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu65
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: asudak 2085 F.... pulseaudio
CasperMD5CheckResult: unknown
CurrentDesktop: GNOME
Date: Thu May 6 22:36:50 2021
InstallationDate: Installed on 2021-04-13 (23 days ago)
InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Release amd64 (20201022)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 004: ID 174f:1800 Syntek Integrated RGB Camera
 Bus 001 Device 003: ID 8087:0029 Intel Corp. AX200 Bluetooth
 Bus 001 Device 002: ID 17ef:60a9 Lenovo Lenovo Essential Wireless Keyboard and Mouse Combo
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: LENOVO F0FA0066UA
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.11.0-16-generic root=UUID=9ef69356-31e9-488f-9a6b-99e10c0ed863 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-5.11.0-16-generic N/A
 linux-backports-modules-5.11.0-16-generic N/A
 linux-firmware 1.197
SourcePackage: linux
UpgradeStatus: Upgraded to hirsute on 2021-04-18 (17 days ago)
dmi.bios.date: 03/31/2021
dmi.bios.release: 1.32
dmi.bios.vendor: LENOVO
dmi.bios.version: O4VKT32A
dmi.board.asset.tag: INVALID
dmi.board.name: 371F
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40688 WIN 3424143288435
dmi.chassis.type: 13
dmi.chassis.vendor: LENOVO
dmi.chassis.version: 0.1
dmi.ec.firmware.release: 1.13
dmi.modalias: dmi:bvnLENOVO:bvrO4VKT32A:bd03/31/2021:br1.32:efr1.13:svnLENOVO:pnF0FA0066UA:pvrIdeaCentreAIO527IMB05:rvnLENOVO:rn371F:rvrSDK0J40688WIN3424143288435:cvnLENOVO:ct13:cvr0.1:
dmi.product.family: IdeaCentre AIO 5 27IMB05
dmi.product.name: F0FA0066UA
dmi.product.sku: LENOVO_MT_F0FA_BU_Lenovo_FM_IdeaCentre AIO 5 27IMB05
dmi.product.version: IdeaCentre AIO 5 27IMB05
dmi.sys.vendor: LENOVO

Revision history for this message
Anton Sudak (anton-sudak) wrote :
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
Chris Chiu (mschiu77) wrote :

Hi Anton, Can you provide the content of /sys/kernel/debug/hid/xxxx:17ef:60a9.yyyy/rdesc and the output of /sys/kernel/debug/hid/xxxx:17ef:60a9.yyyy/events when you press Fn+F4 and Fn+F10? It will help us understand the PTP message format to parse the raw data from the hiddev.

Revision history for this message
Anton Sudak (anton-sudak) wrote :

Hi Chris,
Here is output of the cat /sys/kernel/debug/hid/0003\:17EF\:60A9.0003/events

report (size 3) (numbered) = 01 00 00 # for Fn+F4

report (size 3) (numbered) = 01 00 00 # for Fn+F10

I've added rdesc as attachment as it quite long.

Revision history for this message
Chris Chiu (mschiu77) wrote (last edit ):

Thanks for the information.

From the rdesc, the raw report data (01 00 00) does not match may valid HID_USAGE_PAGE/HID_USAGE. That's why they are not processed.

From the raw data by the command cat /dev/usb/hiddev0 | hexdump -v -e '/1 "%02X\n"', it seems that the data is MicroSoft specific usage page and the usage is 0xDC for mute key and 0xDB for Fn+F10.

Can you give me the raw data in parallel (cat /dev/usb/hidddev0 and the /sys/kernel/debug/hid/0003:17ef:60a9.0003/events)? I want to identify the code for HID_USAGE_PAGE/HID_USAGE when Fn+F4 and Fn+F10. When that's confirmed, I'll send you a customized kernel for verification and trying to fix it in our release.

Revision history for this message
Anton Sudak (anton-sudak) wrote :

Hi Chris,

Here is what I've got running these command in parallel
mute:
# cat /dev/usb/hiddev0 | hexdump -v -e '/1 "%02X\n"'
00 00 00 FF DC 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 FF 00 00 00 00

# cat /sys/kernel/debug/hid/0003\:17EF\:60A9.0003/events

report (size 3) (numbered) = 01 00 00

Fn+F10:
# cat /dev/usb/hiddev0 | hexdump -v -e '/1 "%02X\n"'
00 00 00 FF DB 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 FF 00 00 00 00

# cat /sys/kernel/debug/hid/0003\:17EF\:60A9.0003/events

report (size 3) (numbered) = 01 00 00

Revision history for this message
Chris Chiu (mschiu77) wrote (last edit ):

I've built a kernel to map the MIC-MUTE key (Fn+F4) in https://people.canonical.com/~mschiu77/lp1927545/. Could you help test the mic mute function and give me the dmesg output when you press Fn+F4? Thanks

The Fn+F10 (Scissors) is probably MS Windows specific. I can't find an appropriate mapping for it so I'll leave it as-is.

Revision history for this message
Anton Sudak (anton-sudak) wrote :

I've checked provided kernel and seems nothing has changed. Keys still does't work and dmesg is sielent when I'm pressing mic mute.

For Fn+F10 it seems that the closest behavior would be to take selective screenshot. But if there is no such event defined that it might be mapped as a generic Fn button so it still could be used.

Revision history for this message
Chris Chiu (mschiu77) wrote :

Sorry that I forget the add the VID/PID to the hid quirk table.
Could you help me verify the kernel in https://people.canonical.com/~mschiu77/lp1927545/v2? Thanks

Revision history for this message
Anton Sudak (anton-sudak) wrote :

With v2 both keyboard and mouse from Lenovo Essentials set stopped to work. Fortunately I had a replacement so I still was able to check what happens. Seems that they stopped to be recognized as input devices, at least there were no messages like following in dmesg

input: Primax Lenovo Essential Wireless Keyboard and Mouse Combo as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/0003:17EF:60A9.0001/input/input3
hid-generic 0003:17EF:60A9.0001: input,hidraw0: USB HID v1.11 Keyboard [Primax Lenovo Essential Wireless Keyboard and Mouse Combo] on usb-0000:00:14.0-5/input0
input: Primax Lenovo Essential Wireless Keyboard and Mouse Combo as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.1/0003:17EF:60A9.0002/input/input4
hid-generic 0003:17EF:60A9.0002: input,hidraw1: USB HID v1.11 Mouse [Primax Lenovo Essential Wireless Keyboard and Mouse Combo] on usb-0000:00:14.0-5/input1
input: Primax Lenovo Essential Wireless Keyboard and Mouse Combo as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.2/0003:17EF:60A9.0003/input/input5

Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Chris Chiu (mschiu77) wrote :

My bad. The USB VID/PID seem to be incorrect in my quirk. Please try https://people.canonical.com/~mschiu77/lp1927545/v3 and post me the output when pressing Fn+F4. Thanks.

Revision history for this message
Anton Sudak (anton-sudak) wrote :

Keyboard worked with new kernel, however Fn+F4 still doesn't functional. I've also noticed that mouse middle button stopped to work (both scrolling and clicking) on this version.
dmesg doesn't show anything on pressing Fn+F4.

Revision history for this message
Chris Chiu (mschiu77) wrote :

Can you give me the dmesg from boot? I can at least know how the HID do the input mapping.

Revision history for this message
Anton Sudak (anton-sudak) wrote :

Sure, here it is.

Revision history for this message
Chris Chiu (mschiu77) wrote :

Thanks. Since the HID USAGE page is not found in the report descriptor, I can only quirk this in process_events function instead of input_mapping. I need some more information. Could u help me test the kernel in https://people.canonical.com/~mschiu77/lp1927545/v4 and give me the dmesg output which includes the Fn+F4 keypressing. Thanks.

Revision history for this message
Anton Sudak (anton-sudak) wrote :

v4 folder seems empty for me. Am I overlooking something?

Revision history for this message
Chris Chiu (mschiu77) wrote :

Sorry that I didn't double check to verify if the image upload succeeds or not. It should be there now.

Revision history for this message
Anton Sudak (anton-sudak) wrote :

No worries, thats might happen for everyone.

Some good news, now there is some reaction on both keys in dmesg:

[ 28.599434] (efault) data 0x0:0x00x0

Message is the same for Fn+F4 and Fn+F10.

Mouse still work in weird way with mouse wheel not working. There is also a quirk that restart entry in gnome-shell reacts only on right click, left-clicking makes menu disappear.

Revision history for this message
Chris Chiu (mschiu77) wrote :

That's the confusing part if the lenovo_raw_event report the same for different key combinations. I'll need more information. Please use the kernel in https://people.canonical.com/~mschiu77/lp1927545/v5 and post the dmesg when pressing Fn+F4 and Fn+F10. Thanks.

Revision history for this message
Anton Sudak (anton-sudak) wrote :

Here is what dmesg shows now:

Fn+F4
[ 90.603608] lenovo_raw_event data 0x1:0x0:0x0
[ 90.603611] report id/type/app: 3223070016/1/0 maxfield: 786433
[ 90.603612] field 0 hid usage hid: 0x0c0000 index 0x000000

Fn+F10
[ 95.779641] lenovo_raw_event data 0x1:0x0:0x0
[ 95.779652] report id/type/app: 3223070016/1/0 maxfield: 786433
[ 95.779670] field 0 hid usage hid: 0x0c0000 index 0x000000

Revision history for this message
Chris Chiu (mschiu77) wrote :

It's a pity that there's nothing distinguishable for them. I'll need more information. Please help try https://people.canonical.com/~mschiu77/lp1927545/v6/. Thanks

Revision history for this message
Anton Sudak (anton-sudak) wrote :

Here what I was able to extract with the latest kernel:

Fn+F4
[ 44.615947] lenovo_raw_event data 0x1:0x0:0x0
[ 44.615950] report id/type/app: 1/0/786433 maxfield: 1
[ 44.615952] field 0 physical: 0x000000 logical 0x000000 app 0x0c0001 flags 0x000000, max usage 573
[ 44.615953] usage 0 hid: 0x0c0000 index 0x000000 code 0x00 type 0x0

Fn+F10
[ 51.971153] lenovo_raw_event data 0x1:0x0:0x0
[ 51.971183] report id/type/app: 1/0/786433 maxfield: 1
[ 51.971185] field 0 physical: 0x000000 logical 0x000000 app 0x0c0001 flags 0x000000, max usage 573
[ 51.971188] usage 0 hid: 0x0c0000 index 0x000000 code 0x00 type 0x0

After pressing fn+Fx keys keyboard and mouse stopped to work and last line in logs above was printed forever.

Revision history for this message
Chris Chiu (mschiu77) wrote :

Please also give me the full dmesg after boot of v6. I need to know the input mapping for the very specific HID usage 0x0c0000. Thanks.

Revision history for this message
Anton Sudak (anton-sudak) wrote :

Hi Chris, difference between full log and one I attached to previous comment is that in the full one contained line "usage 0 hid: 0x0c0000 index 0x000000 code 0x00 type 0x0" repeated endlessly. I rebooted system once log file was filled with that line up to ~150 mb. If anything else should be in that log then it didn't appear in about minute after pressing keys.

Revision history for this message
Chris Chiu (mschiu77) wrote :

I build a kernel in https://people.canonical.com/~mschiu77/lp1927545/v6/ that won't print the raw event add add keymap for the HID usage 0x0c0000. Seems that there's no way to distinguish Fn+F4 and Fn+F10. I add a verbose print in lenovo_event to get the value for the difference (I expect the value to be 0xdc for Fn+F4, 0xdb for the other). Please help me test it if time permits. Thanks.

Revision history for this message
Anton Sudak (anton-sudak) wrote :

I believe you are talking about v7 kernel. I've tried it and for this version dmesg was sielent on Fn+F4 and Fn+F10 pressing.

Revision history for this message
Chris Chiu (mschiu77) wrote (last edit ):

Yes. It's v7 and it should be silent to avoid the endless debug messages you mentioned. Could you give me the full dmesg because it should have the input mapping for the hid usage 0x0c0000?

So the mic mute function still not working? And how about the mouse wheel? Is it affected?
If the mic mute function not working on v7, please try v8 and post me the full dmesg log. Thanks.

Revision history for this message
Anton Sudak (anton-sudak) wrote :

With v7 it seems that Fn+F4 and Fn+F10 still do nothing, however other media keys got Mute Mic mapping as well as their primary function. For example if I press Vol+ I hear that volume increased but also GNOME shows that microphone become muted. This happens for mute, vol+, vol- and playback control keys. This seems also bugs window manager since after pressing media key input from keyboard become unavailable until I switch to another window.
As for mouse it works as expected now.

Revision history for this message
Chris Chiu (mschiu77) wrote :

How about v8? It has different mapping for the Fn+F4.

Revision history for this message
Anton Sudak (anton-sudak) wrote :

Media keys back to normal, mouse is ok too, but Fn+F4 and Fn+F10 are not working.

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.