鼠标被识别为键盘 xinput (Fedora 22)

鼠标被识别为键盘 xinput (Fedora 22)

我最近得到了一个 Cougar 700m 游戏鼠标,它在 Fedora 22 中无法工作。运行 xinput 将其列为从属键盘。

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ PS/2 Generic Mouse                        id=11   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]
⎜   ↳ Wacom Serial Penabled 2FG Touchscreen stylus  id=15   [slave  pointer  (2)]
⎜   ↳ Wacom Serial Penabled 2FG Touchscreen eraser  id=16   [slave  pointer  (2)]
⎜   ↳ Wacom Serial Penabled 2FG Touchscreen touch   id=17   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ HP HD Webcam [Fixed]                      id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                            id=14   [slave  keyboard (3)]
    ↳ COUGAR 700M COUGAR 700M Gaming Mouse      id=13   [slave  keyboard (3)]

除了重新编译内核之外,有没有办法解决这个问题?

uname -r : 4.0.4-303.fc22.x86_64

答案1

令人惊讶的是,之前的答案有效!

我有一台 Cougar 700m,但它在 Ubuntu 中无法工作。在 Ubuntu 14.04 LTS 上为我下载、修补和编译内核的步骤(大部分摘自https://help.ubuntu.com/community/Kernel/Compile):

sudo apt-get install linux-source
cd src/
tar xjvf /usr/src/linux-source-3.13.0.tar.bz2 
cd linux-source-3.13.0/
cp -vi /boot/config-`uname -r` .config
make oldconfig
make localmodconfig
make xconfig
cd include/linux/
(modify HID_MAX_USAGES as required)
cd ../../
make -j4 deb-pkg
cd ../
sudo dpkg -i linux-headers-3.13.11-ckt30_3.13.11-ckt30-1_amd64.deb 
sudo dpkg -i linux-image-3.13.11-ckt30_3.13.11-ckt30-1_amd64.deb 

遗憾的是,您需要内核补丁来完成此类事情,但实际上做起来非常轻松。当然,现在我每次更新内核都必须重新应用补丁......

答案2

使用以下补丁重建内核:

--- a/include/linux/hid.h       2014-09-22 01:41:22.907084621 -0400
+++ b/include/linux/hid.h       2014-09-22 01:42:10.166556867 -0400
@@ -333,7 +333,7 @@
  * This is the local environment. It is persistent up the next main-item.
  */

-#define HID_MAX_USAGES                 12288
+#define HID_MAX_USAGES                 32768
 #define HID_DEFAULT_NUM_COLLECTIONS    16

 struct hid_local {

相关内容