How to install force feedback support for Pantherlord/Greenasia USB PS1/2 Dualshock adapters
-
@PET2001 nice. if you submit this to raspberry pi Linux GitHub repo, they may well l enable it in the main kernels. They have for other settings.
-
proposing to enable
CONFIG_PANTHERLORD_FF=y
CONFIG_GREENASIA_FF=yin the default config for the Raspberry kernel seems like a good idea (as this is already the default on my Ubuntu systems, were the Pantherlord adapters work with force feedback out of the box). There is however one issue remaining: Unless I put ff-memless into my /etc/modules, the Pantherlord driver will not load but throw a "hid_pl: Unknown symbol input_ff_create_memless (err 0)" in the syslog. Obviously that would be a bad experience for users of the Raspberry kernel as it leads to the Pantherlord adapter not working at all.
So until somebody here in the forum can figure out how to make the Pantherlord module get to load the necessary force feedback module (ff-memless) automatically, if a Pantherlord USB adapter is detected, I will abstain from proposing a change to the kernel defaults.
-
-
Still works fine with RetroPie 4.4 running on a 3B+.
Here's my freshly backed version of hid-pl.ko with Force Feedback support for Kernel 4.14.30-v7+. Maybe it helps someone.
-
@peg
hi, im using your shared file and by putting ff-memless into my /etc/modules like PET2001 said, the rumble its working, however i have an issue, the rumble works, on metal gear solid, dino crisis 2 and crash bandicoot 3, but in games like resident evil 2 and Spyro 3 that does support rumble, the rumble doesnt work, you know what can be the cause?. im using an original sony playstation 1 controller with the usb adapter. and im using retropie 4.4 with the Kernel 4.14.30-v7+.thanx for the files, the guide and any help on this matter.
-
Hi all, old topic but hoping you can help
I have latest build, 4.5.1 with kernal 4.14.98-v7+
For the life of me I cannot download this from GitHub. Could someone either supply my the link or compile the code for me?
-
It's a little tricky. First you need to get the exact git hash the firmware you're running is based on. Based on that you can get the git hash the kernel used in this firmware is based on. Finally you can download the matching kernel sources.
This should do:
FIRMWARE_HASH=$(zgrep "* firmware as of" /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | head -1 | awk '{ print $5 }') KERNEL_HASH=$(wget https://raw.github.com/raspberrypi/firmware/$FIRMWARE_HASH/extra/git_hash -O -) curl -L https://github.com/raspberrypi/linux/archive/${KERNEL_HASH}.tar.gz > rpi-linux.tar.gz
-
Hi,
Since since the original HowTo by @PET2001 is very rough and I had some time on my hands: Here's a step by step guide on how to compile and activate the driver with Force Feedback support. Only tested on RetroPie 4.4 running on a 3B+.
# Install required tools (bc is required for modules_prepare, see Compile) sudo apt-get update sudo apt-get install build-essential bc # Setup required variables FIRMWARE_HASH=$(zgrep "* firmware as of" /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | head -1 | awk '{ print $5 }') KERNEL_HASH=$(wget https://raw.github.com/raspberrypi/firmware/${FIRMWARE_HASH}/extra/git_hash -O -) KERNEL_VERSION=$(uname -a | awk '{ print $3 }') HID_DRIVERS_DIR=/lib/modules/${KERNEL_VERSION}/kernel/drivers/hid BUILD_DIR=~/psff_build # Setup build dir mkdir $BUILD_DIR cd $BUILD_DIR # Get kernel source wget https://github.com/raspberrypi/linux/archive/${KERNEL_HASH}.tar.gz -O ${KERNEL_HASH}.tar.gz tar xfz ${KERNEL_HASH}.tar.gz cd linux-${KERNEL_HASH} # Get Module.symvers and Module7.symvers (not sure Module.symvers is really needed) wget https://raw.github.com/raspberrypi/firmware/${FIRMWARE_HASH}/extra/Module.symvers wget https://raw.github.com/raspberrypi/firmware/${FIRMWARE_HASH}/extra/Module7.symvers # Get current kernel config sudo modprobe configs gunzip -c /proc/config.gz > .config # Enable force feedback / rumble support sed -i 's/# CONFIG_PANTHERLORD_FF is not set/CONFIG_PANTHERLORD_FF=y/' .config sed -i 's/# CONFIG_GREENASIA_FF is not set/CONFIG_GREENASIA_FF=y/' .config # Compile driver make modules_prepare make drivers/hid/hid-pl.ko # Update existing hid-pl.ko with FF support (w/ backup of old version) sudo cp -b drivers/hid/hid-pl.ko ${HID_DRIVERS_DIR} # Enable ff-memless module (not sure why "sudo echo ..." isn't enough) sudo su echo ff-memless >> /etc/modules exit # Reboot sudo reboot
-
@peg said in How to install force feedback support for Pantherlord/Greenasia USB PS1/2 Dualshock adapters:
... # Enable ff-memless module (not sure why "sudo echo ..." isn't enough)
That's a common mistake when dealing with redirection
sudo echo ff-memless >> /etc/modules
will run just the 'echo' with
sudo
privileges, the redirection is done with user privileges. An alternative is to usetee
:echo ff-memless | sudo tee /etc/modules
-
@peg As a very experienced windows user and novice Linux user I cant thank you enough for this. Took me about 3 days to get near to achieving it, and you did it in 5 minutes :) Tested on 3 b+ running 4.5.1
-
@peg Many thanks for all this work too. Just to let you know I had to tweak this guide slightly as when running 'make modules_prepare' I got errors on Retropie 4.8 running on a pi zero 2W. It seems that I had to install 'libssl-dev' first before this command. Can confirm that after this all other steps worked, rebooted and rumble working on both pads as expected on the Trixes adaptor.
For those getting the same errors, here's a full update to @peg guide (I take no credit and thank @peg for this easy tutorial and just helping anyone with the same issue)
# Install required tools (bc is required for modules_prepare, see Compile) sudo apt-get update sudo apt-get install build-essential bc # Setup required variables FIRMWARE_HASH=$(zgrep "* firmware as of" /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | head -1 | awk '{ print $5 }') KERNEL_HASH=$(wget https://raw.github.com/raspberrypi/firmware/${FIRMWARE_HASH}/extra/git_hash -O -) KERNEL_VERSION=$(uname -a | awk '{ print $3 }') HID_DRIVERS_DIR=/lib/modules/${KERNEL_VERSION}/kernel/drivers/hid BUILD_DIR=~/psff_build # Setup build dir mkdir $BUILD_DIR cd $BUILD_DIR # Get kernel source wget https://github.com/raspberrypi/linux/archive/${KERNEL_HASH}.tar.gz -O ${KERNEL_HASH}.tar.gz tar xfz ${KERNEL_HASH}.tar.gz cd linux-${KERNEL_HASH} # Get Module.symvers and Module7.symvers (not sure Module.symvers is really needed) wget https://raw.github.com/raspberrypi/firmware/${FIRMWARE_HASH}/extra/Module.symvers wget https://raw.github.com/raspberrypi/firmware/${FIRMWARE_HASH}/extra/Module7.symvers # Get current kernel config sudo modprobe configs gunzip -c /proc/config.gz > .config # Enable force feedback / rumble support sed -i 's/# CONFIG_PANTHERLORD_FF is not set/CONFIG_PANTHERLORD_FF=y/' .config sed -i 's/# CONFIG_GREENASIA_FF is not set/CONFIG_GREENASIA_FF=y/' .config # install libssl-dev otherwise following driver compile will fail on 4.8 / pi zero 2w sudo apt-get install libssl-dev # Compile driver make modules_prepare make drivers/hid/hid-pl.ko # Update existing hid-pl.ko with FF support (w/ backup of old version) sudo cp -b drivers/hid/hid-pl.ko ${HID_DRIVERS_DIR} # Enable ff-memless module (not sure why "sudo echo ..." isn't enough) sudo su echo ff-memless >> /etc/modules exit # Reboot sudo reboot
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.