Score:0

removing device from device list linux

er flag

i am working on a project and after some time i stumble upon the next error:

Unable to get name for joystick /dev/input/js0
Failed to get vendor ID of joystick /dev/input/js0
Failed to get product ID of joystick /dev/input/js0
Unable to get name for joystick /dev/input/js1
Failed to get vendor ID of joystick /dev/input/js1
Failed to get product ID of joystick /dev/input/js1
Unable to get name for joystick /dev/input/js2
Failed to get vendor ID of joystick /dev/input/js2
Failed to get product ID of joystick /dev/input/js2
Unable to get name for joystick /dev/input/js3
Failed to get vendor ID of joystick /dev/input/js3
Failed to get product ID of joystick /dev/input/js3

(its from SFML, but its not that important)

and i want to remove the devices js0-3 but don't know how, i found the devices file in /proc/bus/input and i found this:

...

I: Bus=0003 Vendor=045e Product=0719 Version=0100
N: Name="Xbox 360 Wireless Receiver"
P: Phys=
S: Sysfs=/devices/virtual/input/input26
U: Uniq=
H: Handlers=event15 js0 
B: PROP=0
B: EV=b
B: KEY=f 0 0 0 0 0 0 7fdb000000000000 0 0 0 0
B: ABS=1b

I: Bus=0003 Vendor=045e Product=0719 Version=0100
N: Name="Xbox 360 Wireless Receiver"
P: Phys=
S: Sysfs=/devices/virtual/input/input27
U: Uniq=
H: Handlers=event16 js1 
B: PROP=0
B: EV=b
B: KEY=f 0 0 0 0 0 0 7fdb000000000000 0 0 0 0
B: ABS=1b

I: Bus=0003 Vendor=045e Product=0719 Version=0100
N: Name="Xbox 360 Wireless Receiver"
P: Phys=
S: Sysfs=/devices/virtual/input/input28
U: Uniq=
H: Handlers=event17 js2 
B: PROP=0
B: EV=b
B: KEY=f 0 0 0 0 0 0 7fdb000000000000 0 0 0 0
B: ABS=1b

I: Bus=0003 Vendor=045e Product=0719 Version=0100
N: Name="Xbox 360 Wireless Receiver"
P: Phys=
S: Sysfs=/devices/virtual/input/input29
U: Uniq=
H: Handlers=event18 js3 
B: PROP=0
B: EV=b
B: KEY=f 0 0 0 0 0 0 7fdb000000000000 0 0 0 0
B: ABS=1b

...

and can't edit it because its rom, so what should i do?

please help me

i tried deleting the js0-3 files from /dev/input and that didn't solve the problem (and now i lack the original files, so i made some empty files names js0-3) so i then tried to edit the /proc/bus/input/devices file but didn't succed

I'm using Ubuntu 22.04.1 LTS

Hi-Angel avatar
es flag
Did you try unloading the module that creates those files? From the info you posted I'd assume it is a `xpad`, so `sudo rmmod xpad`. If `xpad` isn't the one, you can try gather more information with a `udevadm info --query=all --name=/dev/input/js0`
C0sM1n avatar
er flag
```rmmod: ERROR: Module xpad is not currently loaded``` and after i tried to get info i got this: ```Unknown device "/dev/input/js0": Inappropriate ioctl for device```
Hi-Angel avatar
es flag
Hmm, odd. Anyway, I presume these files creates something development-related you're doing, right? I'd suggest reboot the system, check that the files are absent, then use `lsmod > /tmp/1`, then do some stuff that creates these files, then `lsmod > /tmp/2`, then compare the difference before and after, e.g. with `vimdiff /tmp/{1,2}`. I'd expect you'll see a new module appears in the list of loaded modules, which creates these files.
C0sM1n avatar
er flag
the thing is that i once used a wireless controller and now i want to completly remove it from the system
Hi-Angel avatar
es flag
I see. Are you sure the wireless controller doesn't get connected while the system is running? Is it disabled? I'm asking because files under `/dev` are generated automatically in runtime, they don't exist on disk. So these `jsX` files you are seeing are getting generated due to some event happening. Did you connect the joystick over bluetooth? If yes, did you try removing the joystick from the list of saved bluetootch connections? Do you see anything interesting in `journalctl -b | grep -i joystick`?
C0sM1n avatar
er flag
i dont have the joystick connected since like 1 month ago, no, nothing interesting after running journalclt. Also i removed the joystick from bluethooth and nothing changed
Hi-Angel avatar
es flag
In this case I think you'll have to use [this answer](https://askubuntu.com/a/1227170/266507) to increase verbosity of udev on boot, and then grep through the log for `js` and `joystick` keywords trying to find which events lead to creation of these files. Be aware this will generate a lot of output.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.