<div dir="ltr"><span style="font-size:13px">On Mon, Jan 2, 2017, 07:51 Andrei Borzenkov <<a href="mailto:arvidjaar@gmail.com">arvidjaar@gmail.com</a>> wrote:</span></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">02.01.2017 07:14, Weiwu Zhang пишет:<br class="gmail_msg">
> This is a user post cross-posted from<br class="gmail_msg">
> <a href="https://ubuntuforums.org/showthread.php?t=2348023" rel="noreferrer" class="gmail_msg" target="_blank">https://ubuntuforums.org/showthread.php?t=2348023</a><br class="gmail_msg">
><br class="gmail_msg">
> Seems the question isn't mundane enough for Ubuntu forum - no one<br class="gmail_msg">
> followed; so if I can get some clues from here I will cross post back<br class="gmail_msg">
> the solution to Ubuntu Forums.<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> The bluetooth mouse's information:<br class="gmail_msg">
><br class="gmail_msg">
> Code:<br class="gmail_msg">
> $ udevadm info -a -p `udevadm info -q path /dev/input/mouse3`<br class="gmail_msg">
><br class="gmail_msg">
> looking at device<br class="gmail_msg">
> '/devices/virtual/misc/uhid/0005:17EF:6060.0005/input/input26/mouse3':<br class="gmail_msg">
> KERNEL=="mouse3"<br class="gmail_msg">
> SUBSYSTEM=="input"<br class="gmail_msg">
> DRIVER==""<br class="gmail_msg">
><br class="gmail_msg">
> looking at parent device<br class="gmail_msg">
> '/devices/virtual/misc/uhid/0005:17EF:6060.0005/input/input26':<br class="gmail_msg">
> KERNELS=="input26"<br class="gmail_msg">
> SUBSYSTEMS=="input"<br class="gmail_msg">
> DRIVERS==""<br class="gmail_msg">
> ATTRS{name}=="Lenovo Mice N700"<br class="gmail_msg">
> ATTRS{phys}=="B8:8A:60:56:E4:3C"<br class="gmail_msg">
> ATTRS{properties}=="0"<br class="gmail_msg">
> ATTRS{uniq}=="D5:94:54:38:3D:5D"<br class="gmail_msg">
><br class="gmail_msg">
> looking at parent device '/devices/virtual/misc/uhid/0005:17EF:6060.0005':<br class="gmail_msg">
> KERNELS=="0005:17EF:6060.0005"<br class="gmail_msg">
> SUBSYSTEMS=="hid"<br class="gmail_msg">
> DRIVERS=="hid-generic"<br class="gmail_msg">
> ATTRS{country}=="00"<br class="gmail_msg">
><br class="gmail_msg">
> looking at parent device '/devices/virtual/misc/uhid':<br class="gmail_msg">
> KERNELS=="uhid"<br class="gmail_msg">
> SUBSYSTEMS=="misc"<br class="gmail_msg">
> DRIVERS==""<br class="gmail_msg">
> The udev rules I tried:<br class="gmail_msg">
><br class="gmail_msg">
> Code:<br class="gmail_msg">
><br class="gmail_msg">
> $ cat /etc/udev/rules.d/lenovo.rules<br class="gmail_msg">
> KERNEL=="hidraw*", SUBSYSTEM=="hidraw",<br class="gmail_msg">
> ATTRS{uniq}=="D5:94:54:38:3D:5D", SYMLINK+="N700"<br class="gmail_msg">
> KERNEL=="hidraw*", SUBSYSTEM=="hidraw",<br class="gmail_msg">
> ATTRS{address}=="d5:94:54:38:3d:5d", SYMLINK+="N700"<br class="gmail_msg">
> SUBSYSTEM=="input", SUBSYSTEMS=="input", SUBSYSTEMS=="hid",<br class="gmail_msg">
> ATTRS{name}=="Lenovo Mice N700", SYMLINK+="N700"<br class="gmail_msg">
><br class="gmail_msg">
<br class="gmail_msg">
All keys that match against parent nodes must match for the same parent<br class="gmail_msg">
(this is even documented). Also I /think/ that in case of multiple<br class="gmail_msg">
SUBSYSTEMS the last one wins. In this case your ATTRS{name} will match<br class="gmail_msg">
one parent, and SUBSYSTEMS=="hid" - another. Try leaving only<br class="gmail_msg">
SUBSYSTEMS=="input".<br class="gmail_msg"></blockquote></div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div><div>That's a surprising limitation... I guess one could copy attributes to ENV to get around it?</div><div><br>Either way, SUBSYSTEMS=="input" seems redundant as well.<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><p dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com">grawity@gmail.com</a>><br>
Sent from my phone</p>
</div>