How to get your XBox 360 Wireless Controller working under your Linux box

Xbox 360 Wireless Controller, source: wikipedia.org
Image source: wikipedia.org

 

A lot of games today need a controller … yes, even on PC you can’t ignore that fact.

One of the best controllers out there in the wild is (IMHO) the XBox 360 Wireless Controller from Microsoft. The Wired version of this controller can be easily connected through Plug & Play. The standard loaded driver xpad then can handle it.
But what do you have to do if the controller is the wireless Version?

1. First things first

You need of course a receiver which gets all the signals that are sent from your controller. This receiver is (normally) not included when you’re buying the controller. The receiver also comes from Microsoft and costs ~ 19,-ÔéČ here in the EU. I have also seen some third party products here which are way more cheaper, but actually I really can’t say if they are working that well.
After you plugged in the receiver, the kernel will recognize it but yet it is actually unable to do anything.

 

2. The driver

As I mentioned before, if you’re useing the wired controller, then you have to nothing to be worried about. Everything will work out of the box.
Anyways, for the wireless XBox 360 Controller you need a driver which is called ‘xboxdrv’.

Under Ubuntu and Debian this driver can be easily installed with apt. This means the driver is already available in the repositorys:

sudo apt-get install xboxdrv

In openSUSE the driver is also in the official repositorys as long as you are on openSUSE Tumbleweed or Leap (42.1):

sudo zypper install xboxdrv

For Fedora, Arch and any other distribution you have to check for your owner whether you need a extra repository for the driver or not.

 

3. Start the driver

Starting the driver with default settings is rather simple. The following command starts the driver with default settings:

sudo xboxdrv

If you didn’t unloaded the xpad driver before you will run into an error message that the driver couldn’t be loaded because the xpad driver is already loaded.

To unload the xpad module you can use ‘rmmod xpad’ or let the xboxdrv do that for you:

sudo xboxdrv --detach-kernel-driver

Now you should see something like the following output on your terminal window:

Controller: Xbox 360 Wireless Receiver
Vendor/Product: 045e:0719
USB Path: 005:004
Wireless Port: 0
Controller Type: Xbox360 (wireless)

Your Xbox/Xbox360 controller should now be available as:
/dev/input/js0
/dev/input/event19

Press Ctrl-C to quit, use ‘–silent’ to suppress the event output

So this means, you’re ready to go. Useing buttons and pads on the controller should create tons of output which you can ignore. Do disable this output add the ‘–silent’ option to the xboxdrv command:

sudo xboxdrv --detach-kernel-driver --silent

Now you should be able to use your XBox 360 Wireless controller with almost every native Linux game which is available.

 

4. Useing xboxdrv with WINE
For useing xboxdrv with WINE there are a lot of tutorials out there. Some of them recommend to install a mapper which will map controller keys to keyboard keys and many other solutions. For me the simpelst way was to simply add the following parameter to the xboxdrv command line:

sudo xboxdrv --detach-kernel-driver --silent --mimic-xpad

The “–mimic-xpad” option says the xboxdrv driver that he should act and perform like a controller that is connected to your Linux box as an xpad Controller. Now you should be also able to use your controller under WINE games.

NOTE: I recently bought Dark Souls: Prepare to die edition from the Humble Bundle Sping Sale. This game does not come native to Linux but works well here with WINE. To get the correct mapping of your XBox 360 Wireless controller here you have to start xboxdrv like this:

sudo xboxdrv --detach-kernel-driver --silent --mimic-xpad --buttonmap 1=3,3=1,2=4,4=2,rt=start,lt=back,start=rt,back=lt --ui-buttonmap guide=KEY_LEFTSHIFT+KEY_TAB,rt=KEY_END,lt=KEY_G

If you want to play Dark Souls I with a controller on your Linux box with WINE, you have to add the “buttonmap” section to your xboxdrv command. Otherwise the B-Button in game will be the X-Button on your wireless controller for e.g.
Of course, this “buttonmap” section only works with Dark Souls I for now. Other games, other button mapping. You should consult the AppDB from WINE to find the right button mapping for your game.

League of Legends back on WINE

Since several patches, League of Legends does not work with WINE anymore or better I say, League of Legends does not work acceptable with WINE anymore. If you look at the FPS while playing you will see a maximum of 15 FPS at all.

Since yesterday I have a solutions found for that. I am a active board member of the ACE Client and a disscussion someone wrote, that we just have to set the WINE version to “Windows 7” and make some overrides for some DLLs.
Well, the DLLs always crashing the game for me, but the “WINE Windows 7 Version” hint gave me an awesome FPS boost from 15 to 40 FPS at all! In Teamfights it can drop down to 20-30 FPS.

So, what do you have to do now, to get League of Legends working with WINE again? Here are the steps you have to take:
1. Just simply install the game (best option here is to make fresh installation).
2. Install with winetricks the following requirements: d3dx9, vcrun2005
3. Navigate in a terminal to your League of Legends install directory and then switch to the subdirectorys rads/system (for example /home/$USER/.wine/drive_c/Riot Games/League of Legends/rads/system/).
4. Now, just use the following command to start the League of Legends launcher (please don’t forget to set the WINEPREFIX for League of Legends if you have one): wine “rads_user_kernel.exe” run lol_launcher $(ls ../projects/lol_launcher/releases/) LoLLauncher.exe

That’s it! The game should be working now, with an acceptable framerate! Tested under openSUSE 12.1 with WINE 1.3.35 and 1.3.36!

I’m actually thinking about to make a script for PlayOnLinux to bring you the easiest possible install and usage for League of Legends with WINE, but actually I have to learn their syntax ­čÖé

Greetings
ReCon

Actually no more winelol packages

Dear Blog readers,

at the last weeks, I got a lot of feedback from many people, which want to know if winelol still is / was in “development” and if there will be a release vor the new Ubuntu 11.10.

Shortly, no! Actually there is no way to get League of Legends working under WINE anymore (even with the ACE Client, which is actually crashing when you try to play).

So, you can still try testing the official Riot Client and the new ACE Client releases. I recommend to you, to use my first guide ( ), to make your own “winelol” version.

 

At least a litte “Thank you” to every person, which gave me a lot of feedback to do the previuosly released versions. – Special thanks goes to K1773R!

Greetings
ReCon

Small update for winelol-1.3.25

For german translation, scroll down

Greetings Summoners,

I have made a small update for winelol-1.3.25 while recreated the wineloldeps Script.

So, just easily update your winelol Version to the newest one and you are able to get the requirements for LoL with the command “wineloldeps” again.

Greetings
ReCon

German translation

Gr├╝├če Beschw├Ârer,

ich habe ein kleines Update f├╝r winelol-1.3.25 durchgef├╝hrt, welches das wineloldeps Script wieder enth├Ąlt.

Also, updatet eure Version von winelol auch auf die neuste und ihr k├Ânnt die Anforderungen f├╝r LoL wieder ganz einfach ├╝ber den Befehl “wineloldeps” installieren.

Gr├╝├če
ReCon

winelol 1.3.25 released

For German translation, scroll down

Greetings Summoners,

few weeks are now gone since the last update, but today I’m happy to say, that winelol 1.3.25 ist out.

I readed in some blogs and webplattforms, that some users can’t connect to a game, while their Windows Version in WINE is set to win2k (Workaround for the freeze in game, while chatting). With this update you can set your WINE Windows Version to XP and the chat also works fine and a connection to the game is possible, too.

The update is now available for Ubuntu Version 11.04 (Natty), 10.10 (Maverick) and 10.04 (Lucid) at Launchpad / PPA from here: https://launchpad.net/~s-elser/+archive/winelol
This means, everbody who has actually add this PPA to the system will get it automatically while he update ­čśë

So, this is all for now. For questions use the comments section below ­čśë

Please, don’t forget, that you have to use the ACE Client (ace-client.net), because the Riot Patcher does not work with WINE actually.

Greetings
ReCon

NOTE: A “thanks” fly to RoosterCockburn, for his very nice tutorial. See here for a full guide to get this WINE Version running with LoL ­čśë

German translation

Gr├╝├če Beschw├Ârer,

einige Wochen sind vergangen seit dem letzten Update, aber heute habe ich winelol in der Version 1.3.25 ver├Âffentlicht.

Ich habe auf einigen Blogs und Webplattformen gelesen, dass einige Nutzer, welche die WINE Windows Version auf 2000 gesetzt haben (Workaround f├╝r das eingefrorene Spiel Problem beim Chatten) keine Spiel beitreten k├Ânnen. Mit diesem Update ist das Problem Geschichte, den nun kann die WINE Windows Version auf XP gesetzt und trotzdem gechattet werden. Ebenso ist es mit “XP” m├Âglich dem Spiel ganz normal beizutreten.

Das Update ist ab sofort f├╝r die Ubuntu Versionen 11.04 (Natty), 10.10 (Maverick) und 10.04 (Lucid) ├╝ber das PPA verf├╝gbar: https://launchpad.net/~s-elser/+archive/winelol
Das bedeutet, dass jeder, der aktuell das PPA seinem System hinzugef├╝gt und das Paket bereits installiert hat, dieses Update beim n├Ąchsten Systemupdate automatisch miterh├Ąlt ­čśë

Das ist erst einmal alles f├╝r diesen Moment. F├╝r Fragen und Probleme, benutzt den Kommentarbereich.

Bitte vergesst nicht, dass ihr den ACE Client (ace-client.net) f├╝r das Spielen von League of Legends mit WINE ben├╝tzen m├╝sst, da der offizielle RIOT Patcher aktuell nicht mit WINE funktioniert.

Gr├╝├če
ReCon

ANMERKUNG: Ein Danke geht an den User RoosterCockburn f├╝r sein gutes Tutorial mit diesem PPA. Das Tutoial kann hier (Englisch) eingesehen werden.

winelol 1.3.19 released

For german translation scroll down …

Greetings Summoners,

today, I have the release of winelol 1.3.19 for you. This version contains the actually development release of WINE and the ole patch for the League of Legends Patcher.

This release is gonna be shipped with launchpad, so you have to go to this homepage to get your release: https://launchpad.net/~s-elser/+archive/winelol

After you added the PPA to your repositorys you can easily do

sudo apt-get install winelol

To get the actually winelol version. Future versions will also be shipped over launchpad and can be easily upgraded with apt or synaptic.

Please note, that Riot released a new patcher, which actually does not work with WINE. A solution is already found and can be grabbed at the official League of Legends forums. For more informations look at his post here at my blog:

https://unixblogger.wordpress.com/2011/05/08/league-of-legends-wine-patcher-problem-solved/

Also, I pleasure you to look at the improvements tips to get the best performance out of League of Legends with WINE:

https://unixblogger.wordpress.com/2011/02/07/improfe-the-performance-of-lol-in-wine/

https://unixblogger.wordpress.com/2011/03/13/the-ultimative-performance-boost-for-league-of-legends-with-wine/

Greetings
ReCon

German translation:

Gr├╝├če Beschw├Ârer,

heute habe ich den Release von winelol 1.3.19 f├╝r euch. Diese Version enth├Ąlt die aktuelle WINE Entwicklerversion 1.3.19 und den ole patch f├╝r den League of Legends Patcher.

Dieser Release wird ├╝ber Launchpad verteilt, d. h. ihr m├╝sst auf diese Hompage besuchen um die aktuelle Version zu erhalten:
https://launchpad.net/~s-elser/+archive/winelol

Nachdem ihr das PPA zu euren Paketquellen hinzugef├╝gt habt, k├Ânnt ihr mit dem Befehl

sudo apt-get install winelol

ganz einfach die aktuelle winelol Version herunterladen. Zuk├╝nftige Versionen werden ebenfalls ├╝ber Launchpad verteilt und k├Ânnen au├čerdem einfach mit apt oder Synaptic geupdatet werden.

Bitte beachtet, dass Riot einen neuen Patcher verwendet / ver├Âffentlicht hat und dieser aktuell nicht mit WINE funktioniert. Eine L├Âsung hierf├╝r ist jedoch bereits vorhanden und kann im offiziellen League of Legends Forum gefunden werden. F├╝r weitere Informationen beachtet meinen Post hier auf meinem Blog:

https://unixblogger.wordpress.com/2011/05/08/league-of-legends-wine-patcher-problem-solved/

Au├čerdem bitte ich euch die Tipps zur Verbesserung der Performance zu beachten um das Beste aus der Kombination WINE / League of Legends herauszuholen:

https://unixblogger.wordpress.com/2011/02/07/improfe-the-performance-of-lol-in-wine/

https://unixblogger.wordpress.com/2011/03/13/the-ultimative-performance-boost-for-league-of-legends-with-wine/

Gr├╝├če
ReCon

League of Legends WINE Patcher problem solved

For german translation scroll down!

Greetings Summoners,

the problem with the patcher and WINE is solved now, there is a temporarily solution, which can be found here: http://eu.leagueoflegends.com/board/showthread.php?t=188568&highlight=linux

You have to easily download the file and overwrite your actually patcher with it and it is working again.

Special thanks flies to Daniel! He post this link yesterday here at my blog ­čśë

In the next hours, the release of the winelol PPA will be available for 32 and 64 Bit.

Greetings
ReCon

German translation

Gr├╝├če Beschw├Ârer,

das Problem mit dem Patcher und WINE ist gel├Âst. Es existiert eine tempor├Ąre L├Âsung, welche hier heruntergeladen werden kann:┬áhttp://eu.leagueoflegends.com/board/showthread.php?t=188568&highlight=linux

Ihr m├╝sst lediglich die Datei herunterladen und mit dem aktuellen Patcher ├╝berschreiben, anschlie├čend funktioniert alles wieder.

Ein besonderes Dankesch├Ân geht an Daniel! Er hat gestern den Link hier auf meinem Blog gepostet ­čśë

In den n├Ąchsten Stunden werde ich au├čerdem das winelol PPA f├╝r 32 und 64 Bit ver├Âffentlichen.

Gr├╝├če
ReCon