Added fix for archlinux

This commit is contained in:
Christoph Haas 2016-10-28 12:54:50 +02:00
parent ce7d4ded68
commit 5255ad26ce
3 changed files with 37 additions and 4 deletions

View File

@ -48,7 +48,7 @@ dkms: clean
rm -rf /usr/src/$(MODULE_NAME)-$(MODULE_VER)
mkdir /usr/src/$(MODULE_NAME)-$(MODULE_VER) -p
cp . /usr/src/$(MODULE_NAME)-$(MODULE_VER) -a
rm -rf /usr/src/$(MODULE_NAME)-$(MODULE_VER)/.hg
rm -rf /usr/src/$(MODULE_NAME)-$(MODULE_VER)/.git
$(REMOVE_MODULE)
dkms add -m $(MODULE_NAME) -v $(MODULE_VER)
dkms build -m $(MODULE_NAME) -v $(MODULE_VER)

View File

@ -5,7 +5,7 @@ The kernel reports the chipset as `Microdia`
Written for the Perixx PX-1800 USB Keyboard: [Perixx PX-1800 Keyboard](http://www.perixx.com/en/service/Perixx_Manual/GAMING/PX-1800.pdf)
Original base: swoogan.blogspot.de/2014/09/azio-l70-keyboard-linux-driver.html
Original base: http://swoogan.blogspot.de/2014/09/azio-l70-keyboard-linux-driver.html, https://bitbucket.org/Swoogan/aziokbd
> NOTE: Makefile and instructions are only tested on Ubuntu 16.04 and Archlinux 2016.10 (Kernel 4.8.4)
@ -40,7 +40,7 @@ Original base: swoogan.blogspot.de/2014/09/azio-l70-keyboard-linux-driver.html
**NOTE: install.sh attempts to blacklist the driver for you. You shouldn't need to do anything manually. These instructions are to explain the process, in the event something goes wrong.**
You need to blacklist the device from the generic USB hid driver in order for the aziokbd driver to control it.
You need to blacklist the device from the generic USB hid driver in order for the perixxkbd driver to control it.
## Kernel Module ##
If the USB hid driver is compiled as a kernel module you will need to create a quirks file and blacklist it there.
@ -68,3 +68,9 @@ Then run `sudo update-grub` and reboot.
Again, if you find that `0x4` doesn't work, try `0x7`.
## Add to initramfs ##
On Archlinux the module has to be added to `/etc/mkinitcpio.conf`. Otherwise usbhid will fetch the keyboard before perixxkbd is loaded.
Therefor add "perixxkbd" to the MODULES section and rebuild the initramfs with `sudo mkinitcpio -p linux`

View File

@ -6,12 +6,29 @@ if [[ $1 != 'dkms' ]]; then
echo '## Installing package ##'
make install
if [[ $1 -ne 4 ]]; then
quirk='0x0c45:0x7603:0x0007'
echo '## Quirk set to 0007 ##'
else
quirk='0x0c45:0x7603:0x0004'
echo '## Quirk set to 0004 ##'
fi
else
echo '## Installing package with DKMS ##'
make dkms
if [[ $2 -ne 4 ]]; then
quirk='0x0c45:0x7603:0x0007'
echo '## Quirk set to 0007 ##'
else
quirk='0x0c45:0x7603:0x0004'
echo '## Quirk set to 0004 ##'
fi
fi
quirk='0x0c45:0x7603:0x0007'
modquirk="options usbhid quirks=$quirk"
grubquirk="usbhid.quirks=$quirk"
@ -37,6 +54,7 @@ if (lsmod | grep 'usbhid'); then
echo '## Attempting to reload usbhid module ##'
rmmod usbhid && modprobe usbhid quirks=$quirk
echo '## Reload done. Please reboot if the keyboard is not working yet! ##'
echo '## If the keyboard does not work after reboot, try reinstalling the script with ./install.sh [dkms] 4 ##'
else
echo '## usbhid is compiled into kernel ##'
@ -59,5 +77,14 @@ else
fi
echo '## You must reboot to load the module ##'
echo '## If the keyboard does not work after reboot, try reinstalling the script with ./install.sh [dkms] 4 ##'
fi
if [ -f /etc/mkinitcpio.conf ]; then
echo '## Enabling module in initramfs ##'
if ! (cat /etc/mkinitcpio.conf | grep "perixxkbd"); then
sed -i 's|^MODULES="|MODULES="perixxkbd |g' /etc/mkinitcpio.conf
fi
mkinitcpio -p linux
fi