Menu

#378 lircd bypass device does not copy properties or axis limits

Future
open
nobody
None
na
2023-05-06
2023-05-06
No

I am using LIRC with a hybrid input device that exposes both multitouch and key events; it appears as follows using the evtest tool:

# evtest /dev/input/event4 
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
Input device name: "iqs7211e_keys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 113 (KEY_MUTE)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 128 (KEY_STOP)
    Event code 129 (KEY_AGAIN)
    Event code 164 (KEY_PLAYPAUSE)
    Event code 168 (KEY_REWIND)
    Event code 174 (KEY_EXIT)
    Event code 208 (KEY_FASTFORWARD)
    Event code 330 (BTN_TOUCH)
    Event code 407 (KEY_NEXT)
    Event code 410 (KEY_SHUFFLE)
    Event code 412 (KEY_PREVIOUS)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min        0
      Max     1000
    Event code 1 (ABS_Y)
      Value      0
      Min        0
      Max     1000
    Event code 24 (ABS_PRESSURE)
      Value      0
      Min        0
      Max    65535
    Event code 47 (ABS_MT_SLOT)
      Value      0
      Min        0
      Max        0
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max     1000
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max     1000
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max    65535
    Event code 58 (ABS_MT_PRESSURE)
      Value      0
      Min        0
      Max    65535
Properties:
  Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)

Before loading lircd, both touchscreen and key events are properly handled by other user space applications. After loading lircd, however, touchscreen events are lost.

I noted that lircd conveniently creates a "bypass" device to relay the leftover events as follows:

# evtest /dev/input/event5 
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "iqs7211e_keys (lircd bypass)"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min        0
      Max        0
    Event code 1 (ABS_Y)
      Value      0
      Min        0
      Max        0
    Event code 24 (ABS_PRESSURE)
      Value      0
      Min        0
      Max        0
    Event code 47 (ABS_MT_SLOT)
      Value      0
      Min        0
      Max        0
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max        0
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max        0
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max    65535
    Event code 58 (ABS_MT_PRESSURE)
      Value      0
      Min        0
      Max        0
Properties:
Testing ... (interrupt to exit)

The problem, however, is that the bypass device does not mimic the axis limits of the original device. This causes libinput to reject it as follows:

# libinput debug-events
event5  - iqs7211e_keys (lircd bypass): kernel bug: device has min == max on ABS_X
-event4   DEVICE_ADDED     iqs7211e_keys                     seat0 default group1  cap:kt ntouches 1 calib

It seems the INPUT_PROP_DIRECT property is lost as well. In case this is unepxected or I can provide any additional information, please let me know.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB