Mouse or Keyboard not detected on system boot

When booting any linux distro, I have noticed that my mouse is not recognised unless it is unplugged and replugged. Last night I booted into opensuse and it was my keyboard that was unrecognised but the mouse worked fine.

Normally I have the mouse plugged into a passthrough port on my keyboard, however last night I decided to just plug it directly in to the computer. This seems to work fine (haven’t checked very many times though) and both the keyboard and mouse were recognised and worked fine.

Is there some issue with using USB hubs or passthroughs with linux that it fails to detect hardware until it’s removed and reconnected?

Could be, it makes detection more complected . I have see the problem on KVM switches which may not pass all the info back to the computer.

These hubs are simple things, and should work OOTB, unless it has other devices connected that are drawing more power than the hub can transfer. With only a mouse and kbd connected, it should just work.

So it could be that the hub defective.

One way to check is to plug only the hub, check dmesg, plug mouse/kbd in hub, check dmsg again, and compare to what dmesg show when mouse/kbd are plugged directly in the computer usb ports.

Sorry, I may not have been completely clear about the nature of it. It’s essentially a usb extender cable built into the back of my keyboard. It has two cables coming out the keyboard which get connected to a usb port each, so as far as I know it’s just hardwired together and there’s no hub controller or anything onboard.

A couple of times more recently they have not registered when connected directly to the motherboard, even though it had me fooled earlier. Maybe one out of 5 times, in post and GRUB the keyboard has worked fine, but when booting into the distro it just switched off until replugged. They’re connected to an ASMedia usb controller on the mobo, if that has any relevance.

Try different mouse/keyboard

Also could be a flaky USB port

Sounds to me like your problem is in the USB wiring in your keyboard. Bad or weak cable (stretched or hairline separation), loose connection inside, worn or dirty connectors, or … ?

If you have one, try a different keyboard and plug the mouse directly into the computer. If the problem disappears, you have isolated the problem to the keyboard and/or its USB wiring.