为什么我的 Xbox360 有线控制器在发出隆隆声时断开连接?

为什么我的 Xbox360 有线控制器在发出隆隆声时断开连接?

在 Steam 上玩《死亡细胞》时,我注意到当我受伤时,我的控制器会莫名其妙地断开几秒钟的连接(并有一条警告消息这么说)。在这种情况下,游戏运行时会出现一堆振动。如果我禁用它们,它就可以正常工作。为了证实这一点,我跑了evtestfftest正如帖子中所说:如何在 Xubuntu 18.10 中启用 PC 游戏手柄的振动。这是我的输出:

$ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event25:     Microsoft X-Box 360 pad
Select the device event number [0-25]: 25
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x45e product 0x28e version 0x114
Input device name: "Microsoft X-Box 360 pad"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 304 (BTN_SOUTH)
    Event code 305 (BTN_EAST)
    Event code 307 (BTN_NORTH)
    Event code 308 (BTN_WEST)
    Event code 310 (BTN_TL)
    Event code 311 (BTN_TR)
    Event code 314 (BTN_SELECT)
    Event code 315 (BTN_START)
    Event code 316 (BTN_MODE)
    Event code 317 (BTN_THUMBL)
    Event code 318 (BTN_THUMBR)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value  -1637
      Min   -32768
      Max    32767
      Fuzz      16
      Flat     128
    Event code 1 (ABS_Y)
      Value   -377
      Min   -32768
      Max    32767
      Fuzz      16
      Flat     128
    Event code 2 (ABS_Z)
      Value      0
      Min        0
      Max      255
    Event code 3 (ABS_RX)
      Value   -671
      Min   -32768
      Max    32767
      Fuzz      16
      Flat     128
    Event code 4 (ABS_RY)
      Value    161
      Min   -32768
      Max    32767
      Fuzz      16
      Flat     128
    Event code 5 (ABS_RZ)
      Value      0
      Min        0
      Max      255
    Event code 16 (ABS_HAT0X)
      Value      0
      Min       -1
      Max        1
    Event code 17 (ABS_HAT0Y)
      Value      0
      Min       -1
      Max        1
  Event type 21 (EV_FF)
    Event code 80 (FF_RUMBLE)
    Event code 81 (FF_PERIODIC)
    Event code 88 (FF_SQUARE)
    Event code 89 (FF_TRIANGLE)
    Event code 90 (FF_SINE)
    Event code 96 (FF_GAIN)
Properties:
Testing ... (interrupt to exit)
^C

所以我的控制器处于/dev/input/event25并支持隆隆声。

$ fftest /dev/input/event25
Force feedback test program.
HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES

Device /dev/input/event25 opened
Features:
  * Absolute axes: X, Y, Z, RX, RY, RZ, Hat 0 X, Hat 0 Y, 
    [3F 00 03 00 00 00 00 00 ]
  * Relative axes: 
    [00 00 ]
  * Force feedback effects types: Periodic, Rumble, Gain, 
    Force feedback periodic effects: Square, Triangle, Sine, 
    [00 00 00 00 00 00 00 00 00 00 03 07 01 00 00 00 ]
  * Number of simultaneous effects: 16

Setting master gain to 75% ... OK
Uploading effect #0 (Periodic sinusoidal) ... OK (id 0)
Uploading effect #1 (Constant) ... Error: Invalid argument
Uploading effect #2 (Spring) ... Error: Invalid argument
Uploading effect #3 (Damper) ... Error: Invalid argument
Uploading effect #4 (Strong rumble, with heavy motor) ... OK (id 1)
Uploading effect #5 (Weak rumble, with light motor) ... OK (id 2)
Enter effect number, -1 to exit
0
Now Playing: Sine vibration
Enter effect number, -1 to exit
4
Play effect: No such device

这里No such device讲的是奇迹。我的控制器确实以某种方式断开了连接。

我读拱门维基并发现了这个:

如果您遇到游戏中隆隆声功能不起作用的问题,可能需要设置环境变量 SDL_JOYSTICK_HIDAPI=0

所以以下如何设置用户环境变量?,我/etc/environment用编辑SDL_JOYSTICK_HIDAPI=0。然后,我重新启动。这里没有成功。

我也尝试按照xboxdrv维基百科中的建议进行操作,但也没有成功。

答案1

这可能是电源问题。我也遇到过类似的问题,将一个或多个 360 控制器插入未通电的 USB 集线器。

这是因为在未通电的集线器上,所有设备都必须从上游端口分离电流。在供电集线器上,每个端口都有自己的电流限制。

解决方案是切换到供电集线器或尝试将控制器直接连接到计算机。

来源

相关内容