Open CaptainBloodz opened 5 years ago
I think those are in the same group.
This causes me a problem. I can't configure my two RAPOO keyboard/mouse combos independently
same here, I have a Thinkpad Tablet with a trackpoint and a touch pad. With libinput list-devices
and libinput debug-events --device /dev/input/eventXX
it was possible to distinguish them. However, sway cannot distinguish them
This seems to be the code in question which generates the "unique" identifiers for each device: https://github.com/swaywm/sway/blob/956b689d6ab18ad78f53f15cdeb7606af98e9e5e/sway/input/input-manager.c#L65-L90
I thought about two ideas which could might solve this issue:
input:pointer[gesture]
, input:pointer[!gesture]
, and, if sway knows, maybe this could also be used to describe the port, where the device is connected (solving the issue with two identical keyboards connected). This change should be backward compatible to current configurations and could be expanded in the future, if required.counting the number of "unique" appearances of vendor:product:devicename
combinations should provide a way to address a single device not breaking any configs
I realize of course that the order these are discoverd might not be the same each time, but I lived with that under X and it would be a dramatic improvement compared to not being able to adress a single device at all.
Here's a VERY quick and dirty patch to set the USB physical connector name as the input identifier : https://gist.github.com/tdaniel22/166301c48a2e50502ba34877f509dcfb. I needed this to map two touch panels of the same brand to their respective outputs.
I am encountering this as an issue trying to put two controllers in different seats. They are connected via Bluetooth.
I have the same issue with multiple touchscreens of the same brand. I need to map them to the correct output, but can't due to them having the same identifier. At least having some additional differentiating value would be important here.
Maybe worth mentioning: in the raspberry pi project they fixed this issue with a kernel patch to make the IDs unique. Which is great for the pi, but unfortunately I am not running a pi and would prefer not to patch my kernel. https://github.com/raspberrypi/bookworm-feedback/issues/138
Can we use the device as an alternative identifier perhaps? For example: /dev/input/event17
?
Found this issue while looking into mapping input from two of the same model touchscreens to their respective screens.
I eventually realized that in my case (where there are only these two screens, so it's "simple"), and I'm not unplugging/replugging the hardware (i.e. always using two, plugged into the same respective ports), I can create a pair of udev rules that:
phys
attribute values with a partial wildcard expression that includes the USB bus/device number0.5 0 0
0 1 0
and
0.5 0 0.5
0 1 0
So I have rules like:
ACTION=="add|change", KERNEL=="event*", ATTRS{id/vendor}=="abcd", ATTRS{id/product}=="abcd", ATTRS{phys}=="usb*-1.2/*", ENV{LIBINPUT_CALIBRATION_MATRIX}="0.5 0 0 0 1 0"
ACTION=="add|change", KERNEL=="event*", ATTRS{id/vendor}=="abcd", ATTRS{id/product}=="abcd", ATTRS{phys}=="usb*-2.2/*", ENV{LIBINPUT_CALIBRATION_MATRIX}="0.5 0 0.5 0 1 0"
You can get the USB phys
values from udevadm info {/sys path}
but they're also easy enough to infer directly from loginctl seat-status seat0
.
Edit: However: in my particular setup this does not help me, as I can't get a wayland compositor to render to both of 2 separate displaylink touchscreens.
swaymsg -t get_version sway version 1.0-rc1-31-gee56428b (Feb 7 2019, branch 'HEAD')
xwayland enabled
swaymsg -t get_inputs
Is this replication:
1) Caused by some out of sway configuration? 2) Originated in sway behavior, whether expected or not? 3) Something else?
Plz note this isn't causing any issue he know of.
Thanks for your attention.