You are not logged in.
Hi all,
I recently installed arch linux on my laptop(Lenove Ideapad s540 14) ,but the builtin AT 2 keyboard not working well both in live system and after installation. keyboard works fine in GRUB and BIOS (also fine in windows11). But not working in log in session for arch linux both in default kernel and lts kernel.
No input can be detected no matter how long you leave it there, but some random typing may get the keyboard detected and working. whenever the keyboard works ,the cursor is laggy in the upper part of the screen and fluent in the lower part of the screen.
I'm sure the linux-firmware ,xorg are installed and I think the i8042 module and atkbd module are loaded correctly . Here are some informations:
[youzark@youzark ~]$ lsmod | grep 'atkbd\|i8042'
atkbd 36864 0
libps2 20480 1 atkbd
i8042 45056 1 ideapad_laptop
serio 28672 4 serio_raw,atkbd,i8042
[youzark@youzark ~]$ sudo dmesg | grep i8042
[ 0.970196] i8042: PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
[ 0.970198] i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
[ 0.971224] serio: i8042 KBD port at 0x60,0x64 irq 1
Any suggestion?
Thanks
youzark
Offline
It seems that libinput cannot detect my keyboard, here is some info by ssh connection:
[youzark@youzark ~]$ sudo libinput debug-events
-event11 DEVICE_ADDED Video Bus seat0 default group1 cap:k
-event0 DEVICE_ADDED Lid Switch seat0 default group2 cap:S
-event1 DEVICE_ADDED Power Button seat0 default group3 cap:k
-event2 DEVICE_ADDED Sleep Button seat0 default group4 cap:k
-event9 DEVICE_ADDED Integrated Camera: Integrated C seat0 default group5 cap:k
-event10 DEVICE_ADDED Integrated Camera: Integrated I seat0 default group5 cap:k
-event7 DEVICE_ADDED MSFT0001:00 06CB:CE44 Mouse seat0 default group6 cap:p left scroll-nat scroll-button
-event8 DEVICE_ADDED MSFT0001:00 06CB:CE44 Touchpad seat0 default group6 cap:pg size 117x72mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on
-event5 DEVICE_ADDED Ideapad extra buttons seat0 default group7 cap:k
-event3 DEVICE_ADDED Intel HID events seat0 default group8 cap:k
-event4 DEVICE_ADDED Intel HID 5 button array seat0 default group9 cap:k
no AT2 keyboard was found . But if the keyboard works after typing some random characters , this line will be added:
-event12 DEVICE_ADDED AT Translated Set 2 keyboard seat0 default group10 cap:k
any suggestion on why libinput cannot find my keyboard on boot , only after some random key strokes .
Thanks a lot.
Offline
[ 0.970198] i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
Offline
thanks for reply.
I have two laptops , both give the message you mentioned , only one of them not work . I don't know what AUX port does, but it seems not where the problem lies.
the keyboard doesn't even work on tty . (Ctrl + alt + number) wont change tty. So I think the keyboard is not recognized on boot(before xorg start) , so don't work even in tty.
But I don't know which part of the kernel is responsible for input device detection before libinput.
Offline
I have two laptops
Same model?
it seems I belive this is not where the problem lies.
ftfy, please try to disable pnp
I think the keyboard is not recognized on boot
I'm pretty sure about that.
About the random characters make it show up, please post a system journal (sudo journalctl -b | curl -F 'f:1=<-' ix.io) and see https://wiki.archlinux.org/title/Haveged and https://wiki.debian.org/BoottimeEntropyStarvation - maybe the crng is late and causes random issues.
Offline
Thanks for all your suggestions
and apologize for my bad grammar .
I disable the pnp and keyboard still not working.
[youzark@youzark ~]$ sudo dmesg | grep i8042
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=5b7b47e5-d6ba-418c-9a54-c8ba68f4b99a rw loglevel=3 quiet i8042.nopnp
[ 0.031615] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=5b7b47e5-d6ba-418c-9a54-c8ba68f4b99a rw loglevel=3 quiet i8042.nopnp
[ 0.951812] i8042: PNP detection disabled
[ 1.223570] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 119.964114] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input104
Here is the system journal and I don't know how to read it.
system journal
The system entropy is really low as you guessed (around 80 after boot) and drop really fast ( hundreds per minute) . But install haveged didn't solve the problem .
And even if the entropy is above 1500(by using touchpad randomly after boot), still need some random typing to get keyboard recognized .And typing really increase the entropy although keyboard not recognized .
Thanks again for the help .
Offline
Does it show in "evtest"?
Try insntead passing
i8042.unlock i8042.reset i8042.kbdreset
LENOVO 82NC/LNVNB161216
Yoga? Chromebook?
Is the other (working) device the same model?
You should be eligible for "random.trust_cpu=on" instead of haveged
Offline
Does it show in "evtest"?
No , not before the keyboard can have any input .(AT2 entry does show in evtest after detected )
Actually in system journal , I can find input event init info like this:
Feb 16 16:15:48 youzark kernel: input: Intel HID 5 button array as /devices/platform/INTC1051:00/input/input5
but no such entry for keyboard.
Yoga? Chromebook?
Is the other (working) device the same model?
Lenove Idea S540 14(also called xiaoxin pad 2021 , i5-11300H) ,
The other device is Lenovo Idea S540 13. and the keyboard works fine for years.
You should be eligible for "random.trust_cpu=on" instead of haveged
That works ,thanks. I mean the keyboard still don't work . But the system boot with entropy 172(still kind of slow) and grows slowly rather than drop dramatically.
Here is new system log
system journal
Thanks again!
Offline
Feb 16 16:15:48 youzark kernel: i8042: PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
Feb 16 16:15:48 youzark kernel: hub 1-0:1.0: USB hub found
Feb 16 16:15:48 youzark kernel: i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
Feb 16 16:15:48 youzark kernel: hub 1-0:1.0: 1 port detected
Feb 16 16:15:48 youzark kernel: xhci_hcd 0000:00:0d.0: xHCI Host Controller
Feb 16 16:15:48 youzark kernel: xhci_hcd 0000:00:0d.0: new USB bus registered, assigned bus number 2
Feb 16 16:15:48 youzark kernel: xhci_hcd 0000:00:0d.0: Host supports USB 3.1 Enhanced SuperSpeed
Feb 16 16:15:48 youzark kernel: usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.16
Feb 16 16:15:48 youzark kernel: usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Feb 16 16:15:48 youzark kernel: usb usb2: Product: xHCI Host Controller
Feb 16 16:15:48 youzark kernel: usb usb2: Manufacturer: Linux 5.16.9-arch1-1 xhci-hcd
Feb 16 16:15:48 youzark kernel: usb usb2: SerialNumber: 0000:00:0d.0
Feb 16 16:15:48 youzark kernel: hub 2-0:1.0: USB hub found
Feb 16 16:15:48 youzark kernel: hub 2-0:1.0: 4 ports detected
Feb 16 16:15:48 youzark kernel: xhci_hcd 0000:00:14.0: xHCI Host Controller
Feb 16 16:15:48 youzark kernel: xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 3
Feb 16 16:15:48 youzark kernel: serio: i8042 KBD port at 0x60,0x64 irq 1
Feb 16 16:15:48 youzark kernel: xhci_hcd 0000:00:14.0: hcc params 0x20007fc1 hci version 0x120 quirks 0x0000000000009810
Feb 16 16:15:48 youzark kernel: usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.16
Feb 16 16:15:48 youzark kernel: usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Feb 16 16:15:48 youzark kernel: usb usb3: Product: xHCI Host Controller
Feb 16 16:15:48 youzark kernel: usb usb3: Manufacturer: Linux 5.16.9-arch1-1 xhci-hcd
Feb 16 16:15:48 youzark kernel: usb usb3: SerialNumber: 0000:00:14.0
Feb 16 16:15:48 youzark kernel: hub 3-0:1.0: USB hub found
Feb 16 16:15:48 youzark kernel: hub 3-0:1.0: 12 ports detected
Feb 16 16:15:48 youzark kernel: xhci_hcd 0000:00:14.0: xHCI Host Controller
The keyboard is there and there's no indication of it showing up (again) anywhen later.
Do you have legacy usb support enabled in the UEFI/BIOS?
Offline
The UEFI don't have legacy usb support option.
Offline
And the model is Lenovo XiaoXinPro 14IHU 2021 , CPU : 11th Gen Intel i5-11320
I get it wrong before
Offline
Feb 16 16:15:48 youzark kernel: usb: port power management may be unreliable
It's a pretty wild guess, but try to disable https://wiki.archlinux.org/title/Power_ … utosuspend ("usbcore.autosuspend=-1")
Offline
Thanks for that , but the system parameter "usbcore.autosuspend=-1" doesn't solve the problem.
To get more information , I open debug info for udev ,and I get some additional information:
after boot , before keyboard detected:
[youzark@youzark ~]$ cat oldlog | grep keyboard
Feb 17 07:56:04 youzark systemd-udevd[259]: keyboard: Device is queued (SEQNUM=2760, ACTION=add)
Feb 17 07:56:04 youzark systemd-udevd[259]: keyboard: Device ready for processing (SEQNUM=2760, ACTION=add)
Feb 17 07:56:04 youzark systemd-udevd[259]: keyboard: sd-device-monitor: Passed 143 byte to netlink monitor
Feb 17 07:56:04 youzark systemd-udevd[265]: keyboard: Processing device (SEQNUM=2760, ACTION=add)
Feb 17 07:56:04 youzark systemd-udevd[265]: keyboard: Device processed (SEQNUM=2760, ACTION=add)
Feb 17 07:56:04 youzark systemd-udevd[265]: keyboard: sd-device-monitor: Passed 143 byte to netlink monitor
Feb 17 07:56:05 youzark systemd-udevd[269]: event5: /usr/lib/udev/rules.d/60-evdev.rules:23 Importing properties from results of builtin command 'keyboard'
Feb 17 07:56:05 youzark systemd-udevd[269]: event5: keyboard: mapping scan code 8 (0x8) to key code 190 (0xbe)
Feb 17 07:56:05 youzark systemd-udevd[269]: event5: keyboard: mapping scan code 13 (0xd) to key code 247 (0xf7)
Feb 17 07:56:05 youzark systemd-udevd[269]: event5: keyboard: mapping scan code 66 (0x42) to key code 193 (0xc1)
Feb 17 07:56:05 youzark systemd-udevd[269]: event5: keyboard: mapping scan code 67 (0x43) to key code 192 (0xc0)
after boot , after keyboard detected:
Feb 17 07:56:04 youzark systemd-udevd[259]: keyboard: Device is queued (SEQNUM=2760, ACTION=add)
Feb 17 07:56:04 youzark systemd-udevd[259]: keyboard: Device ready for processing (SEQNUM=2760, ACTION=add)
Feb 17 07:56:04 youzark systemd-udevd[259]: keyboard: sd-device-monitor: Passed 143 byte to netlink monitor
Feb 17 07:56:04 youzark systemd-udevd[265]: keyboard: Processing device (SEQNUM=2760, ACTION=add)
Feb 17 07:56:04 youzark systemd-udevd[265]: keyboard: Device processed (SEQNUM=2760, ACTION=add)
Feb 17 07:56:04 youzark systemd-udevd[265]: keyboard: sd-device-monitor: Passed 143 byte to netlink monitor
Feb 17 07:56:05 youzark systemd-udevd[269]: event5: /usr/lib/udev/rules.d/60-evdev.rules:23 Importing properties from results of builtin command 'keyboard'
Feb 17 07:56:05 youzark systemd-udevd[269]: event5: keyboard: mapping scan code 8 (0x8) to key code 190 (0xbe)
Feb 17 07:56:05 youzark systemd-udevd[269]: event5: keyboard: mapping scan code 13 (0xd) to key code 247 (0xf7)
Feb 17 07:56:05 youzark systemd-udevd[269]: event5: keyboard: mapping scan code 66 (0x42) to key code 193 (0xc1)
Feb 17 07:56:05 youzark systemd-udevd[269]: event5: keyboard: mapping scan code 67 (0x43) to key code 192 (0xc0)
Feb 17 08:14:33 youzark kernel: input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input58
Feb 17 08:14:33 youzark systemd-udevd[529]: event12: /usr/lib/udev/rules.d/60-evdev.rules:18 Importing properties from results
of builtin command 'hwdb 'evdev:name:AT Translated Set 2 keyboard:phys:isa0060/serio0/input0:ev:120013:dmi:bvnLENOVO:bvrFJCN65WW:bd07/22/2021:br1.65:efr1.30:svnLENOVO:pn82NC:pvrLenovoXiaoXinPro14IHU2021:rvnLENOVO:rnLNVNB161216:rvrSDK0T76479WIN:cvnLENOVO:ct10:cvrLenovoXiaoXinPro14IHU2021:skuLENOVO_MT_82NC_BU_idea_FM_XiaoXinPro14IHU2021:''
Feb 17 08:14:33 youzark systemd-udevd[529]: event12: /usr/lib/udev/rules.d/60-evdev.rules:18 Failed to run builtin 'hwdb 'evdev:name:AT Translated Set 2 keyboard:phys:isa0060/serio0/input0:ev:120013:dmi:bvnLENOVO:bvrFJCN65WW:bd07/22/2021:br1.65:efr1.30:svnLENOVO:pn82NC:pvrLenovoXiaoXinPro14IHU2021:rvnLENOVO:rnLNVNB161216:rvrSDK0T76479WIN:cvnLENOVO:ct10:cvrLenovoXiaoXinPro14IHU2021:skuLENOVO_MT_82NC_BU_idea_FM_XiaoXinPro14IHU2021:'': No data available
Feb 17 08:14:33 youzark systemd-udevd[529]: event12: /usr/lib/udev/rules.d/60-evdev.rules:23 Importing properties from results of builtin command 'hwdb 'evdev:name:AT Translated Set 2 keyboard:dmi:bvnLENOVO:bvrFJCN65WW:bd07/22/2021:br1.65:efr1.30:svnLENOVO:pn82NC:pvrLenovoXiaoXinPro14IHU2021:rvnLENOVO:rnLNVNB161216:rvrSDK0T76479WIN:cvnLENOVO:ct10:cvrLenovoXiaoXinPro14IHU2021:skuLENOVO_MT_82NC_BU_idea_FM_XiaoXinPro14IHU2021:''
Feb 17 08:14:33 youzark systemd-udevd[529]: event12: /usr/lib/udev/rules.d/60-evdev.rules:23 Failed to run builtin 'hwdb 'evdev:name:AT Translated Set 2 keyboard:dmi:bvnLENOVO:bvrFJCN65WW:bd07/22/2021:br1.65:efr1.30:svnLENOVO:pn82NC:pvrLenovoXiaoXinPro14IHU2021:rvnLENOVO:rnLNVNB161216:rvrSDK0T76479WIN:cvnLENOVO:ct10:cvrLenovoXiaoXinPro14IHU2021:skuLENOVO_MT_82NC_BU_idea_FM_XiaoXinPro14IHU2021:'': No data available
Feb 17 08:14:33 youzark systemd-udevd[529]: event12: /usr/lib/udev/rules.d/65-libwacom.rules:19 Importing properties from results of builtin command 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:AT Translated Set 2 keyboard:''
Feb 17 08:14:33 youzark systemd-udevd[529]: event12: /usr/lib/udev/rules.d/65-libwacom.rules:19 Failed to run builtin 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:AT Translated Set 2 keyboard:'': No data available
Feb 17 08:14:33 youzark systemd-logind[335]: Watching system buttons on /dev/input/event12 (AT Translated Set 2 keyboard)
I believe the input core fail to probe the AT-2 Keyboard ,after:
Feb 17 08:14:33 youzark kernel: input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input58
the udev works fine .
Any suggestion on how to debug Linux core? I'm trying to read the doc.
Thanks A Lot!
The journal:(it seems the original journal file is to big to post by ix.io , I filter by grep keyboard\|input\|i8042)
journal before keyboard detection
journal after keyboard detection
Offline
The keyboard only shows up w/ that line, there're just no matching udev rules but that's not your problem, because the keyboard isn't available at all before this.
keyboard works fine … in windows11
See the 3rd link below - it would be one of the more weird outcomes, but right now there's not much else left.
Offline
I don't have windows available on my machine , should I install windows , turn off the Fast-boot and reinstall linux ? Or are there some simpler way . Thanks.
Btw, It seems opensuse can detect the keyboard more often , still got times when keyboard not recognized after sleep. I didn't try too many times.
Offline
Then how did you make that assertion?
If it's not because of a hibernating windows, I meanwhile suspect defective hardware and completely random behavior. Maybe tied to cold/warm boots.
Offline
The original system is window11 and I've already uninstall it . The keyboard works on original system . (Btw, to install arch , I disabled secure boot which cause window11 to bitlock the system , and only F1~F12 works , but I get it recovered before uninstall windows ).
Now I get only one system (arch linux ) on my Computer.The efi partition has been reformatted several time and it's no way the original windows system will affect the current linux one (unless through UEFI?)
It's a new computer , I use it only for hours in Windows11 before install arch . And keyboard always worked fine in windows.I also suspect it's defective hardware but I don't know how to convince the retailer. They insist it's the problem of OS(lack of driver support for newly updated cpu and motherboard) and they refuse to provide linux support.
I wonder if there is any way to load the driver manually or debug input core to find why the core didn't recognize the keyboard on boot.But I don't know how to get it done and the document is insufficient.
Whatever, really thanks the help you offered .Even if the keyboard doesn't work at last, it's a good journey through arch for me on you guide , thanks really .
Offline
It's more likely that the system was locked and failed to unlock because of the disabled secure boot - but I don't see how this relates to the keyboard.
What about the grub assertion? Is it (still) fully functional there? Ie. can you eg. press "e" to edit the kernel command line and the enter random text (and so the assertion isn't limited to the cursor keys and maybe enter)?
Offline
The keyboard works in GRUB shell well
Offline
it's confusing for me that the keyboard works fine in GRUB but not after the kernel is loaded.
One doc(I forget which) said hard devices will be probed twice in boot process , once on power on and once when the kernel is loading. And in my case , I believe it's the second time failed.
I'm trying to find which function in input core generate the following journal entry:
Feb 17 08:14:33 youzark kernel: input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input58
GRUB shell works fine before this information and udev works fine after this information.I think it's the function that generate this info failed to detect the keyboard and and add it to internal device queue(also device info database).But I don't know how to locate this function and also don't know if it fetches device info from BIOS or scan all the ports on computer for devices.
According to arch wiki:
udev is responsible for registering handlers between input core and user space.
But I can't find a doc on which part of the kernel is responsible for connecting drives and input core in this picture
Also ,if the keyboard works fine in GRUB ,does that mean the hardware is fine?
Offline
if the keyboard works fine in GRUB, does that mean the hardware is fine?
Yes, but that doesn't explain the late detection of the keyboard.
Try
i8042.notimeout i8042.nopnp
and if that's still not enough, add i8042 to the initramfs - https://wiki.archlinux.org/title/Mkinitcpio#MODULES
Offline
No none of them work. I also tried to add atkbd to mkinitcpio.conf module list and re-generate.
Still not work.
i8042 and atkbd modules always exist in lsmod output no matter the keyboard works or not.
Offline
If you ssh into the system as long as the keyboard doesn't work and "modprobe -r atkbd i8042; sleep 1; modprobe i8042; modprobe atkbd" - does the keyboard show up and function?
Offline
Yes, I always enter my system with ssh . Most of the journal I provide was get from ssh login . No matter keyboard is detected or not , the atkbd and i8042 module loaded fine. the only different before and after keyboard is detected(with random key strokes) in journal is this info:
Feb 17 08:14:33 youzark kernel: input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input58
This shows up exactly after the keyboard is activated with random typing. And only after that , udev can find keyboard info in hwdb.(everything starts to work fine)
Offline
Yes, I always enter my system with ssh . Most of the journal I provide was get from ssh login . No matter keyboard is detected or not , the atkbd and i8042 module loaded fine. the only different before and after keyboard is detected(with random key strokes) in journal is this info:
Feb 17 08:14:33 youzark kernel: input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input58
This shows up exactly after the keyboard is activated with random typing. And only after that , udev can find keyboard info in hwdb.(everything starts to work fine)
Offline