Bug 153151 - Commit 4097461897df91041382ff6fcd2bfa7ee6b2448c breaks keyboard input on a Inspiron 1545
Summary: Commit 4097461897df91041382ff6fcd2bfa7ee6b2448c breaks keyboard input on a In...
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: Dmitry Torokhov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-15 14:16 UTC by Bruno Wolff III
Modified: 2016-09-09 12:24 UTC (History)
9 users (show)

See Also:
Kernel Version: 4.8
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
lshw output (20.64 KB, text/plain)
2016-08-15 14:22 UTC, Bruno Wolff III
Details
Regression Test Fix (1.07 KB, patch)
2016-08-15 23:21 UTC, [account disabled by administrator]
Details | Diff
Regression Test Fix 2 (1.04 KB, patch)
2016-08-16 01:28 UTC, [account disabled by administrator]
Details | Diff
dmesg output (73.70 KB, text/x-log)
2016-08-16 17:28 UTC, William Shuman
Details
dmesg output (72.07 KB, text/plain)
2016-08-16 18:26 UTC, Bruno Wolff III
Details
Mutex TryLock Patch (1.07 KB, patch)
2016-08-16 21:54 UTC, [account disabled by administrator]
Details | Diff
Set up ps2_cmd_mutex for AUX ports (1.04 KB, patch)
2016-08-17 00:45 UTC, Dmitry Torokhov
Details | Diff

Description Bruno Wolff III 2016-08-15 14:16:53 UTC
After commit 4097461897df91041382ff6fcd2bfa7ee6b2448c I am unable to enter my luks password during boot. Characters do not echo and the enter key seems to have no effect. I am using an i686 kernel.
Comment 1 Bruno Wolff III 2016-08-15 14:18:39 UTC
I test reverting 4097461897df91041382ff6fcd2bfa7ee6b2448c on top of 118253a593bd1c57de2d1193df1ccffe1abe745b. A kernel built from 118253a593bd1c57de2d1193df1ccffe1abe745b had the problem, but one built with 4097461897df91041382ff6fcd2bfa7ee6b2448c worked.
Comment 2 Bruno Wolff III 2016-08-15 14:22:12 UTC
Created attachment 228901 [details]
lshw output
Comment 3 Bruno Wolff III 2016-08-15 20:13:35 UTC
Let me rewrite comment 2.
A kernel built from commit 118253a593bd1c57de2d1193df1ccffe1abe745b failed with the problem I am reporting. The kernel resulting from reverting 4097461897df91041382ff6fcd2bfa7ee6b2448c from 118253a593bd1c57de2d1193df1ccffe1abe745b worked normally.
Comment 4 [account disabled by administrator] 2016-08-15 23:21:06 UTC
See if the below patch, using different locking depending on locking allocation fixes the regression you are currently seeing.
Comment 5 [account disabled by administrator] 2016-08-15 23:21:22 UTC
Created attachment 228951 [details]
Regression Test Fix
Comment 6 Bruno Wolff III 2016-08-15 23:59:30 UTC
drivers/input/serio/libps2.c: In function ‘ps2_begin_command’:
drivers/input/serio/libps2.c:59:70: error: expected ‘,’ or ‘;’ before ‘:’ token
  struct mutex *m = ps2dev->serio->ps2_cmd_mutex ?: &ps2dev->cmd_mutex: &i8042_mutex;
                                                                      ^
drivers/input/serio/libps2.c: In function ‘ps2_end_command’:
drivers/input/serio/libps2.c:67:70: error: expected ‘,’ or ‘;’ before ‘:’ token
  struct mutex *m = ps2dev->serio->ps2_cmd_mutex ?: &ps2dev->cmd_mutex: &i8042_mutex;
                                                                      ^
scripts/Makefile.build:289: recipe for target 'drivers/input/serio/libps2.o' failed
make[2]: *** [drivers/input/serio/libps2.o] Error 1
Comment 7 [account disabled by administrator] 2016-08-16 01:28:08 UTC
The below patch should build. I am getting warnings with kasan but that's probably because I don't actually have this hardware but if you get it let me known. Further more test it and see if it works or does anything new for this regression.
Comment 8 [account disabled by administrator] 2016-08-16 01:28:27 UTC
Created attachment 228981 [details]
Regression Test Fix 2
Comment 9 Bruno Wolff III 2016-08-16 05:28:58 UTC
I applied the second patch to rc2, but it didn't help. I still got stuck at the luks password prompt.
Comment 10 William Shuman 2016-08-16 12:55:54 UTC
I'm seeing this same behavior on an HP EliteBook 8570w. 4.8rc1 and 4.8rc2.
Comment 11 [account disabled by administrator] 2016-08-16 16:45:27 UTC
Can you send me your dmesg as perhaps something will give us a clue in your boot log.
Comment 12 William Shuman 2016-08-16 17:28:06 UTC
Created attachment 229131 [details]
dmesg output

At 14s it is waiting for my luks password, at 103s I plugged in a usb keyboard to enter the password and continue
Comment 13 William Shuman 2016-08-16 17:48:29 UTC
Got a chance to look at this further.  The i8042 module wasn't included in my initramfs. I'll have to see what caused it not to be included, it was previously included in the 4.7 series. (arch linux using mkinitcpio)
Comment 14 Bruno Wolff III 2016-08-16 18:26:44 UTC
Created attachment 229161 [details]
dmesg output
Comment 15 [account disabled by administrator] 2016-08-16 20:41:56 UTC
See if getting that module loaded fixes the problem as it seems to be that module needs to be loaded for this patch to work.
Comment 16 Bruno Wolff III 2016-08-16 21:07:37 UTC
My .config (which comes from Fedora) has CONFIG_SERIO_I8042=Y . Doesn't that mean the function is built in and doesn't need to be loaded as a module?
Comment 17 [account disabled by administrator] 2016-08-16 21:53:53 UTC
See if the below patch does anything new for you.
Comment 18 [account disabled by administrator] 2016-08-16 21:54:15 UTC
Created attachment 229191 [details]
Mutex TryLock Patch
Comment 19 Bruno Wolff III 2016-08-17 00:22:41 UTC
The Mutex TryLock Patch did not help in my case.
Comment 20 Dmitry Torokhov 2016-08-17 00:45:32 UTC
Created attachment 229201 [details]
Set up ps2_cmd_mutex for AUX ports

Can you please try this patch and let me know if it helps. Thanks!
Comment 21 Dmitry Torokhov 2016-08-17 00:52:33 UTC
And a separate request for Nick Krause: PLEASE STOP WASTING EVERYONE'S TIME! Seriously. If you have no clue why do you feel the need to make everyone jump through the hoops trying your "patches"? You were banned from LKML and other vger lists for a reason, leave bugzilla alone as well.
Comment 22 Bruno Wolff III 2016-08-17 11:51:20 UTC
I applied "Set up ps2_cmd_mutex for AUX ports" to rc2 and it booted normally and appears to be functioning normally.
Thanks.
Comment 23 Dmitry Torokhov 2016-08-17 18:35:25 UTC
Thanks, I'll make sure it gets into mainline and stable.
Comment 24 Marcus 2016-08-25 09:48:46 UTC
Thanks Dmitry, do you know if this will be in 4.8 rc4?
I can't seem to find the pull request to the kernel.
Comment 25 Bruno Wolff III 2016-08-25 19:35:17 UTC
He sent the pull request to Linus today, though Greg got a heads up about it for the stable series earlier.
https://lkml.org/lkml/2016/8/25/512
Comment 26 Maxqia 2016-09-07 12:41:03 UTC
Still have this problem on my ux305la with 4.8rc5, reverting both i8042 commits fixes it, should I report a new bug?
Comment 27 Tobias Powalowski 2016-09-08 09:19:05 UTC
https://bugs.archlinux.org/task/50700
Since yesterday we suffer from not working keyboards in initramfs stage.
Comment 28 Dmitry Torokhov 2016-09-08 17:41:19 UTC
Re #27: I understand you have keyboard input if you add i8042 module to initramfs, right? If so you need to make sure you include it there.

Re #26: what distribution is it? Can I see dmesg?
Comment 29 Maxqia 2016-09-08 19:40:14 UTC
Arch Linux, I tested building i8042 into the kernel and that didn't work for me...
Comment 30 Tobias Powalowski 2016-09-09 06:47:06 UTC
I think we need i8042 libps2 atkbd to get it going, not sure if serio is needed too. Our initramfs tool seems to miss to add one of those. If Maxqia builds in i8042 then there is still something missing, so one of the above mentioned modules have to be added too and slips through autodetection which worked fine before.
Comment 31 Tobias Powalowski 2016-09-09 12:24:59 UTC
We will release a new mkinitcpio wich will have fixed module detection.
Archlinux is fine again after this release.
Sorry for the noise.

Note You need to log in before you can comment on or make changes to this bug.