dkms安装内核模块但重启后无法正常工作

我买了一个在lsusb上显示的键盘:

 Bus 002 Device 009: ID 0c45:7603 Microdia 

CtrlWindows / SuperAlt按钮都映射到Shift按钮。 所以我按照硬件代码在这里找到了这个解决方案,效果很好:

 dkms status aziokbd aziokbd, 1.0.0, 3.13.0-48-generic, x86_64: installed 

但是,重新启动后,键盘会回到原始状态(ctrl / alt / win映射到shift),而dkms status与上面相同,所以我必须sudo dkms uninstall -m aziokbd -v 1.0.0然后重新安装。

我怎么能“保存”安装状态? 谢谢。

我是ubuntu 14.04。 输出uname -a

Linux PC 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

  • 安装,重启和不工作后调试信息:

     ##################### dkms status ############################### 8192cu, 1.9, 3.11.0-26-generic, x86_64: installed 8192cu, 1.9, 3.13.0-44-generic, x86_64: installed 8192cu, 1.9, 3.13.0-45-generic, x86_64: installed 8192cu, 1.9, 3.13.0-46-generic, x86_64: installed 8192cu, 1.9, 3.13.0-48-generic, x86_64: installed 8192cu, 1.9, 3.2.0-65-generic, x86_64: installed 8192cu, 1.9, 3.2.0-67-generic, x86_64: installed 8192cu, 1.9, 3.2.0-68-generic, x86_64: installed 8192cu, 1.9, 3.2.0-69-generic, x86_64: installed 8192cu, 1.9, 3.2.0-70-generic, x86_64: installed 8192cu, 1.9, 3.2.0-72-generic, x86_64: installed 8192cu, 1.9, 3.2.0-74-generic, x86_64: installed aziokbd, 1.0.0, 3.13.0-48-generic, x86_64: installed virtualbox, 4.3.10, 3.13.0-46-generic, x86_64: installed virtualbox, 4.3.10, 3.13.0-48-generic, x86_64: installed virtualbox-guest, 4.3.10, 3.13.0-46-generic, x86_64: installed virtualbox-guest, 4.3.10, 3.13.0-48-generic, x86_64: installed #########################################3 lsmod | grep -e usbhid -e aziokbd #######################################3 aziokbd 12900 0 usbhid 52659 0 hid 106148 2 hid_generic,usbhid ######################################## lsusb -t ##################################### /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M |__ Port 1: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M |__ Port 1: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M |__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M |__ Port 3: Dev 5, If 0, Class=Video, Driver=uvcvideo, 480M |__ Port 3: Dev 5, If 1, Class=Video, Driver=uvcvideo, 480M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M |__ Port 2: Dev 3, If 0, Class=Vendor Specific Class, Driver=rtl8192cu, 480M 
  • 重新安装和工作后调试信息:

     ########################### dkms status ########################### 8192cu, 1.9, 3.11.0-26-generic, x86_64: installed 8192cu, 1.9, 3.13.0-44-generic, x86_64: installed 8192cu, 1.9, 3.13.0-45-generic, x86_64: installed 8192cu, 1.9, 3.13.0-46-generic, x86_64: installed 8192cu, 1.9, 3.13.0-48-generic, x86_64: installed 8192cu, 1.9, 3.2.0-65-generic, x86_64: installed 8192cu, 1.9, 3.2.0-67-generic, x86_64: installed 8192cu, 1.9, 3.2.0-68-generic, x86_64: installed 8192cu, 1.9, 3.2.0-69-generic, x86_64: installed 8192cu, 1.9, 3.2.0-70-generic, x86_64: installed 8192cu, 1.9, 3.2.0-72-generic, x86_64: installed 8192cu, 1.9, 3.2.0-74-generic, x86_64: installed aziokbd, 1.0.0, 3.13.0-48-generic, x86_64: installed virtualbox, 4.3.10, 3.13.0-46-generic, x86_64: installed virtualbox, 4.3.10, 3.13.0-48-generic, x86_64: installed virtualbox-guest, 4.3.10, 3.13.0-46-generic, x86_64: installed virtualbox-guest, 4.3.10, 3.13.0-48-generic, x86_64: installed ###################### lsmod | grep -e usbhid -e aziokbd ######################### usbhid 52659 0 aziokbd 12900 0 hid 106148 2 hid_generic,usbhid ######################### lsusb -t ############################ /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M |__ Port 1: Dev 7, If 0, Class=Human Interface Device, Driver=aziokbd, 1.5M |__ Port 1: Dev 7, If 1, Class=Human Interface Device, Driver=aziokbd, 1.5M |__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M |__ Port 3: Dev 5, If 0, Class=Video, Driver=uvcvideo, 480M |__ Port 3: Dev 5, If 1, Class=Video, Driver=uvcvideo, 480M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M |__ Port 2: Dev 3, If 0, Class=Vendor Specific Class, Driver=rtl8192cu, 480M 

usbhid仍然作为键盘的驱动程序加载。 似乎怪癖不modprobe作为modprobe选项。

  1. 从grub尝试内核选项,添加:

     usbhid.quirks=0x0c45:0x7603:0x4 

    /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT

  2. 更新grub

     sudo update-grub 

参考: 防止usbhid声称USB设备