Shank 2

Shank 2

View Stats:
daretmavi Feb 24, 2013 @ 4:43am
[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.
Last edited by daretmavi; Dec 19, 2014 @ 6:30am
< >
Showing 1-14 of 14 comments
daretmavi Feb 25, 2013 @ 10:50am 
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
Last edited by daretmavi; Feb 25, 2013 @ 10:51am
cobak78 Mar 24, 2013 @ 12:44pm 
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
daretmavi Mar 24, 2013 @ 4:01pm 
What You get with "xinput list"?

In my case, Device ID 10 was the "evil" device. Device ID 11 was the mouse itself.
cobak78 Mar 25, 2013 @ 12:01am 
⎡ 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
daretmavi Mar 26, 2013 @ 1:06pm 
Try to disable some of the Keyboard devices, or all of them :)
q4arus Jun 22, 2014 @ 1:03pm 
Sometimes xneur (gxneur) is problem. It's app like Punto Switcher.
tomtomme Oct 30, 2014 @ 2:56am 
sudo rm /dev/input/js0

worked for me. but needs to be done after every reboot
daretmavi Oct 30, 2014 @ 2:57pm 
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
Last edited by daretmavi; Oct 30, 2014 @ 2:57pm
Ewerton Del Toro Oct 30, 2014 @ 9:05pm 
Originally posted by 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
tomtomme Nov 1, 2014 @ 11:31am 
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.
Eddie[Linux] Dec 9, 2014 @ 4:03am 
Originally posted by 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.
aPhilRa Dec 14, 2014 @ 12:08pm 
Hey daret...add a "[Linux]" to your topic title. That way people with the same problem might find it easier.
tomtomme Dec 15, 2014 @ 11:32am 
thanks Suse-O - that worked on my openSUSE Tumbleweed :)
< >
Showing 1-14 of 14 comments
Per page: 1530 50

Date Posted: Feb 24, 2013 @ 4:43am
Posts: 14