You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My ps3 bd remote control connected via bluetooth is being treated as a keyboard. This is undesirable as kodi is unable to recognize and map the majority of buttons due to the scancode >255 issue. See kodi issue 16834
eventlircd should address this issue and already has support for this remote, but it is not functioning properly for bluetooth devices in this release.
The root cause appears to be the udev rules included with the eventlircd package.
Below is the relevant sections from /lib/udev/rules.d/98-eventlircd.rules
#-------------------------------------------------------------------------------
# Ask eventlircd to handle Bluetooth HID devices that show up as event devices
# and are known to be remote controls. For simplicity, the event map file names
# have the format <BUSTYPE>_<VENDOR>_<PRODUCT>.evmap.
#-------------------------------------------------------------------------------
SUBSYSTEMS=="bluetooth", GOTO="begin-bluetooth"
GOTO="end-bluetooth"
LABEL="begin-bluetooth"
ATTRS{name}=="Nintendo Wii Remote", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="wiimote.evmap"
ATTRS{name}=="BD Remote Control", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="ps3remote.evmap"
#PS3 BD Remote Version 2 (Bluetooth AND infrared 3 in 1 remote)
ATTRS{name}=="Sony Computer Entertainment Inc BD Remote Control", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="ps3remote.evmap"
# Amazon Fire TV stick remote
ATTRS{name}=="Amazon Fire TV Remote", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="aftvsremote.evmap"
LABEL="end-bluetooth"
# tell libinput to ignore devices handled by eventlircd
ENV{eventlircd_enable}=="true", ENV{LIBINPUT_IGNORE_DEVICE}="1"
These rules are skipped over unless udev detects the bluetooth subsystem but querying my remote only shows an input subsystem.
udevadm info --attribute-walk --no-pager /dev/input/event3
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/virtual/misc/uhid/0005:054C:0306.0001/input/input3/event3':
KERNEL=="event3"
SUBSYSTEM=="input"
DRIVER==""
ATTR{power/control}=="auto"
ATTR{power/runtime_active_time}=="0"
ATTR{power/runtime_status}=="unsupported"
ATTR{power/runtime_suspended_time}=="0"
looking at parent device '/devices/virtual/misc/uhid/0005:054C:0306.0001/input/input3':
KERNELS=="input3"
SUBSYSTEMS=="input"
DRIVERS==""
ATTRS{capabilities/abs}=="0"
ATTRS{capabilities/ev}=="100013"
ATTRS{capabilities/ff}=="0"
ATTRS{capabilities/key}=="7000001083c100 8c00ea00000000 6bc0000000000001 8000 1102c0000801 80168000000000 10000ffe"
ATTRS{capabilities/led}=="0"
ATTRS{capabilities/msc}=="10"
ATTRS{capabilities/rel}=="0"
ATTRS{capabilities/snd}=="0"
ATTRS{capabilities/sw}=="0"
ATTRS{id/bustype}=="0005"
ATTRS{id/product}=="0306"
ATTRS{id/vendor}=="054c"
ATTRS{id/version}=="0100"
ATTRS{inhibited}=="0"
ATTRS{name}=="BD Remote Control"
ATTRS{phys}=="d8:3a:dd:aa:41:f2"
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_time}=="0"
ATTRS{power/runtime_status}=="unsupported"
ATTRS{power/runtime_suspended_time}=="0"
ATTRS{properties}=="0"
ATTRS{uniq}=="00:1e:3d:b5:fc:77"
looking at parent device '/devices/virtual/misc/uhid/0005:054C:0306.0001':
KERNELS=="0005:054C:0306.0001"
SUBSYSTEMS=="hid"
DRIVERS=="sony"
ATTRS{country}=="21"
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_time}=="0"
ATTRS{power/runtime_status}=="unsupported"
ATTRS{power/runtime_suspended_time}=="0"
looking at parent device '/devices/virtual/misc/uhid':
KERNELS=="uhid"
SUBSYSTEMS=="misc"
DRIVERS==""
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_time}=="0"
ATTRS{power/runtime_status}=="unsupported"
ATTRS{power/runtime_suspended_time}=="0"
libinput list-devices confirms the rule wasn't applied. If it had, the device would not be visible to libinput.
#-------------------------------------------------------------------------------
# Ask eventlircd to handle Bluetooth HID devices that show up as event devices
# and are known to be remote controls. For simplicity, the event map file names
# have the format <BUSTYPE>_<VENDOR>_<PRODUCT>.evmap.
#-------------------------------------------------------------------------------
SUBSYSTEMS=="input", ATTRS{name}=="Nintendo Wii Remote", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="wiimote.evmap"
SUBSYSTEMS=="input", ATTRS{name}=="BD Remote Control", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="ps3remote.evmap"
#PS3 BD Remote Version 2 (Bluetooth AND infrared 3 in 1 remote)
SUBSYSTEMS=="input", ATTRS{name}=="Sony Computer Entertainment Inc BD Remote Control", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="ps3remote.evmap"
# Amazon Fire TV stick remote
SUBSYSTEMS=="input", ATTRS{name}=="Amazon Fire TV Remote", \
ENV{eventlircd_enable}="true", \
ENV{eventlircd_evmap}="aftvsremote.evmap"
# tell libinput to ignore devices handled by eventlircd
ENV{eventlircd_enable}=="true", ENV{LIBINPUT_IGNORE_DEVICE}="1"
The modified file was placed in /storage/.config/udev.rules.d/98-eventlircd.rules
After a reboot kodi now detects the remote as a LIRC device. The remote also no longer appears in the output of libinput list-devices
I was able to reproduce the same behavior using a wii remote and confirmed the fix works for it as well. Below is the udev info showing the same subsystem behavior as the sony remote.
I do not have any of the other supported devices to test with.
udevadm info --attribute-walk --no-pager /dev/input/event6
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/virtual/misc/uhid/0005:057E:0306.0003/input/input8/event6':
KERNEL=="event6"
SUBSYSTEM=="input"
DRIVER==""
ATTR{power/control}=="auto"
ATTR{power/runtime_active_time}=="0"
ATTR{power/runtime_status}=="unsupported"
ATTR{power/runtime_suspended_time}=="0"
looking at parent device '/devices/virtual/misc/uhid/0005:057E:0306.0003/input/input8':
KERNELS=="input8"
SUBSYSTEMS=="input"
DRIVERS==""
ATTRS{capabilities/abs}=="0"
ATTRS{capabilities/ev}=="200003"
ATTRS{capabilities/ff}=="107030000 0"
ATTRS{capabilities/key}=="10800000 0 1003000000000006 0 0 168000000000 0"
ATTRS{capabilities/led}=="0"
ATTRS{capabilities/msc}=="0"
ATTRS{capabilities/rel}=="0"
ATTRS{capabilities/snd}=="0"
ATTRS{capabilities/sw}=="0"
ATTRS{id/bustype}=="0005"
ATTRS{id/product}=="0306"
ATTRS{id/vendor}=="057e"
ATTRS{id/version}=="8614"
ATTRS{inhibited}=="0"
ATTRS{name}=="Nintendo Wii Remote"
ATTRS{phys}==""
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_time}=="0"
ATTRS{power/runtime_status}=="unsupported"
ATTRS{power/runtime_suspended_time}=="0"
ATTRS{properties}=="0"
ATTRS{uniq}==""
looking at parent device '/devices/virtual/misc/uhid/0005:057E:0306.0003':
KERNELS=="0005:057E:0306.0003"
SUBSYSTEMS=="hid"
DRIVERS=="wiimote"
ATTRS{country}=="33"
ATTRS{devtype}=="gen10"
ATTRS{extension}=="none"
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_time}=="0"
ATTRS{power/runtime_status}=="unsupported"
ATTRS{power/runtime_suspended_time}=="0"
looking at parent device '/devices/virtual/misc/uhid':
KERNELS=="uhid"
SUBSYSTEMS=="misc"
DRIVERS==""
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_time}=="0"
ATTRS{power/runtime_status}=="unsupported"
ATTRS{power/runtime_suspended_time}=="0"
How to reproduce
Steps to reproduce the behavior:
Connect a eventlircd supported bluetooth remote to kodi
Enable debug logging and press a key.
kodi.log file will show a keyboard keypress instead of a lirc event
Describe the bug
My ps3 bd remote control connected via bluetooth is being treated as a keyboard. This is undesirable as kodi is unable to recognize and map the majority of buttons due to the scancode >255 issue. See kodi issue 16834
eventlircd should address this issue and already has support for this remote, but it is not functioning properly for bluetooth devices in this release.
The root cause appears to be the udev rules included with the eventlircd package.
Below is the relevant sections from
/lib/udev/rules.d/98-eventlircd.rules
These rules are skipped over unless udev detects the bluetooth subsystem but querying my remote only shows an input subsystem.
libinput list-devices
confirms the rule wasn't applied. If it had, the device would not be visible to libinput.I modified the rules as follows
The modified file was placed in
/storage/.config/udev.rules.d/98-eventlircd.rules
After a reboot kodi now detects the remote as a LIRC device. The remote also no longer appears in the output of
libinput list-devices
I was able to reproduce the same behavior using a wii remote and confirmed the fix works for it as well. Below is the udev info showing the same subsystem behavior as the sony remote.
I do not have any of the other supported devices to test with.
How to reproduce
Steps to reproduce the behavior:
Information
Log file
Example of kodi.log before udev rules change
ps3 bd remote
wii remote
Example after the udev rules change
The text was updated successfully, but these errors were encountered: