udev+keyboard not working in KMS
Is there an existing issue for this?
- [x] This is a bug in RetroArch frontend
- [x] I have searched the existing issues
Description
When I start retroarch from the linux vconsole, everything looks fine, but the keyboard doesn't work. It is not a permission issue. My user is in the input group. It doesn't even work when retroarch is started as root.
Switching input_driver to linuxraw fixes it.
Expected behavior
The keyboard works.
Steps to reproduce the bug
- Start retroarch as root or with a user in the input group.
- Try the arrow keys.
Version/Commit
1.19.1
Bisect Results
No response
Present in the nightly version
I don't know
Platform & operating system
alpine linux 3.21.3, rpi 3b
Affected Cores
No response
Environment information
No response
Relevant log output
I have a similar configuration (KMS+udev, Raspberry Pi and RaspiOS) and never had an issue. Do any other kms based applications work with the keyboard (e.g. kmscube or modetest) ?
What is the linux vconsole - is this the regular text console ?
Reproduced on Alpine, not yet sure what to think of it, will check more. (Note to self: the vc4 overlay needs to be added to config.txt / usercfg.txt, otherwise KMS mode will not work.)
This has helped: https://wiki.alpinelinux.org/wiki/Eudev
In case the linked page goes away, needed steps:
Manual installation
You need to install eudev itself and the udev services.
# apk add eudev udev-init-scripts
If you already have a device manager installed you need to stop it before you start eudev. Then enable the following services.
# rc-update add udev sysinit
# rc-update add udev-trigger sysinit
# rc-update add udev-settle sysinit
# rc-update add udev-postmount default
I tried this on a Pi4 and udev input works afterwards. Guide indicates a shorter version as well:
# setup-devd udev
This happens on Arch Linux under the following conditions:
- Drivers: Controller: udev
- USB Keyboard connected
- USB Mouse connected
- USB gamepad connected
- retroarch.cfg contains
input_player1_l_x_minus_axis = "-0"
input_player1_l_y_minus_axis = "-1"
- Reboot (no soft-reboot)
- No inputs from the gamepad
As soon as a gamepad button is pressed the keyboard starts working. Keyboard continues to work after restarting retroarch or systemctl soft-reboot.
Notes: If gamepad is not connected, the keyboard works. Mouse always works. The first button press on the gamepad is not registered.
$uname -a
Linux localhost 6.12.26-1-lts #1 SMP PREEMPT_DYNAMIC Fri, 02 May 2025 06:44:33 +0000 x86_64 GNU/Linux
$retroarch --version
Version: 1.20.0 (Git ab3b175848) Jun 3 2025
Same issue when running in weston (wayland). Running in xorg was not tested.
EDIT: Issue is independant of udev and kms (in this case). Maybe rename to "keyboard input not working in some configurations"?