[Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

yabba235
Know my way around
Posts: 109
Joined: Sun Oct 20, 2013 4:06 am
Location: Central EU

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by yabba235 »

In my linux station Ubuntu 16 succesfull compiling module xpad.ko under qts 4.3.3 ut i got error when :
load this module:

[146837.322891] xpad: Unknown symbol xpad_send_led_command (err 0)
[146837.322960] xpad: Unknown symbol kmem_cache_alloc_trace (err 0)
[146837.322981] xpad: Unknown symbol __fentry__ (err 0)

modinfo get it:
modinfo xpad.ko
filename: xpad.ko
license: GPL
author: Marko Friedemann <mfr@bmx-chemnitz.de>
description: X-Box pad driver
alias: usb:v162Ep*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v15E4p*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v1532p*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v24C6p*d*dc*dsc*dp*icFFisc47ipD0in*
alias: usb:v24C6p*d*dc*dsc*dp*icFFisc5Dip01in*
alias: usb:v1689p*d*dc*dsc*dp*icFFisc5Dip01in*
alias: usb:v0F0Dp*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v1BADp*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v146Bp*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v1430p*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v12ABp*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v0E6Fp*d*dc*dsc*dp*icFFisc47ipD0in*
alias: usb:v0E6Fp*d*dc*dsc*dp*icFFisc5Dip01in*
alias: usb:v0738p*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v046Dp*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v045Ep*d*dc*dsc*dp*icFFisc47ipD0in*
alias: usb:v045Ep*d*dc*dsc*dp*icFFisc5Dip01in*
alias: usb:v044Fp*d*dc*dsc*dp*icFFisc5Dip01in*
depends:
vermagic: 4.2.8 SMP mod_unload
parm: sticks_to_null:Do not map sticks at all for unknown pads
parm: triggers_to_buttons:Map triggers to buttons rather than axes for unknown pads
parm: dpad_to_buttons:Map D-PAD to buttons rather than axes for unknown pads

I use config file for linux-4.2-x86_64.config from GPL_QTS-4.3.x-20161219.tar.gz ( thank's QNAP Helpdesk :)).
I don't know what is wrong ? Config file is good, headers file is for kernel 4.2.8, so ...?
Zotac MI553 (Hackintosh), NAS Qnap TS-453mini 6TB RAID5/128GB ssd for system,UPS APC x 2, PJ JVC DLA-X500, PCV screen, in-wall speakers 7.1 by KEF powered by Marantz, SR6011 and Remote Pronto TS9400
User avatar
ouija
Getting the hang of things
Posts: 63
Joined: Thu Aug 29, 2013 2:02 pm

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by ouija »

knwt wrote: I don't know where to find this compiler-gcc5.h.
I've updated the tutorial to include compiling instructions for Ubuntu 16.04 now as well, as I’ve finally updated my Linux Station today to 16.04. Please refer to the original post and let me know if you have any further issues. :geek:
nikoss
New here
Posts: 2
Joined: Fri Dec 16, 2016 8:06 am

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by nikoss »

yabba235 wrote:In my linux station Ubuntu 16 succesfull compiling module xpad.ko under qts 4.3.3 ut i got error when :
load this module:

[146837.322891] xpad: Unknown symbol xpad_send_led_command (err 0)
[146837.322960] xpad: Unknown symbol kmem_cache_alloc_trace (err 0)
[146837.322981] xpad: Unknown symbol __fentry__ (err 0)

modinfo get it:
modinfo xpad.ko
filename: xpad.ko
license: GPL
author: Marko Friedemann <mfr@bmx-chemnitz.de>
description: X-Box pad driver
alias: usb:v162Ep*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v15E4p*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v1532p*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v24C6p*d*dc*dsc*dp*icFFisc47ipD0in*
alias: usb:v24C6p*d*dc*dsc*dp*icFFisc5Dip01in*
alias: usb:v1689p*d*dc*dsc*dp*icFFisc5Dip01in*
alias: usb:v0F0Dp*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v1BADp*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v146Bp*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v1430p*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v12ABp*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v0E6Fp*d*dc*dsc*dp*icFFisc47ipD0in*
alias: usb:v0E6Fp*d*dc*dsc*dp*icFFisc5Dip01in*
alias: usb:v0738p*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v046Dp*d*dc*dsc*dp*icFFisc5Dip81in*
alias: usb:v045Ep*d*dc*dsc*dp*icFFisc47ipD0in*
alias: usb:v045Ep*d*dc*dsc*dp*icFFisc5Dip01in*
alias: usb:v044Fp*d*dc*dsc*dp*icFFisc5Dip01in*
depends:
vermagic: 4.2.8 SMP mod_unload
parm: sticks_to_null:Do not map sticks at all for unknown pads
parm: triggers_to_buttons:Map triggers to buttons rather than axes for unknown pads
parm: dpad_to_buttons:Map D-PAD to buttons rather than axes for unknown pads

I use config file for linux-4.2-x86_64.config from GPL_QTS-4.3.x-20161219.tar.gz ( thank's QNAP Helpdesk :)).
I don't know what is wrong ? Config file is good, headers file is for kernel 4.2.8, so ...?
Can you try this on your Ubuntu installation? I assume you use the src and config provided by QNAP.
Place your source code in:

Code: Select all

/usr/src/linux-headers-`uname -r`/

Code: Select all

sudo nano /usr/src/linux-headers-`uname -r`/include/generated/utsrelease.h
Make sure you have this (remove the plus sign if you see one):

Code: Select all

#define UTS_RELEASE "4.2.8"
Then this:

Code: Select all

sudo apt-get install dkms
sudo mkdir /usr/src/xpad-0.0.6/
cd /usr/src/xpad-0.0.6/
sudo nano dkms.conf
Inside dkms.conf put this:

Code: Select all

PACKAGE_NAME="xpad"
PACKAGE_VERSION="0.0.6"
BUILT_MODULE_NAME[0]="xpad"
DEST_MODULE_LOCATION[0]="/kernel/drivers/input/joystick/xpad"
Copy or download in the same directory xpad.c and Makefile as provided by ouija previously:

Code: Select all

wget https://raw.githubusercontent.com/ValveSoftware/steamos_kernel/brewmaster-4.1/drivers/input/joystick/xpad.c && wget -O Makefile http://pastebin.com/raw.php?i=HRqeQZ92
And run:

Code: Select all

sudo dkms add -m xpad -v 0.0.6
sudo dkms build -m xpad -v 0.0.6
Finally grab xpad.ko from /var/lib/dkms/xpad/0.0.6/4.2.8/x86_64/module/xpad.ko, copy it over to your host (QTS) and continue the remaining steps from ouija's guid.
schribl
New here
Posts: 2
Joined: Wed Mar 01, 2017 5:15 am

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by schribl »

Hi everyone,

first of all thanks for the guide! However I encounter the same problem as yabba235 on QTS 4.3.3 running Linux Kernel 4.2.8. I also tried the suggestion from nikoss, without any change in result. Is the warning regarding Module.symvers important?

Has anybody ideas how to solve this issue? If required I can provide more information but I did not know what might be necessary :/
nikoss
New here
Posts: 2
Joined: Fri Dec 16, 2016 8:06 am

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by nikoss »

Okay I've attached it here.

The module was compiled against QTS 4.3.3, kernel 4.2.8 on a TS-251+.
You do not have the required permissions to view the files attached to this post.
schribl
New here
Posts: 2
Joined: Wed Mar 01, 2017 5:15 am

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by schribl »

nikoss wrote:Okay I've attached it here.

The module was compiled against QTS 4.3.3, kernel 4.2.8 on a TS-251+.
Many thanks! That module works on my TS-453A (even so the Xbox One controller is not working). Can you guide me through the process to build it myself? I think I need something from the QTS 4.3.3 sources but I was unable to locate/find them :(
LaRseTe
Starting out
Posts: 31
Joined: Fri Dec 23, 2016 5:59 pm

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by LaRseTe »

Hi guys, this is amazing!

I guess the same thing is needed for the Steam Controller right?
kenske
New here
Posts: 2
Joined: Tue Nov 08, 2016 1:50 am

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by kenske »

Hi Ouija!

First of all, thanks for the guide. I tried to install it on my NAS (TS-453A, Ubuntu 16.04, kernel 4.2.8 ). Everything seems to build fine, but when I restart the container, the xpad module doesn't show up in lsmod. I reinstalled the Linux Station and went through all the steps again to make sure I didn't have any extra packages that might break it. Any ideas on how to debug this?
User avatar
ouija
Getting the hang of things
Posts: 63
Joined: Thu Aug 29, 2013 2:02 pm

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by ouija »

kenske wrote:Any ideas on how to debug this?
I recently updated my QNAP TS-871 Pro to the new 4.3 firmware -- which updated me to kernel 4.2.8 as well -- and my previous guide doesn't seem to work properly with new kernel (it would build but wouldn't load the module). I was too lazy to actually replicate the steps outlined by nikoss, so I ended up using the kernel module he compiled for his TS-251+ (since I had the same kernel version) and it worked without issue! [thanks nikoss!]

I've attached his compiled module to this reply as well, just to make things easier :)

Just ensure that you are loading the module OUTSIDE of Linux Station, but rather within an SSH session to your QNAP itself. When loaded, it will appear within Linux Station.

Hope this helps!
You do not have the required permissions to view the files attached to this post.
peibolmeneibol
New here
Posts: 3
Joined: Tue Apr 23, 2019 2:50 pm

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by peibolmeneibol »

nikoss wrote: Wed Mar 01, 2017 9:19 pm Okay I've attached it here.

The module was compiled against QTS 4.3.3, kernel 4.2.8 on a TS-251+.
Can you share the file again?
napper1237
Starting out
Posts: 39
Joined: Mon Aug 14, 2017 4:36 pm

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by napper1237 »

Hi

I'm getting beaten at the first hurdle here. Trying to install the compiler:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.14.24-qnap
E: Couldn't find any package by glob 'linux-headers-4.14.24-qnap'
E: Couldn't find any package by regex 'linux-headers-4.14.24-qnap'
E: Unable to locate package build-essential
E: Unable to locate package automake1.11
E: Couldn't find any package by glob 'automake1.11'
E: Couldn't find any package by regex 'automake1.11'
E: Unable to locate package git

is this all now out of date? Any help would be greatly appreciated - I've got retroarch/dolphin/ludo all running nicely but can't do anything with them as yet due to no controller!

On top of this I have to go with a wireless xbox pad due to the nas being in a basement machine cupboard.

Again....any help much appreciated

Thanks
napper1237
Starting out
Posts: 39
Joined: Mon Aug 14, 2017 4:36 pm

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by napper1237 »

yeeesh....so that was just because I wasn't running as root. Am one step on...gonna keep posting here in case anyone is reading...
now using
cd ./xpad && wget https://raw.githubusercontent.com/Valve ... ick/xpad.c && wget -O Makefile http://
pastebin.com/raw.php?i=HRqeQZ92

fails as doesn't find wget

I've double checked the apt update and it's worked, even redid it (sudo apt -get update)

still not seeing wget (grr).

hints and tips gratefully received please....
napper1237
Starting out
Posts: 39
Joined: Mon Aug 14, 2017 4:36 pm

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by napper1237 »

still truckin.....resolved all but getting it to launch from the shell script.
So ... in the instructions it states to add the launch line before the #module line but this doesn't exist in mine...assuming this may have something to do with it....

I'm really guessing...is it obvious? :)
mturcotte
New here
Posts: 6
Joined: Wed Feb 05, 2020 11:22 pm

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by mturcotte »

Hi,

bringing back this topic in order to shed some light on what direction i should go. there seems to be a lot of knowledge acquired on this matter and I don't want to go through it all from step 1.

I have retroarch running on ts251, and i own two PC USB xbox controllers, and 2 wireless xbox one controllers. the TS251 is not accessible, though i can use usb over ethernet extender that if i end up going this route.

What should I do and what should I use in order to play my games, the wired other ethernet, if so what do I need to do it, or if its wireless, what do I need to do so?


Thank you,
woelrutie
New here
Posts: 3
Joined: Mon Mar 31, 2014 10:17 am

Re: [Linux Station] Xbox 360 controller with Xboxdrv, Xpad or SteamOS Xpad

Post by woelrutie »

Has anyone had any success with this recently? The compiled modules are no longer available for download. I successfully built the module, but as napper1237 pointed out, the instructions say to add the launch line before the # module line, which doesn't exist in my config file. Additionally, I had the same experience as ouija where my module wouldn't load. Any assistance would be greatly appreciated.
Post Reply

Return to “Container Station”