10

I am having some trouble using games that use joysticks because my laptop has an accelerometer (I don't have the slightest idea why this might be useful on a laptop), and it's interfeering with joysticks. Linux finds it in /dev/input/js0

I would like to know how to disable/enable this so games or other things don't detect it.

Thank you very much.

This is the information in /proc/bus/input/devices

I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="ST LIS3LV02DL Accelerometer"
P: Phys=lis3lv02d/input0
S: Sysfs=/devices/platform/lis3lv02d/input/input11
U: Uniq=
H: Handlers=event10 js0 
B: PROP=0
B: EV=9
B: ABS=7
Tim
  • 32,861
  • 27
  • 118
  • 178
  • 4
    The accelerometer detects when you drop your laptop, and quickly stops the HDD to minimize damage. That probably doesn't work on Linux. See here. – Jos Feb 15 '15 at 11:14
  • 1
    Ok, that seems like a good use xD. I again doubt that works on Linux. I just want to disable it. – MyUserIsThis Feb 15 '15 at 11:17

3 Answers3

17

A better solution is to unload hp_accel module: sudo modprobe -r hp_accel

If you don't want your system to load the module at every boot, simply blacklist it adding the following line to /etc/modprobe.d/blacklist.conf:

blacklist hp_accel

MiSKLaCH
  • 171
  • 1
    This will disable the HDD protection which I would not do unless I have an SSD – Suici Doga May 31 '16 at 07:43
  • @SuiciDoga I believe this accelerometer HDD protection is handled by some sort of firmware (maybe in bios) because it should be real-time and quick enough to turn off the HDD, so I think it's safe to disable it in OS. – Arman Safikhani Feb 02 '20 at 18:26
  • This does the magic! Since i installed a SSD, this feature isn't required for now. Let gonna see if can increase battery save also =). – Matthias Lenmher Feb 12 '22 at 12:44
3

Answered by OP in question:

Solved it chmod -r /dev/input/js0 was enough

Tim
  • 32,861
  • 27
  • 118
  • 178
1

I wrote a small program to read the Joystick under termilnal. As you said I see it as a joystick on my laptop: ST LIS3LV02DL Accelerometer but when I plug in a real joystick it disappears from the list... and the real joystick is listed.