Welcome to the Forum Archive!

Years of conversation fill a ton of digital pages, and we've kept all of it accessible to browse or copy over. Whether you're looking for reveal articles for older champions, or the first time that Rammus rolled into an "OK" thread, or anything in between, you can find it here. When you're finished, check out the boards to join in the latest League of Legends discussions.

GO TO BOARDS


League on Linux HOW TO (up to date Varus patch)

Comment below rating threshold, click here to show it.

Elcye

Senior Member

05-09-2012

So there is another guide on how to make league work on Linux, but it seems a bit outdated, so I decided to make a new one, using the previous how to and the winehq how to:

previous one: http://na.leagueoflegends.com/board/showthread.php?t=1946188
winehq: http://appdb.winehq.org/objectManager.php?sClass=version&iId=19141

Any feedback is welcome.

Last update 14/05/2012: PlayonLinux now offers a compiled wine patched with the latest fixes.



I. Getting the good version of wine to run LoL

As most probably know, LoL doesn't work anymore with default builds of wine, we need to patch it to make it work. There are two ways I know of to get a working version of wine. I advise the easy way, since the result will be the same and it doesn't require to compile wine yourself.


A. Getting wine, the hard way

The hard way consists of compiling wine yourself after applying the patches. I won't describe everything, because I'm far from being an expert on this domain.

Get the source of wine here (I recommend using the latest version possible, 1.5.3 as I am writing this): http://sourceforge.net/projects/wine/files/Source/

Get the patches:
Ranma42 provided us with two necessary patches here: http://uz.sns.it/~ranma42/iLoL/spectator-fix-v3/
0001-ntdll-Improve-performace-of-heap-allocation-v2.patch will allow you to get good fps
0002-imm32-Avoid-deadlock-when-destroying-thread-data-v2.patch will allow you not to crash during loading of a game

It seems that for most of us, the store is crashing the game. I just found on winehq 3 patches from Adam Martinson that make the store kind of work (sometimes the store doesn't load and I just have a black screen, it has some graphics glitches and the runes part is really long to load, but I was able to unlock a champion):
http://bugs.winehq.org/attachment.cgi?id=39446
http://bugs.winehq.org/attachment.cgi?id=39447
http://bugs.winehq.org/attachment.cgi?id=39449

Compile wine (I can't help you much here, you should check winehq website or use the easy way below).


B. Getting wine, the easy way

The easy way to get wine is to get an already compiled and patched build of wine. Your distribution won't provide it, but PlayonLinux http://www.playonlinux.com/en/ will.
PlayonLinux is a really nice tool that allows you to do some sweet things, but the main point is that it has a wine version manager that allows you to download any version you want and keep as many as you want without altering the one from your distribution.
And we can request a specific build of wine with specific patches!

So install PoL (it is probably in your repositories). Open it, clic on Tools > Manage wine versions.
You'll see a lot of versions, for 32bits and 64bits. Even if your system is 64bits, take the 32bits versions. The one you want is the 1.5.3-LeagueOfLegends. Install it. That version contains the 5 patches mentioned earlier and should run LoL without any problems

Every version you install will be installed in ~/.PlayonLinux/wine/<architecture>/<version>/ You can install as many as you want so that you can use a different version for every windows game you have, that's why PoL is great.



II. Install LoL


A. Create a wineprefix and install all the needed stuff

A wineprefix is a wine environment that contains a virtual windows drive and it's registry and wine's configuration. The default one is ~/.wine
I personally like to use a different wineprefix for every game I have instead of using the same ~/.wine for every game, since they often require specific dll and configs. Using a specific wineprefix for LoL will ensure that installing another game won't mess up you LoL's installation.
More information on wineprefixes here: http://wiki.jswindle.com/index.php/Wine_Prefixes

So just create an empty directory that will be your wineprefix where you want your LoL's install.

Download winetricks from here: http://wiki.winehq.org/winetricks and save the script somewhere

Open your favorite terminal and run those two commands commands:
export WINEPREFIX=/path/to/your/wineprefix/
export WINE=/home/<user>/.PlayOnLinux/wine/linux-x86/1.5.3-LeagueOfLegends/bin/wine (or adapt to the path of your wine if you compiled it yourself)

The first command tells wine to use the specified wineprefix instead of the default ~/.wine.
The second tells the winetricks to use the specified wine instead of the default one in /usr/bin/. This is especially useful for 64 bits users. Not doing so will let winetricks use the 64 bits wine from your distribution's repository to create a 64 bits wineprefix and will prevent you to install the game later.


IMPORTANT NOTE: those two commands are modifying environment variables, and are only valid for your current terminal and until you close it. They are forgotten as soon as you close your terminal.
You need to have the WINEPREFIX variable set every time you launch one of the commands below in sections II. and III. A.
You need to have the WINE variable set for the rest of this section.
In doubt, launch the commands again before you do something, that won't hurt.


Now let's use winetricks to actually create the wineprefix and install all the needed stuff:
cd /path/to/where/you/saved/winetricks/

Launch winetricks with
sh ./winetricks

In the new window, select the default wineprefix > OK
Check that the title of the window now display the good wineprefix (if not, you probably failed to launch the export WINEPREFIX command (and maybe the export WINE too), close winetricks and go back to the start of this section).
Install a windows dll or component > OK
check d3dx9, vcrun2005 and wininet > OK (you don't need adobeair and ie6, they come with the game)

Winetricks will install all that's needed for LoL to work.


B. Install LoL

Donwload the game from here: http://signup.leagueoflegends.com/en/signup/redownload

From your terminal, be sure that WINEPREFIX is set (launch the export WINEPREFIX command again if in doubt) and
cd /path/to/where/you/saved/LeagueofLegends.exe

Launch the installation with the good version of wine, by using that command:
/home/<username>/.PlayOnLinux/wine/linux-x86/<version>/bin/wine ./LeagueofLegends.exe (adapt the path if you compiled wine yourself and put it somewhere else).

Follow the installation, keep the default install folder (it will be in the wineprefix you specified). You're nearly good to go!

Note: you can install the game in another location, even outside of your wineprefix if you want, it will work, you'll just have to adapt the paths accordingly. It may be useful for some people who may want to keep the wineprefix and the game directory separated. If you want to test some things about your wine settings or the windows components installed through winetricks, you can just save your wineprefix, test what you want and restore the saved one.
If you install the game outside of your wineprefix, your save will be around ~200 MB, if the wineprefix contains the installation directory, it will be ~4GB. If you don't plan to, I see no point in installing the game not at the default location.



III. Configure wine, your system, and play


A. configure wine and your system

From your terminal (again, be sure WINEPREFIX is set), launch winecfg with
/home/<username>/.PlayOnLinux/wine/linux-x86/<version>/bin/winecfg (again, adapt if needed).

In the applications tab, put your windows version to windows 7

In the graphics tab check the 4 top boxes. The virtual desktop will let you alt-tab and ctrl-alt-right/left without problems.
If you define its size as the same as your screen, it will create a borderless virtual desktop taking exactly the whole screen, allowing you to play in fullscreen.


Your window manager can make a huge difference in performance. the best one is xfmw4 (form xfce4, install it if you don't have it and need more fps) that will give you 15~20 fps more than compiz for example.

When you want to play LoL (and any games through wine actually) you should switch to it. You don't need to log out then in xfce, you can just change your window manager from within your gnome/kde/whatever session. I use fusion-icon for that to switch between compiz and xfmw4.


B. Play LoL

To play LoL, you need to launch a series of commands. You should create a launching script in order to launch the game in one click/command. A simple one would be this one lol_launch.sh (adapt it for your wineprefix, wine version and preferences):

Make it executable, and use "lol_launch.sh" to start LoL


Quote:
#!/bin/bash

echo "Starting League of Legends"

export WINEPREFIX=/path/to/your/wineprefix/
export WINEDEBUG=-all

cd /path/to/your/wineprefix/drive_c/Riot\ Games/League\ of\ Legends/rads/system/

/home/<user>/.PlayOnLinux/wine/linux-x86/<version>/bin/wine "rads_user_kernel.exe" run lol_launcher $(ls ../projects/lol_launcher/releases/) LoLLauncher.exe


And now, go teach windows users that gnu/linux users do play games and are as good as them!

LAST NOTE: new LoL patches may break the game at any time, since wine is not perfect, like it did with the spectator patch. When a new patch is released, it is strongly advised to try a custom game to see if the game is still working fine.
During the spectator patch, everything was working fine, even spectating a game but a bug in wine made it so that the game was always crashing during the loading screen, if you were trying to play, not to spectate. Some users got bans for leaving ranked games, so be careful!



IV. Known bugs


This is the list of bugs I encountered with wine 1.5.3, the 5 patches mentioned with Nvidia proprietary drivers. If you have some others, tell me (and your configuration), I'll add them.

- The launcher is sometimes stuck at 0 or 33%. Just closing it and relaunching it (a few times sometimes) solves the problem.

- pvp has a few graphical glitches, but nothing much.

- Modifying the rune pages in the profile doesn't work very well and often crash the game, so save them often when you modify them. The only way I found to add/remove runes is to double click them (right click and drag and drop don't work).

- The store sometimes don't load and display a black page. Switching to the profile page then to the store again usually loads it.

- The runes part in the store is awfully long to load, and I mean up to 7 minutes in my case, but it eventually loads.

- An ATI user reported lots of graphical glitches in game


Comment below rating threshold, click here to show it.

Tataich

Junior Member

05-10-2012

I successfuly run League of Legends on my Ubuntu 12.04 amd64.

My hardware:
cpu: Intel Core 2 Quad Q6600
ram: 3096Mb DDR2
gpu: Geforce GTS 250 (512 Mb / 256bit) with Nvidia Driver Version: 295.40

How:
1. Install wine 1.5.3 amd64 (from repository ppa:ubuntu-wine/ppa)
2. In winetricks i chouse:
a.) "Select default wine prefix"\"change settings"
check boxes: "win7", "videomemorysize=512" (equivalented by my videocards memory), "vsm=hardware", "psm=enabled"
b.) "Select default wine prefix"\"Install a Windows dll or component"
check boxes: Adobe Air 2.7, all starting from d3dx* and direct*, devenum, dinput, dinput8, dirac, dmsynth, directx9, dsound, dxdiag, dxdiagn, gecko120, ie8, msls31, pdh, physx, quartz, vcrun2008, vcrun2010, winhttp, wininet (Not all of them can be installed from winetricks on 1.5.3 64bit version of wine because it seems there is 64bit windows core and 32bit packages from older wine releases. If you have errors, try install all of them again except errored packages)".
c.) "Select default wine prefix"\"Run regedit" i add REG_SZ key with name: "ProgramW6432Dir" and with value "C:\Program Files" in "HKLM\Software\Microsoft\Windows\CurrentVersion"
3. Additional i download this windows-packages and install it thrue wine: Adobe Air 3.2 (From Adobe.com site), Visual c++ redistributable 2005/2008/2010 (both x86 and x64 from download.microsoft.com totally 6 .exe files), Net. Framework 3.5 sp1 and Net. Framework 4.0 (x86/x64 from download.microsoft.com)
4. Just copy "League of Legends" directory from my WinXP machine to /home/user/.wine/drive_c/games/
5. In terminal: change current directory (with "cd" command) to /home/user/.wine/drive_c/games/"League of Legends"/RADS/system
6. Execute this command:
wine rads_user_kernel.exe run lol_launcher $(ls ../projects/lol_launcher/releases/) LoLLauncher.exe

LoL works fine with graphical settings on High except shadows (Medium) both in Borderless and Fullscreen mods.

Tested today


Comment below rating threshold, click here to show it.

Elcye

Senior Member

05-10-2012

Tataich: Do you mean that you can play with no problems with the version of wine downloaded from the ppa? That's weird, it shouldn't work.

Can you also tell me if the store is working and what is the point of the registry keys you're adding?

Also, it seems to me you installed a lot of apparently useless windows components. Do you know precisely why you installed them for?


Comment below rating threshold, click here to show it.

Boompje

Senior Wrenchmen

05-10-2012

Can you add a list of bugs you encounter on your first post? We may be able to exchange some knowledge there


Comment below rating threshold, click here to show it.

zaaPPY

Member

05-10-2012

Elcye, what do you mean when you said relauch the export?


Comment below rating threshold, click here to show it.

Elcye

Senior Member

05-10-2012

Quote:
Boompje:
Can you add a list of bugs you encounter on your first post? We may be able to exchange some knowledge there


Sure, but so far, I ran into none, only a few graphical glitches in pvp, especially the store, but that's all.

Quote:
zaaPPY:
Elcye, what do you mean when you said relauch the export?


I mean, retype the command "export WINEPREFIX=/path/to/your/wineprefix"

That command sets your WINEPREFIX environment variable to the path you want, and that tells wine to work in that directory and not in the default ~/.wine.
But the environment variable is lost when you close your terminal, so if you do, just reset the variable with the command.


Comment below rating threshold, click here to show it.

zaaPPY

Member

05-10-2012

When saying to "change directory" for the Winetricks where do you wan't me to place it?


Comment below rating threshold, click here to show it.

Elcye

Senior Member

05-10-2012

Quote:
zaaPPY:
When saying to "change directory" for the Winetricks where do you wan't me to place it?


What directory are you talking about? The place you save the winetricks script doesn't matter. Personally I keep it in ~/scripts.


Comment below rating threshold, click here to show it.

FinrodUrFelagund

Junior Member

05-11-2012

Quote:
Elcye:
What directory are you talking about? The place you save the winetricks script doesn't matter. Personally I keep it in ~/scripts.


Remember if your OS doesn't look for executables in the dir you've placed winetricks then you will need to run it with the longer command ./$DIR-to-winetricks/winetricks OR $DIR-to-winetricks/winetricks * where "$DIR-to-winetricks" is the location of winetricks. I placed mine in /usr/local/bin/ and don't need to call it with the full path

Remember to make sure that the WINEPREFIX is set

*sorry I can't remember, but should know whether the ./ is needed

EDIT: Re-Boompje - I have graphical glitches on specific, actually 'many', spells. Main annoyance is the minimap is a bit messed up and I can't see specific champs icons only a red or green circle for them


Comment below rating threshold, click here to show it.

zaaPPY

Member

05-11-2012

Sorry for all these questions But what is a wineprefix? and When you sad <version> do you mean linux version or wine version?