Prevent hard Kernel-crashes in UE (and possibly other) games

1 Beitrag / 0 neu
playingtux
Bild des Benutzers playingtux
Offline
Last seen: vor 23 Stunden 25 Minuten
AdminWelcome!
Beigetreten: 19.04.2014 - 19:08
Prevent hard Kernel-crashes in UE (and possibly other) games

There exists a bug in the Linux xpad-driver, which can lead to serious hard-crashes mostly in UE (Unreal Engine) games, when a Xbox360-controller is connected to your computer

What you can observe when you hit this bug varies from simple Kernel-messages to complete Kernel-lockups with "hard crashing" your system.

There is a fix for it, but you have to recompile the "xpad"-module. The following was written by the user metalcaedes in a Steam-Forum.

How to use it:
In a Terminal do (the lines starting with "#" are comments and must not be executed in the shell):
mkdir xpad-impr
cd xpad-impr
# get the latest xpad.c from the official kernel source
wget https://github.com/torvalds/linux/raw/f20c86cd75f1c8c728dafd0218645ff3c5...
# get the patch from Sarah Bessmer (updated by me)
wget -O sarah.patch http://pastebin.com/raw.php?i=JbyxBZeM
# get Makefile
wget -O Makefile http://pastebin.com/raw.php?i=HRqeQZ92

# for some stupid reason pastebin removes trailing newlines, add them again
echo -e "\n\n" >> sarah.patch

# apply Sarah's patch
patch -p1 -i sarah.patch

# build the kernel module
make

# make sure it worked:
ls xpad.ko

# unload the old xpad module
sudo rmmod xpad

# load the new one
sudo insmod xpad.ko

The user NoXPhasma in the same forum added instructions how to make this permanent:

For automatically building this module for future kernel updates and permanent install at the curent one, follow this guide: http://wiki.centos.org/HowTos/BuildingKernelModules#head-d313bd351f90d4f...

1. Create a new dkms.conf file in the folder which contains the patched xpad.c and the make file, with this content:
PACKAGE_NAME="xpad"
PACKAGE_VERSION="0.3"
MAKE[0]="make KVERSION=$kernelver"
CLEAN="make clean"
DEST_MODULE_LOCATION[0]="/extra"
BUILT_MODULE_NAME[0]="xpad"
AUTOINSTALL="yes"
The folder should only contain this 3 files.
2. Copy the folder to /usr/src.
3. execute this 3 commands as root to build and install the module:
dkms add -m xpad -v 0.3
dkms build -m xpad -v 0.3
dkms install -m xpad -v 0.3

Now this module is installed and will be build on each kernel update automatically.

I've tried it, and it worked for me. No more crashing in UE-games!