Keyboard LED Disabled, can only be turned on using xset

My friend has an external keyboard, but the LED controls on his keyboard don’t work until he runs the xset led on command, and then he can use his keyboard’s built in LED controls. The LEDs turn on during boot but turn off when the system goes to the login screen. So what’s the root cause of this problem, and what’s an equivalent way of fixing it on Wayland?