Joystick is not listed under /dev/input/js0 in RHEL-6 and 7
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
Issue
- Why is my joystick not listed under
/dev/input/js0
in RHEL 6 and 7? - How to enable joysticks by default in RHEL 6.x and 7.x?
Resolution
RHEL-6:
* The JOYDEV kernel module was added back in as part of private BZ 1113283 for RHEL 6.7 (2.6.32-573) however no userspace utilities were included.
- The joystick driver was not included in the upstream kernel when RHEL 6 was released. However, there is an unsupported workaround to add joystick support to the RHEL 6 kernel. The EPEL repository has a kernel module RPM that will install "joydev" support. After enabling EPEL, install the joystick kernel module with the following command:
# yum -y install kmod-joydev
- Upon completion, the running kernel should have support for joystick devices and list them under
/dev/input/
.
RHEL-7:
- Update the kernel to kernel-3.10.0-693.el7(RHEL-7.4) or later.
Root Cause
- Joystick device support is not enabled in the Red Hat Enterprise Linux 6 kernel by default.
Diagnostic Steps
The RHEL6 kernel no longer provides the joystick module as RHEL 5 did:
# grep INPUT_JOY /boot/config-2.6.18-194.el5
CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_JOYSTICK=y
# grep INPUT_JOY /boot/config-2.6.32-71.el6.x86\_64
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_JOYSTICK is not set
Starting with RHEL 6.7 (2.6.32-573) and RHEL-7.4(3.10.0-693.el7), the JOYDEV module was added back in but non of the userspace utilities were included.
# grep INPUT_JOY /boot/config-2.6.32-573.el6.x86_64
CONFIG_INPUT_JOYDEV=m
# CONFIG_INPUT_JOYSTICK is not set
# ll /dev/input/js0
crw-r--r--. 1 root root 13, 0 Nov 2 19:54 /dev/input/js0
# grep INPUT_JOY /boot/config-3.10.0-693.el7.x86_64
CONFIG_INPUT_JOYDEV=m
# CONFIG_INPUT_JOYSTICK is not set
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments