Shank 2
[Linux] Mouse detected as Joystick
My A4Tech USB Mouse is detected as an Joystick.
How can i disable this device. It makes game unplayable - moving with keyboard doesn't work.
แก้ไขล่าสุดโดย daretmavi; 19 ธ.ค. 2014 @ 6: 30am
< >
กำลังแสดง 1-14 จาก 14 ความเห็น
Now i know what it the problem.

Linux xinput detect my mouse wrong.

if I run:
xinput list
I get

⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ A4TECH USB Device id=11 [slave pointer (2)]
⎜ ↳ A4TECH USB Device id=10 [slave pointer (2)]

I can disable it with:
xinput --set-prop 10 "Device Enabled" 0

NOW, I can use keyboard for moving in the game.

I added this line in /etc/X11/Xsession.d/40x11-common_xsessionrc
- change applied on startup
แก้ไขล่าสุดโดย daretmavi; 25 ก.พ. 2013 @ 10: 51am
Same problem,

When I use your code line to disable the mouse, can't use fire... well, can't use mouse.
There is a way to disable only the advance options of the a4tech mouse?

Thanks
What You get with "xinput list"?

In my case, Device ID 10 was the "evil" device. Device ID 11 was the mouse itself.
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ A4TECH USB Device id=9 [slave pointer (2)]
⎜ ↳ A4TECH USB Device id=10 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Logitech Logitech Speaker id=8 [slave keyboard (3)]
↳ Logitech USB Keyboard id=11 [slave keyboard (3)]
↳ Logitech USB Keyboard id=12 [slave keyboard (3)]


I tried with 10 and 9 with same result
Try to disable some of the Keyboard devices, or all of them :)
Sometimes xneur (gxneur) is problem. It's app like Punto Switcher.
sudo rm /dev/input/js0

worked for me. but needs to be done after every reboot
In 14.04 I had to create an udev rule to remove the device on boot:

/etc/udev/rules.d/65-joystick.rules
KERNEL=="js0", ATTRS{name}=="A4TECH USB Device", RUN+="/usr/bin/_remove_js0"

It runs a script /usr/bin/_remove_js0
#!/bin/bash sudo rm /dev/input/js0 exit
แก้ไขล่าสุดโดย daretmavi; 30 ต.ค. 2014 @ 2: 57pm
โพสต์ดั้งเดิมโดย daret:
In 14.04 I had to create an udev rule to remove the device on boot:

/etc/udev/rules.d/65-joystick.rules
KERNEL=="js0", ATTRS{name}=="A4TECH USB Device", RUN+="/usr/bin/_remove_js0"

It runs a script /usr/bin/_remove_js0
#!/bin/bash sudo rm /dev/input/js0 exit
Thank you very much!!! Solved for Bastion, Shank 2 and Savant - Ascent :D
hm, does not work for me on suse. I the ATTRS(name) important? Maybe the name for my device is a little different... how can I find out?

cause manualy evoking /usr/bin/_remove_js0 works.
โพสต์ดั้งเดิมโดย tomtomme:
hm, does not work for me on suse. I the ATTRS(name) important? Maybe the name for my device is a little different... how can I find out?

cause manualy evoking /usr/bin/_remove_js0 works.

I have the same problem but with different device maker

use the command to list all devices configured:
cat /proc/bus/input/devices


then find the one with "js0" string in my case was:
I: Bus=0003 Vendor=056e Product=00d5 Version=0100
N: Name="ELECOM ELECOM Gaming Mouse"
P: Phys=usb-0000:00:12.0-1/input2
S: Sysfs=/devices/pci0000:00/0000:00:12.0/usb8/8-1/8-1:1.2/0003:056E:00D5.0003/input/input20
U: Uniq=
H: Handlers=kbd event17 js0 #### this line is important ####
B: PROP=0
B: EV=1f
B: KEY=3f0003007f 0 0 483ffff17aff32d bf54444600000000 1 120f938b17c000 677bfad9415fed 9ed68000004400 10000002
B: REL=40
B: ABS=fff0100000003
B: MSC=10

you will notice a string called "event#" which in my case is "event17" this string locate where the device is being processed
udevadm info -a /dev/input/event#

my output was:
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/pci0000:00/0000:00:12.0/usb8/8-1/8-1:1.2/0003:056E:00D5.0003/input/input20/event17':
KERNEL=="event17"
SUBSYSTEM=="input"
DRIVER==""

looking at parent device '/devices/pci0000:00/0000:00:12.0/usb8/8-1/8-1:1.2/0003:056E:00D5.0003/input/input20':
KERNELS=="input20"
SUBSYSTEMS=="input" #### this line is important ####
DRIVERS==""
ATTRS{name}=="ELECOM ELECOM Gaming Mouse" #### this line is important ####
ATTRS{phys}=="usb-0000:00:12.0-1/input2" #### this line is important ####
ATTRS{uniq}==""
ATTRS{properties}=="0"

........ and many other lines ........

with this you have all the information that you need, just create a udev rule whatever name you want preceded by number+dash+rulename.rules in "/etc/udev/rules.d/" with this command:
SUBSYSTEM=="input", ATTRS{name}=="*NAMEOFYOURDEVICE*", ATTRS{phys}=="*/input#", RUN+="/usr/bin/rm /dev/input/js0"

my config is:
SUBSYSTEM=="input", ATTRS{name}=="*ELECOM*", ATTRS{phys}=="*/input2", RUN+="/usr/bin/rm /dev/input/js0"
named as 52-elecom.rules

I hope this help you, and sorry for my english I'm brazilian.
Hey daret...add a "[Linux]" to your topic title. That way people with the same problem might find it easier.
thanks Suse-O - that worked on my openSUSE Tumbleweed :)
< >
กำลังแสดง 1-14 จาก 14 ความเห็น
ต่อหน้า: 1530 50

วันที่โพสต์: 24 ก.พ. 2013 @ 4: 43am
โพสต์: 14