Hi, uniq attribute does not appear to be set for uinput device, whereas it is correctly set for uhid devices: this is an unexpected inconsistency for similar usecase (connect a bluetooth input device), and makes it difficult to properly identify through udev which actual device got connected/disconnected. Some discussion on the issue here: https://github.com/bluez/bluez/issues/352#issuecomment-1150299074 There have been some previous discussions on how to implement this in the past, but it does not seem to have reached a conclusion yet: https://patchwork.kernel.org/project/linux-input/patch/20191127185139.65048-1-abhishekpandit@chromium.org/ Thanks for consideration.
Any feedback (relevance, fit for purpose, won't fix,...)? Thanks
Hello, Is there a plan to add ioctl support for getting uinput uniq identifier ? https://patchwork.kernel.org/project/linux-input/patch/20191127185139.65048-1-abhishekpandit@chromium.org/ This previous discussions seems to have gone cold for a long time. One problematic use case : Getting the uniq identifier(EVIOCGUNIQ) for a virtual input device created using libevdev library (libevdev_set_name()) always fails. A lot of VMMs rely on getting the uniq identifier as part of virtualizing it. Uinput needs a similar support as well.
I also have a need for this. I am working on exposing the accelerometer and gyroscope sensor in the ASUS ROG Ally device. In parallel to a separate effort to add an iio kernel driver, I am working on userspace solution to adapt the iio data to an evdev device using uinput. One primary development goal is to be able to associate the motion controls of the gyro with the built-in buttons and joysticks, which report as an XBox 360 controller. SDL (which is used by WINE/Proton and many native games and applications) supports linking evdev controllers to their corresponding evdev motion sensors, but ONLY if the uniq attribute matches between the two. This approach works out of the box with existing Playstation and Nintendo controllers. However, without being able to specify the uniq attribute through uinput, my evdev solution is unable to advertise to SDL that my evdev device is the motion control counterpart to the built-in controller. I have read through the whole discussion and I believe the patch proposed remains viable. Please consider taking another look at this, Dmitry et al!