forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
HS58, toolchain 2023.09 using glibc, buildroot arc-2023.09, Linux 5.15.127
Input events (mouse, keboard events) are not visible in applications
- Raspberry platform
pi@raspberrypi4:~ $ evemu-record /dev/input/event1 &
[1] 169299
pi@raspberrypi4:~ $ # EVEMU 1.3
# Kernel: 6.6.51+rpt-rpi-2712
# Input device name: "vc4-hdmi-0"
# Input device ID: bus 0x1e vendor 0000 product 0000 version 0x01
# Supported events:
[..]
# Event type 2 (EV_REL)
# Event code 0 (REL_X)
# Event code 1 (REL_Y)
# Event type 4 (EV_MSC)
# Event code 4 (MSC_SCAN)
# Event type 20 (EV_REP)
# Event code 0 (REP_DELAY)
# Event code 1 (REP_PERIOD)
[..]
################################
# Waiting for events #
################################
pi@raspberrypi4:~ $ evemu-event /dev/input/event1 --type EV_REL --code REL_X --value 3 --sync
E: 0.000001 0002 0000 0003 # EV_REL / REL_X 3
E: 0.000001 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +0ms
- HS58 platform
# evemu-record /dev/input/event0 &
# # EVEMU 1.3
# Kernel: 5.15.127
# Input device name: "Logitech USB Optical Mouse"
# Input device ID: bus 0x03 vendor 0x46d product 0xc077 version 0x111
# Supported events:
[..]
# Event type 2 (EV_REL)
# Event code 0 (REL_X)
# Event code 1 (REL_Y)
# Event code 8 (REL_WHEEL)
# Event code 11 (REL_WHEEL_HI_RES)
# Event type 4 (EV_MSC)
# Event code 4 (MSC_SCAN)
[..]
################################
# Waiting for events #
################################
# evemu-event /dev/input/event0 --type EV_REL --code REL_X --value 3 --sync
error: could not play event
My investigation shows that this is due to difference in size of the structure "input_event" between user space side and kernel. This is due to the fact that glibc is using 64-bit members in timeval struct, while kernel requires 32-bit members.
I attach a patch that works for me - although a bit hacky I hope this help you in preparing a proper fix.
Metadata
Metadata
Assignees
Labels
No labels