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
2
  • 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, 2015 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. Feb 15, 2015 at 11:17

3 Answers 3

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

3
  • 1
    This will disable the HDD protection which I would not do unless I have an SSD
    – Suici Doga
    May 31, 2016 at 7: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. Feb 2, 2020 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 =). Feb 12, 2022 at 12:44
3

Answered by OP in question:

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

1
  • This doesn't seem to work on 20.04. the sensors still sending values. Feb 12, 2022 at 12:42
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .