Please upgrade your browser for the best possible experience.

Chrome Firefox Internet Explorer
×

How to run SWTOR on Linux/WIne

STAR WARS: The Old Republic > English > General Discussion
How to run SWTOR on Linux/WIne

alexzk's Avatar


alexzk
11.06.2012 , 04:06 PM | #1
I used linux before a week may be, so decided to try it. My most worries were about running SWTOR. So 1st thing I did was making it run before wiping Windows. I've spent 3 days on it and want to share what I have.

1. I have Kubuntu 12.10 64 bit. Have no idea how it should be modified to others, sorry.
2. As it is 64 bit I installed all multiarch i32 libraries using software center.
3. I got latest PlayOnLinux from their site (4.8.x atm), software center has older one.
4. Installed wine "1.5.1-old-republic" using this tool. Next, I will use this wine accessed by "configure" button from PlayOnLinux window. It is separated from the system-wide one.
5. Now, You need to add to wine more libraries, all VCRUN* + MSVC*. Somewhere during experiments I had "mono" warnings so I installed MONO as well by software center. Also you may want to add directx11, 10.
5a. You may need wininet added, don't do it yet, until you will be sure you need it.
6. Setup wine to use virtual screen 1000x600 + windows 7.
7. Now install game into this wine profile. Sometimes later you may have error 208 by launcher, this means to delete all *.version files + patcher folder onto wine's C: and re-run swtor_setup.exe. Actually this is good to do If you have any strange behavior.
8. You may stuck here until launcher will activate "Play" button for some time. It's bad and buggy :/. Try some guides from this forum too.
8a. Select launcher into PlayOnLinux, open configure, press "Make a new shortcut from this virtual drive" and select swtor.exe, name shortcut as "Game Itself". You should see line "arguments" make a note for now.
9. Now you have play button, press it. For me it was infinite nothing - just empty blue desktop of the wine.
10. Open linux terminal and run command "ps x | grep swtor". Copy all comand line, should be like that:

-set username USERNAME -set password 3JexM9uT4GKMlOEy2Ze1MIq____ALOT_OF_DIGITS___RwA== -set platform gamepad.swtor.com:443 -set environment swtor -set lang en-us -set torsets main,en-us @swtor_dual.icb

11. Copy/paste this line into "arguments" for "Game Itself". Those steps (6,9,10,11,12) you will need to repeat often. Each time you want/need to run launcher. Step 6 - setting desktop - you can replace by editing launcher shortcut, see next post at bottom.
12. Press close button into PlayOnLinux, press "reboot windows" for sure. Open wine configuration and disable virtual desktop.
13. Now, let's make script ro run swtor: "kate ~/runsw", and copy paste:

/usr/share/playonlinux/playonlinux --run "Game Itself" %F


Save, exit kate, "chmod +x ~/runsw"

14. Now to start game you need just type in console "~/runsw". I preffer this way instead shortcuts because I can add more steps to this later. Game starts about 5 minutes initially. Later is going more-less horrible .
15. At this point you should have startable game with some bugs:
a) Dont change graphic's settings inside game. Only do it on "character selection" screen. As for me it hungs infinitly . Because of that, don't resize or minimize or move game window. You can do it only at "char selection".
b) Don't move mouse over "white small quest circle" (not same as green) any where on map/minimap or in quest list. It hungs the game for me.
c) If you got message "You cant play on our servers" it's time to run launcher and dump new password...
Next will be doubling fps...
There is no ignorance - there is knowledge.

alexzk's Avatar


alexzk
11.06.2012 , 04:22 PM | #2
Improoving perfomance under wine.

Okey, If you have SSD - probably u've put everything on it already. If not - move out there "Assets" folder and make a link to it in the game's folder.

Next we can put 2 sensitive files into RAM which boost game twice for me at least.

Let's do virtual disk:

>sudo kate /etc/make_ramcache

Copy/paste this into file:

#!/bin/sh

[ ! -d /ramcache ] && mkdir -p /ramcache
chmod 777 /ramcache
mount -t tmpfs -o size=200m,rw tmpfs /ramcache
touch /ramcache/DiskCacheStatic
chmod 666 /ramcache/DiskCacheStatic
touch /ramcache/DiskCacheStream
chmod 666 /ramcache/DiskCacheStream

Save, exit kate, and:

> sudo chmod +x /etc/make_cache

Let's add it to boot time:

>sudo kate /etc/rc.local

Add line:
/etc/make_ramcache

save, exit, reboot

After this you should have /ramcache folder with 2 empty game's files.

Next, make a link in your home folder "swtor_settings" pointed to
"/home/USER/PlayOnLinux's virtual drives/SWTOR/drive_c/users/USER/Local Settings/Application Data/SWTOR/swtor/"
You should see here sub-folder "settings" and maybe 2 game's files.

Next, modify "runsw" as follows:

#!/bin/bash
#export ALSA_DEFAULT_PCM=hw
cat /dev/null > /ramcache/DiskCacheStatic
cat /dev/null > /ramcache/DiskCacheStream
ln -s /ramcache/DiskCacheStatic ~/swtor_settings/DiskCacheStatic
ln -s /ramcache/DiskCacheStream ~/swtor_settings/DiskCacheStream

/usr/share/playonlinux/playonlinux --run "Game Itself" %F


This file will put those 2 game's files into ram. It doubles FPS for me. However, game deletes links and creates files on HDD sometimes, not sure why, but check "swtor_settings" before each run and delete those 2 if any.

I give up, those files won. They're deleted for each new location. So full container folder must be moved. It should be /ramcache/swtor/ which has link to folder "settings" with your settings and 2 those files. Hard to writedown all those link-to-link, so please try yourself Boot script creates /ramcache/swtor only now and all other is done by runsw:

[ ! -L ~/pre_swtor/swtor ] && ln -s /ramcache/swtor ~/pre_swtor/swtor
[ ! -L /ramcache/swtor/settings ] && ln -s ~/Games/swtor_settings/settings /ramcache/swtor/settings
/usr/share/playonlinux/playonlinux --run "Game Itself" %F

Update.
Looks like there is some 64bit <--->32bit transactions on 64 bit linux system. It's like hundreds of it per second. I opened each link ("Game Itself" file) in text editor (/home/USER/.PlayOnLinux/shortcuts/FILENAME) and added 32 bit mode, so file will look like:
................................
export WINEDEBUG="-all"
export WINEARCH=win32
...........................

After that I played 3 WZs before posting this update. I should say I feel a bit better. Now I dont afraid to rotate camera to whatch around while I run.

Also you can add line into original launcher's shortcut so it will always run in desktop:

POL_Wine launcher.exe "$@"
change to:
POL_Wine explorer /desktop=name,1000x600 launcher.exe "$@"

Update 2
The change POL_Wine explorer /desktop=name,1000x600 launcher.exe "$@" may not work when launcher shows news. Fix - close and delete "patcher" folder, sometimes you should do it couple times.

Better performance is when I have "Strict Draw Ordering" set to disabled and Video Memory Size is set lower than I have total (768 out 1024 in my case). Possibly that is because I have 2 monitors.

Update 3

Sound fix for USB dongle: http://www.swtor.com/community/showp...7&postcount=26
There is no ignorance - there is knowledge.

lordinvder's Avatar


lordinvder
11.11.2012 , 09:56 AM | #3
You should post this on the Wine Website.

What version of Wine are you using?

alexzk's Avatar


alexzk
11.11.2012 , 05:39 PM | #4
It's downloaded script by PlayOnLinux, "1.5.1 - old republic". It applies some extra path to wine.
There is no ignorance - there is knowledge.

alexzk's Avatar


alexzk
11.16.2012 , 06:25 PM | #5
Looks like 100mb of ram cache is not enough for big planets like tattooine. Should be some more 200-300mbs.
There is no ignorance - there is knowledge.

JDThree's Avatar


JDThree
11.18.2012 , 06:52 AM | #6
This is wonderful. Seems to work pretty well. I tried the WineHQ route for about 3 days and ended up crashing upon char select screen every time so you may want to get this info out there.. however you can't submit test results using a patched version of wine.

One thing I noticed is I don't see a huge difference between max settings and minimum settings.. there is some but not as bad as you would think so there may be some element that wine is having trouble with.. but other elements it's just fine.

As you tune it for performance can you tell us what graphical settings affect performance extraordinary bad in wine and what ones do not? I'm also having trouble with sound, occasionally it goes into "stuttering bit mode" on me.

Overall awesome tho, I think this is playable.

Oh also in your guide I had some trouble understanding what you meant by "game itself" I see that you made a new process in PlayOnLinux and then added the augments to that.. at first I didn't understand how to do that though as I've never used PlayOnLinux before.

rawfox's Avatar


rawfox
11.18.2012 , 07:42 AM | #7
There is a lot things not exacly clear, so let clear em up.

1. Wine cannot be used out of the box to run SWTOR.
You have to compile wine out of the sources and before you need to patch the sources with the user_shared_data patch.
All needed information and the patch for the sources can be found here:
http://appdb.winehq.org/objectManage...sion&iId=26284

2. 32/64 bit
If yo use a 32bit Linux, you are fine as is, you can compile a recommended 32bit wine executable.
For 64bit systems you want the 32bit #includes, look here http://wiki.winehq.org/WineOn64bit to get a 32bit wine executable.

3. Additional requirements
winetricks is your friend.
Install it either from your software centers or get it from its page here: http://winetricks.org/winetricks
Save it to /usr/local/bin or whatever exec-path you have. When you made it executable, just call it from bash.
SWTOR will need vcrun2008 and the native d3dx9 overrides.

As a personal suggestion, please only stick to the "official" solutions, in this case from the wine headquarter site.
Dont use things like PlayOnLinux or Crossover, simple because if you dont know, what you did before, you for sure lose entire control with such tools.
When you know, what you do, then you know, you cannot use them due to the missing wine-patch for SWTOR.
Ofcause you can use something like a "wine-swtor" but it is not recommended because in best case it is "compatible", but far from "good" or "optimal".

Finally, it works.
It works good enuff for PvE actually, even if it is somewhat clunky sometimes.
Working with a WinXP_SP3 prefix should give wine the ability, to scale your gfx-memory somewhat better.
My own tests show no difference, but who am i anyways ..

There is still a problem remaining, using a single POI type from the map, the one that shows the circles when you have to kill a number of mobs. The game grashes then but i expect a solution coming up in the time to come by.
http://bugs.winehq.org/show_bug.cgi?id=32092

enjoy ^^

edit:
The wine performance suggestions by alexzk before here, take place, when it works.
You need to make it work "conventionally" before you improve it.
Its a huge performance boost ^^

JDThree's Avatar


JDThree
11.18.2012 , 07:57 AM | #8
Well no, because even with a patched 1.5.17 it wouldn't work for me.. and I see tons of posts on WineHQ thread showing others with the exact same problems I had. There is a regression somewhere in the newer sources. PlayOnLinux method actually works and you don't need to compile or patch anything. Not that building from scratch is an issue for an old *nix hack like me but it is for a lot of ppl I'm sure.

It's ridiculous to suggest people only use the "official" WineHQ solution when you yourself are using a patched version of wine. It's contradictory unless your using vanilla and by suggesting it your throwing people down a rabbit hole that may not work for them when they only want to play the game. If your a programer who can actually fix it then it makes sense to work on fixing vanilla.

For openSUSE 12.2 this was an extremely easy guide to follow and alexzk deserves credit for posting it.

rawfox's Avatar


rawfox
11.18.2012 , 08:13 AM | #9
Quote: Originally Posted by JDThree View Post
Well no, because even with a patched 1.5.17 it wouldn't work for me.. and I see tons of posts on WineHQ thread showing others with the exact same problems I had. There is a regression somewhere in the newer sources. PlayOnLinux method actually works and you don't need to compile or patch anything. Not that building from scratch is an issue for an old *nix hack like me but it is for a lot of ppl I'm sure.

It's ridiculous to suggest people only use the "official" WineHQ solution when you yourself are using a patched version of wine.

For openSUSE 12.2 this was an extremely easy guide to follow and he deserves credit for posting it.
I am sorry but when it doesnt work for you, then ill take it as a distribution related problem.
"Official" solutions are based on standard Linux conventions, means it works on every Linux, distribution independend.
Using a patched version of wine is the common way to go and it is not rediculous to suggest the right things.
I never said, using a PlayOnLinux method is wrong. Read again.

JDThree's Avatar


JDThree
11.18.2012 , 08:21 AM | #10
Quote: Originally Posted by rawfox View Post
I am sorry but when it doesnt work for you, then ill take it as a distribution related problem.
"Official" solutions are based on standard Linux conventions, means it works on every Linux, distribution independend.
Using a patched version of wine is the common way to go and it is not rediculous to suggest the right things.
I never said, using a PlayOnLinux method is wrong. Read again.
1.5.6 that is shipped with Suse and 1.5.17 both failed, both recompiled with the patch you suggested both with and without suse's patches applied to the source. I haven't tried building 1.5.1 yet. I think there is a regression that causes a crash on the server selection screen. (and no, renaming the loading screen and icon do not fix it) Those builds of wine DO work with League of Legends and I even got the LoL store working with 1.5.17 (normally it will not under wine) so.. the builds are good but I dunno what to say about SWTOR here..

I agree we want to improve vanilla but unless we actually have the necessary skills to do so it's useless and Wine won't accept bug reports when using 3rd party patches so it doesn’t make a lot of sense to cut down solutions like this for people who fall into that category. This is EASY & it WORKS, end of story.