I've noticed the same thing… both on Ubuntu, and lately on Gentoo as well, so I'm thinking maybe something in udev / kernel has changed?
I use FVWM2 as my desktop on both OSes. My desktop runs Ubuntu 20.04 (AMD64). On my laptop (Panasonic CF-53, which runs Gentoo) it's particularly insidious, plugging in the YubiKey (mine's a 5C which I use with a USB- A-C adaptor) causes NumLock to be turned on, and if your PIN code uses letters over the right-side of the keyboard, guess what? You're unwittingly typing numbers now! Cue confusion when the YubiKey rejects the PIN you just entered. I've locked myself out of the YubiKey once because of that -- had to go in with the PUK and unlock it. My desktop doesn't seem to secretly turn NumLock on; the state is retained, just the LED turns off. If we can figure out what mechanism is doing it in Ubuntu, I'll chase up what's doing it Gentoo-side. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1845214 Title: Keyboard NumLock indicator turns off on connecting another keyboard To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-meta-hwe/+bug/1845214/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs