[SOLVED] USB keyboard and mouse not detected at boot with kernel 5.13.4, 5.12.11 is OK
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
USB keyboard and mouse not detected at boot with kernel 5.13.4, 5.12.11 is OK
System: Slint64-14.2.1 based on Slackware64-14.2
kernel generic + initrd (kernel config very close to the one used for Slackware-current)
Symptom: USB keyboard and mouse don't work after booting so no way to log in when using a 5.13.4 kernel, no issue with 5.12.11. Which is sad as 5.12 is tagged EOL upstream.
I have added a few commands at the end of /etc/rc.d/rc.M to investigate:
I have compared the output of lsmod after booting in both cases, nearly identical.
"modinfo usbhid" gives the same output with both kernels, kernel version put aside.
In dmesg5.12.11 but not in dmesg5.13.4 I find these lines:
Code:
input: Lite-On Technology Corp. USB Multimedia Keyboard as /devices/pci0000:00/0000:00:1c.5/0000:06:00.0/usb3/3-1/3-1:1.0/0003:04CA:005A.0001/input/input0
input: Lite-On Technology Corp. USB Multimedia Keyboard Consumer Control as /devices/pci0000:00/0000:00:1c.5/0000:06:00.0/usb3/3-1/3-1:1.1/0003:04CA:005A.0002/input/input1
input: Lite-On Technology Corp. USB Multimedia Keyboard System Control as /devices/pci0000:00/0000:00:1c.5/0000:06:00.0/usb3/3-1/3-1:1.1/0003:04CA:005A.0002/input/input2
input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1c.5/0000:06:00.0/usb3/3-2/3-2:1.0/0003:046D:C077.0003/input/input3
In lsusb5.12.11 only:
Code:
Bus 003 Device 003: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 003 Device 002: ID 04ca:005a Lite-On Technology Corp. USB Multimedia Keyboard
in the output of cat /proc/bus/input/devices for 5.12.11 only:
System: Slint64-14.2.1 based on Slackware64-14.2
kernel generic + initrd (kernel config very close to the one used for Slackware-current)
Symptom: USB keyboard and mouse don't work after booting so no way to log in when using a 5.13.4 kernel, no issue with 5.12.11. Which is sad as 5.12 is tagged EOL upstream.
I have added a few commands at the end of /etc/rc.d/rc.M to investigate:
Merci marav, but this didn't help (console stuck after that).
I also tried to compare outputs of pstree and ps -ef, which gave no more clue.
As I have Slackware64-current installed on the same machine, I updated this system using slackpkg, which installed kernels huge and generic also at version 5.13.4, to no avail: same symptoms, so I can't log in using either the generic + initrd or the huge one.
Can confirm same behavior here. Unplugging and re-plugging the usb devices (keyboard & mouse) allows them to be recognized. I applied last 4 upgrades at the same time so could not place blame on any one in particular.
Having put "udevadm monitor" in the background (which I should have done from the beginning, *my* mistake) gives interesting results (in Slint in this case), attached.
Should I understand that for some reason the kernel does not send uevents related to the mouse and keyboard so there's nothing eudev can do when using 5.13.4?
How do I confirm or infirm that? scanning /sys to check that the paths are created as they should?
Oh, and yes I have CONFIG_MODPROBE_PATH="/sbin/modprobe"
It appears that the input devices for the mouse and the keyboard are not exposed in the /sys directory in case of the kernel 5.13.4, thus the corresponding uevent files do not exist. So eudev not being informed of theses devices' existence by uevent can't create paths in /dev for them.
Find why /sys is not populated as it should when using a 5.13.4 kernel needs more investigation.
Meanwhile I will provide a kernel 5.12.19 for Slint to stay on the safe side of the world.
PS
@marav: Thanks but I ran geninitrd (with a few modifications in Slint and as is in Slackware) and anyway using the huge kernel in Slackware doesn't help
@ZhaoLin1457: thanks for the hint. Maybe either mkinitrd_command_generator.sh and/or the kernel's configuration need an adaptation (I would assume the latter at least as the huge kernel doesn't help), I don't know yet. There could be a bug in the source code of the kernel, but then someone would have found it already and filed an issue upstream, I assume.
Last edited by Didier Spaier; 07-26-2021 at 12:30 PM.
Reason: PS added.
But I just realized that two USB ports out of 6 on this machine are affected. Maybe a commit applied on 5.2.x and also on 5.13.y is the cause?
Anyway I am uploading kernel packages at version 5.12.19 on the main Slint mirror. At worst users will be able to boot using the kernel in use when applying the upgrade, which will be preserved.
Still I am curious to know a fix: this is still an issue and not only an hardware one, as even with the problematic USB ports the keyboard and mouse work using the kernel 5.12.11. In the mean time I am not ready to build and try all kernels between 5.12.11 and 5.12.19, then do a git bisect to maybe find the offending commit... Any idea to find it more easily is warmly welcome.
Last edited by Didier Spaier; 07-26-2021 at 05:50 PM.
Another data point here. In a mature machine (about 6yrs old), all the USB-2 ports work fine but none of the 3x USB-3.0 ports work with kernels 5.13.3,4. On a newer machine all the USB ports are USB-3.2 Gen 2 and all seem to be working OK (as do the USB-2 ports).
The resulting conjecture would be that older USB-3.0 ports are problematic with 5.13.x kernels.
chris
Last edited by chris.willing; 07-27-2021 at 02:04 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.