On Thu, Jan 8, 2015 at 9:58 PM, Gavin Lambert <[email protected]> wrote:
> On 9 January 2015 13:08, quoth Benjamin Tissoires:
>> You can also make an udev rule which write 1040 in
>> /sys/bus/hid/devices/0003\:0EEF\:0001.*/quirks on plug in an udev rule (you
>> should probably rely on the path given by the udev rule instead of writing
>> the wildcard).
>
> I get a "permission denied" error trying to write to that pseudo-file after
> boot, even with sudo. (It currently contains 3088.)
You need root access, so you'll need a true root shell to be able to
write on the file.
>
> I also tried writing the following udev rule and rebooting, but it had no
> effect; not sure if I'm doing it wrong or if it's having the same problem:
>
> SUBSYSTEM=="usb", ATTRS{idVendor}=="0eef", ATTRS{idProduct}=="0001",
> RUN+="echo 1040 > /sys/bus/hid/devices/0003\:0EEF\:0001.0002/quirks"
>
IIRC, plain redirection can not work anymore with recent udev/systemd
versions. Also, the .0002 at the end should not be encoded directly in
the udev rule. You can rely on %k, which is the name of the device
given by udev.
I think, you should use something like that:
DRIVER=="hid-multitouch",
ENV{MODALIAS}=="hid:b0003g0004v00000EEFp00000001", RUN+="/bin/sh
/etc/udev/fix_hid_multitouch.sh %k"
With /etc/udev/fix_hid_multitouch.sh being:
#> cat > /etc/udev/fix_hid_multitouch.sh << EOF
#!/bin/bash
DEVICE=$1
echo 1040 > "/sys/bus/hid/devices/${DEVICE}/quirks"
EOF
This is untested, but it should give you some more clues to go further
if it does not work directly.
Cheers,
Benjamin
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html