从设备列表linux中删除设备

从设备列表linux中删除设备

我正在做一个项目,过了一段时间后,我偶然发现了下一个错误:

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

(它来自 SFML,但并不那么重要)

我想删除设备 js0-3,但不知道如何删除,我在 /proc/bus/input 中找到了设备文件,发现了以下内容:

...

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

...

而且因为它是 rom,所以无法编辑它,所以我该怎么办?

请帮我

我尝试从 /dev/input 中删除 js0-3 文件,但这并没有解决问题(现在我缺少原始文件,所以我创建了一些名为 js0-3 的空文件),因此我尝试编辑 /proc/bus/input/devices 文件,但没有成功

我正在使用 Ubuntu 22.04.1 LTS

相关内容