Repeated keys stop after a few characters (^@ character spam every second)

Bug #1720219 reported by Tamás Ferenc
78
This bug affects 12 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Joseph Salisbury
Artful
Won't Fix
Medium
Joseph Salisbury

Bug Description

Long pressing a key will only repeat a few characters or won't repeat at all in the default 17.10 GNOME environment, it affects all keys including backspace and arrows.

It isn't application specific, the problem is always there whether be it terminal or firefox.

Setting the repeat delay to 0 will instantly trigger it, however it will still stop after a few characters.

I freshly installed 17.10 on a Lenovo Ideapad 700, I haven't had the problem in 16.04 with GNOME 3.22.

Edit: Happens in Xorg as well.
---
ApportVersion: 2.20.7-0ubuntu1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/pcmC0D0p: fecka 1156 F...m pulseaudio
 /dev/snd/controlC0: fecka 1156 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 17.10
InstallationDate: Installed on 2017-09-28 (0 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170924)
MachineType: LENOVO 80RU
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-12-generic root=UUID=ec711d91-c22f-4be9-8820-b1bdca284667 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 4.13.0-12.13-generic 4.13.3
RelatedPackageVersions:
 linux-restricted-modules-4.13.0-12-generic N/A
 linux-backports-modules-4.13.0-12-generic N/A
 linux-firmware 1.168
Tags: artful wayland-session
Uname: Linux 4.13.0-12-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 09/29/2016
dmi.bios.vendor: LENOVO
dmi.bios.version: E5CN56WW
dmi.board.asset.tag: No Asset Tag
dmi.board.name: Lenovo ideapad 700-15ISK
dmi.board.vendor: LENOVO
dmi.board.version: NO DPK
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo ideapad 700-15ISK
dmi.modalias: dmi:bvnLENOVO:bvrE5CN56WW:bd09/29/2016:svnLENOVO:pn80RU:pvrLenovoideapad700-15ISK:rvnLENOVO:rnLenovoideapad700-15ISK:rvrNODPK:cvnLENOVO:ct10:cvrLenovoideapad700-15ISK:
dmi.product.family: IDEAPAD
dmi.product.name: 80RU
dmi.product.version: Lenovo ideapad 700-15ISK
dmi.sys.vendor: LENOVO
---
ApportVersion: 2.20.7-0ubuntu1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/pcmC0D0p: fecka 1156 F...m pulseaudio
 /dev/snd/controlC0: fecka 1156 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 17.10
InstallationDate: Installed on 2017-09-28 (0 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170924)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 005: ID 0bda:0821 Realtek Semiconductor Corp.
 Bus 001 Device 004: ID 174f:14e6 Syntek
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: LENOVO 80RU
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-12-generic root=UUID=ec711d91-c22f-4be9-8820-b1bdca284667 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 4.13.0-12.13-generic 4.13.3
RelatedPackageVersions:
 linux-restricted-modules-4.13.0-12-generic N/A
 linux-backports-modules-4.13.0-12-generic N/A
 linux-firmware 1.168
Tags: artful wayland-session
Uname: Linux 4.13.0-12-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 09/29/2016
dmi.bios.vendor: LENOVO
dmi.bios.version: E5CN56WW
dmi.board.asset.tag: No Asset Tag
dmi.board.name: Lenovo ideapad 700-15ISK
dmi.board.vendor: LENOVO
dmi.board.version: NO DPK
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo ideapad 700-15ISK
dmi.modalias: dmi:bvnLENOVO:bvrE5CN56WW:bd09/29/2016:svnLENOVO:pn80RU:pvrLenovoideapad700-15ISK:rvnLENOVO:rnLenovoideapad700-15ISK:rvrNODPK:cvnLENOVO:ct10:cvrLenovoideapad700-15ISK:
dmi.product.family: IDEAPAD
dmi.product.name: 80RU
dmi.product.version: Lenovo ideapad 700-15ISK
dmi.sys.vendor: LENOVO

Tamás Ferenc (fecka)
description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1720219/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Tamás Ferenc (fecka)
affects: ubuntu → linux (Ubuntu)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1720219

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Tamás Ferenc (fecka) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected artful wayland-session
description: updated
Revision history for this message
Tamás Ferenc (fecka) wrote : CRDA.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : IwConfig.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : JournalErrors.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : Lspci.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : Lsusb.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : ProcEnviron.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : ProcModules.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : PulseList.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : RfKill.txt

apport information

description: updated
Revision history for this message
Tamás Ferenc (fecka) wrote : AlsaInfo.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : CRDA.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : IwConfig.txt

apport information

Revision history for this message
Tamás Ferenc (fecka) wrote : JournalErrors.txt

apport information

Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Re: Repeated keys stop after a few characters

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.14 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14-rc2/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Change to multi-user:
$ sudo systemctl isolate multi-user

See if the issue also happens.

To switch back to GUI,
$ sudo systemctl isolate graphical

Revision history for this message
Tamás Ferenc (fecka) wrote :

Apparently it is caused by a repeated character every second "^@", presumably the keyboard's fn key.

In multi-user, key repeating works, however ^@ is spammed every second.

tags: added: bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
summary: - Repeated keys stop after a few characters
+ Repeated keys stop after a few characters (^@ character spam every
+ second)
Revision history for this message
Tamás Ferenc (fecka) wrote :

Also, it is not a hardware issue, it works fine in windows on the same computer when testing for keyboard events.

The following is what I get from xev:

---

KeyPress event, serial 28, synthetic NO, window 0x2200001,
    root 0x270, subw 0x0, time 354142, (133,154), root:(228,239),
    state 0x0, keycode 221 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2200001,
    root 0x270, subw 0x0, time 354142, (133,154), root:(228,239),
    state 0x0, keycode 221 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x2200001,
    root 0x270, subw 0x0, time 354901, (762,346), root:(857,431),
    state 0x0, keycode 221 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2200001,
    root 0x270, subw 0x0, time 354901, (762,346), root:(857,431),
    state 0x0, keycode 221 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

---

And it goes on endlessly.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Append these two lines to /lib/udev/hwdb.d/60-keyboard.hwdb,

evdev:atkbd:dmi:bvn*:bvr*:svnLENOVO*:pn80RU*:pvr*
 KEYBOARD_KEY_dd=!

Then run the following commands:
$ sudo udevadm control --reload
$ sudo udevadm trigger

Revision history for this message
Tamás Ferenc (fecka) wrote :

Unfortunately the problem still persists after that, and nothing's changed about it.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Can you use evtest and attach the output?

Revision history for this message
Tamás Ferenc (fecka) wrote :

Sure, I tested the "AT Translated Set 2 keyboard" device, and it works as intended.

However the "PEAQ WMI hotkeys" seems to spam a key with a similar 1second-ish interval:

---

Available devices:
/dev/input/event0: Lid Switch
/dev/input/event1: Sleep Button
/dev/input/event2: Power Button
/dev/input/event3: AT Translated Set 2 keyboard
/dev/input/event4: Logitech Optical USB Mouse
/dev/input/event5: ETPS/2 Elantech Touchpad
/dev/input/event6: Video Bus
/dev/input/event7: Video Bus
/dev/input/event8: Ideapad extra buttons
/dev/input/event9: Lenovo EasyCamera: Lenovo EasyC
/dev/input/event10: PEAQ WMI hotkeys
/dev/input/event11: HDA Intel PCH Mic
/dev/input/event12: HDA Intel PCH Front Headphone
/dev/input/event13: HDA Intel PCH HDMI/DP,pcm=3
/dev/input/event14: HDA Intel PCH HDMI/DP,pcm=7
/dev/input/event15: HDA Intel PCH HDMI/DP,pcm=8
/dev/input/event16: HDA Intel PCH HDMI/DP,pcm=9
/dev/input/event17: HDA Intel PCH HDMI/DP,pcm=10
Select the device event number [0-17]: 10
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0
Input device name: "PEAQ WMI hotkeys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 213 (KEY_SOUND)
Properties:
Testing ... (interrupt to exit)
Event: time 1506861386.173675, type 1 (EV_KEY), code 213 (KEY_SOUND), value 1
Event: time 1506861386.173675, -------------- SYN_REPORT ------------
Event: time 1506861386.173682, type 1 (EV_KEY), code 213 (KEY_SOUND), value 0
Event: time 1506861386.173682, -------------- SYN_REPORT ------------
Event: time 1506861386.949789, type 1 (EV_KEY), code 213 (KEY_SOUND), value 1
Event: time 1506861386.949789, -------------- SYN_REPORT ------------
Event: time 1506861386.949810, type 1 (EV_KEY), code 213 (KEY_SOUND), value 0
Event: time 1506861386.949810, -------------- SYN_REPORT ------------
Event: time 1506861387.717773, type 1 (EV_KEY), code 213 (KEY_SOUND), value 1
Event: time 1506861387.717773, -------------- SYN_REPORT ------------
Event: time 1506861387.717793, type 1 (EV_KEY), code 213 (KEY_SOUND), value 0
Event: time 1506861387.717793, -------------- SYN_REPORT ------------
...

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Try v4.14-rc1. There's a new commit for peaq-wmi.

Does the machine have Dolby button?

Revision history for this message
Tamás Ferenc (fecka) wrote :

I've tried it, the problem still persists.

It doesn't have a Dolby button.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
Tamás Ferenc (fecka) wrote :

Yes, that worked! Thank you for the quick fix, you're awesome!

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
Tamás Ferenc (fecka) wrote :

When can I expect it to appear in an Ubuntu update?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Well, it needs to be reviewed and be merged by upstream maintainers. I'll backport the patch after that.

Revision history for this message
Tamás Ferenc (fecka) wrote :

Alright, thanks, I'll stick to the kernel provided by you until then.

Revision history for this message
Tamás Ferenc (fecka) wrote :

Which kernel did you modify? The networking seems to be completely broken in it, and it fails to retrieve an IPv4 address and dhclient instantly timeouts(both wifi and wired).

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

I think that's an AppArmor regression. Use "apparmor=0" kernel parameter should temporarily workaround the issue.

Changed in linux (Ubuntu):
assignee: nobody → Kai-Heng Feng (kaihengfeng)
Revision history for this message
Tamás Ferenc (fecka) wrote :

Yes, it was indeed apparmor.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

peaq-wmi will use whitelist instead of blacklist in the future, you can try the new kernel here:
http://people.canonical.com/~khfeng/lp1720219-2/

Revision history for this message
Tamás Ferenc (fecka) wrote :

Works fine so far, however apparmor still needs to be disabled.

Revision history for this message
fprietog (fprietog) wrote :

Just want to thank all people involved in the solution of this bug.

I just upgraded to Ubuntu 17.10 and I almost get mad with these ^@^@^@^@^@^@^@^@^@^@^@^@ that makes impossible to login in a tty.

Thank you.

Revision history for this message
Eugene Romanenko (eros2) wrote :

Same issue on Lenovo Flex laptop and 17.10.

Revision history for this message
Eugene Romanenko (eros2) wrote :
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

These three commits should be included in next (or next one after that) for 4.13 kernel:

f6c7b8031d7e177c837c23d1065204b697fb54b7 platform/x86: peaq-wmi: Remove unnecessary checks from peaq_wmi_exit
d6fa71f1c003fb2bc824276bb424a4171f9a717f platform/x86: peaq_wmi: Fix missing terminating entry for peaq_dmi_table
3b95206110a2c13076c3a7fa8ddeae36c2dbcf42 platform/x86: peaq-wmi: Add DMI check before binding to the WMI interface

Changed in linux (Ubuntu):
assignee: Kai-Heng Feng (kaihengfeng) → nobody
Revision history for this message
Jarod (jean-rodolphe-letertre) wrote :

I confirm that Workaround proposed by eros2 worked on my laptop Lenovo Flex 14 with Xubuntu 17.10

tags: added: kernel-da-key
Changed in linux (Ubuntu Artful):
importance: Undecided → Medium
status: New → Triaged
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built a test kernel with the three commits posted in comment #46. The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1720219

Can you test this kernel and see if it resolves this bug?

Note, to test this kernel, you need to install both the linux-image and linux-image-extra .deb packages.

Thanks in advance!

Revision history for this message
Wolfenprey (slavelaborx) wrote :

Test kernel in comment #48 by Joseph Salisbury resolves the bug under Lubuntu 16.04., and Lubuntu 17.10.

Revision history for this message
Vidar (vidar-nostvold) wrote :

Bug went away when i installed this:

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15/

The proposals above messed up wireless, couldn't connect to networks.
Lenovo Yoga 500

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

The fixes for this bug will land in Artful via the 4.13.15 stable updates:
https://lists.ubuntu.com/archives/kernel-team/2018-January/089412.html

Revision history for this message
Sergey Fedotov (sr-fido) wrote :

Can we deliver these fixes to xenial? This bug prevents scrot to working, with the error message "Key was pressed, aborting shot" I temporarely disable PEAQ WMI in xorg.conf, but want a proper fix.

Changed in linux (Ubuntu Artful):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Artful):
status: Triaged → In Progress
Changed in linux (Ubuntu):
status: Triaged → In Progress
Changed in linux (Ubuntu Xenial):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Joseph Salisbury (jsalisbury)
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built Xenial and Artful test kernels both with only commit 3b95206110a. The test kernels can be downloaded from:

Artful: http://kernel.ubuntu.com/~jsalisbury/lp1720219/artful/
Xenial: http://kernel.ubuntu.com/~jsalisbury/lp1720219/xenial/

Can those affected by this bug give these kernels a try?

Revision history for this message
Sergey Fedotov (sr-fido) wrote :

Kernel for xenial (4.4.0) successfuly tested. Ghost devices does not appear.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Thanks for testing! I'll be sure these commits are in the pipeline for Xenial and Artful. If not, I'll submit an SRU request.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Commit 3b95206110a is now in the Artful -proposed kernel, 4.13.0-38.

Would it be possible for you to test the proposed kernel and post back if it resolves this bug?
See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed.

Thank you in advance!

Changed in linux (Ubuntu Artful):
status: In Progress → Fix Committed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Commit 3b95206110a was never applied to the upstream stable 4.4.y updates, so I'll submit an SRU request for Xenial.

Changed in linux (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@Sergey, are you seeing this bug with the Xenial HWE kernel or the stock 4.4 kernel? Are there others seeing this bug on Xenial? I don't see that the patch was accepted in upstream stable 4.4, so I'm curious if it is still needed in Xenial.

Revision history for this message
Sergey Fedotov (sr-fido) wrote :

@Joseph Sorry, it is my fault. We are expierencing this bug on Xenial HWE, this is what I meant when asked to fix for Xenial. Unfortunately, we was tested 4.4.0 kernel from your message above. After the weekend, I will be glad to test artful kernel from proposed. :-]

no longer affects: linux (Ubuntu Xenial)
Revision history for this message
Andy Whitcroft (apw) wrote : Closing unsupported series nomination.

This bug was nominated against a series that is no longer supported, ie artful. The bug task representing the artful nomination is being closed as Won't Fix.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu Artful):
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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