LoL on Linux, the three ways

Posted on by

Ok, if you want to run League of Legends on linux there are a lot of options, you can use the automated way using playonlinux
By the way i find better, more flexible and also more instructive using the good old Wine

Let’s begin then!

First of all you need to install Wine and pretty much every optional dependencies (Install 32bit versions if you are on a 64bit system)
I will not talk about this, since the commands are different for pretty much all distros

As long as i can tell LoL runs fine with Wine 1.7.34, with no need to use winetricks at all
There is just one annoying bug: opening the in game shop makes the game crash
There are three ways to get past this bug and that’s what i’ll talk about!

The first, and maybe the easiest way is to edit the game.cfg file
You can find this file in the Config dir of League of Legends, just open it with a text editor and under the [General] line add:

x3d_platform=1

This makes LoL run using OpenGL instead of DirectX, you should be fine, but you’ll notice a lower FPS

 

The second way is patching Wine, this needs compiling Wine from source, again i’ll not talk about that, there are lots of guides around so just google it!
Here is the patch i made:

diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index b76783f..aa45d5c 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -352,8 +352,12 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource)
     void **p;
     SIZE_T align = RESOURCE_ALIGNMENT - 1 + sizeof(*p);
     void *mem;
+    UINT size = resource->size;
 
-    if (!(mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, resource->size + align)))
+    if (resource->width <= 128 && resource->height <= 128)
+        size *= 2;
+
+    if (!(mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size + align)))
         return FALSE;
 
     p = (void **)(((ULONG_PTR)mem + align) & ~(RESOURCE_ALIGNMENT - 1)) - 1;

This doubles the allocated memory of textures lower than 128×128 pixels of size, and fixes the shop crash while leaving the icons visible

 

The third way is using my old tool to patch LoL files, i don’t reccomend this at all for several reasons:

  • It’s a violation of the ToS, you can be banned for using this (But this will not happen)
  • Editing the League of Legend files is dangerous
  • You have to re-patch after every patch
  • Patching takes a lot of time (But maybe less than compiling Wine from source)
Comments are disabled