Jump to content

How to run SWTOR on Linux/WIne


alexzk

Recommended Posts

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 :D.

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...

Edited by alexzk
Link to comment
Share on other sites

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/showpost.php?p=5528167&postcount=26

Edited by alexzk
Link to comment
Share on other sites

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.

Edited by JDThree
Link to comment
Share on other sites

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/objectManager.php?sClass=version&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 ^^

Edited by rawfox
Link to comment
Share on other sites

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.

Edited by JDThree
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Edited by JDThree
Link to comment
Share on other sites

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.

 

Because of the mising skills, i wrote some basics.

It was not meant, to offend anyone or to question other people's solutions.

You gotto agree, when you read "you have to install all vcrun..." well, there is not mutch knowledge behind and the whole thing is confusing enuff anyways, no need to spread additional half-knowledge, even if everyone apriciates the effort, to offer a way to make it work.

 

Quoting myself, in case it was overseen ...

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".

 

We are haircutting, let end it now.

Link to comment
Share on other sites

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.

I never said, using a PlayOnLinux method is wrong. Read again.

 

Oh.. kay.. this ^ confused me but I'll drop it.

 

And your right.. "installing VCRUN" is vague and confusing for people so.. maybe we can get together and write a proper guide here for people. Click this, add this on this tab of PoL.. seems simpler than trying to walk people through a build on whatever distro they may be using. Up until I found this post I was under the impression that newer versions of SWTOR didn't work at all.. so I'm glad a found it.. made me realize a few key things.

 

Only trouble with writing a guide is it takes like 4 hours for the game to actually install. :/

Edited by JDThree
Link to comment
Share on other sites

Yeah Sir, the problem is, there is no other solution yet, then a precompiled wine.

Nobody can expect from a one week Linux user, to raid the sources.

 

The "right" solution arrives, when the wine coders fixed the user_shared_data thingy in wine itself.

Then it will run out of the box ^^

This may need some weeks more.

 

I am not using Suse, im on Fedora.

Why doesnt it run from source in suse ?

I mean, Suse is certified at all ^^

Link to comment
Share on other sites

Yeah Sir, the problem is, there is no other solution yet, then a precompiled wine.

Nobody can expect from a one week Linux user, to raid the sources.

 

The "right" solution arrives, when the wine coders fixed the user_shared_data thingy in wine itself.

Then it will run out of the box ^^

This may need some weeks more.

 

I am not using Suse, im on Fedora.

Why doesnt it run from source in suse ?

I mean, Suse is certified at all ^^

 

I think the problem is something else. The real way to get to the bottom of it is to build 1.5.1 with the KUSER patch then we'll know for sure that version 1.5.1 works for me but 1.5.6< do not. I am starting to think this has to do with a sound issue because when I would launch it with 1.5.6+ it goes black and I hear the music from the char select screen for about 2 seconds then nothing. With 1.5.1 I have audio corruption as well but it doesn’t hang.. so perhaps my sound card can't handle whatever it's throwing at it.. not sure. I may try to find ways to speed up the audio system and see if that helps.

Edited by JDThree
Link to comment
Share on other sites

When i login and start/launch the game, it goes black for about 2 minutes !

or 3 :p

 

Is your HDD active in that time ?

Mine is hard at work that time, the initial loading of the game and first "on planet" needs ~5 minutes here and i has a big smile pc ^^

Logout and relogin went faster then.

 

Maybe you gotta wait somewhat more, when it goes black ?

Link to comment
Share on other sites

I got it running using PlayOnLinux in Mint 13. But...

 

It runs nowhere near as smooth as it does under windows. Also a few things just don't work, like texture atlasing, so you have to put up with low res character textures :(

 

For Antialias in wine, you gotta select multisampling.

You can use winetricks for it.

Link to comment
Share on other sites

About sound guys. It's bad :/ Well, I have 3 detected devices,

 

1. on nvidia

2. integrated on mb

3. wireless usb dongle

 

With usb ALSA fails that it has not enough data in stream, I decided that it is hardware caching problem and just use integrated while play, all others are disabled. However it still lose sound, mostly when I do alt+tab while loading. Quick fix is alt+tab to anything, connect/disconnect dongle and sounds back on embedded.

 

Have no idea why :) I'm 3rd week on Linux only.

 

About graphics - I was using on Windows low-medium, so having same on Linux is enough for me :)

Also I have steady sound lost doing Void Star + lags during and after that. So now I just leave this WZ immediatlly, i suspect same bug/leak as with map markers.

Link to comment
Share on other sites

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.

 

Just a name for shortcut i created to "swtor.exe" meaning it points to start game without launcher.

Link to comment
Share on other sites

Also here:

 

Creating interfaces...

bwa::RemoteMetricsCallbacksHandler::IID

bwa::RemoteRendererInterface::IID

WARNING: Slow RemoteRenderer connection (1.24 seconds)

 

That is time when HDD is hard going after huge pause while game starts. I suspect it can be something with sockets emulation or memory mapping emulation. However, I have biggest game's files on SSD + swap on SSD so not sure why HDD should go.

 

Any ideas what to check? Maybe different swap style? Windows "connects" exes or any other files to swap. They dont moved physically into, they just become part of memory space. So if game do same with that huge files, what will linux do ? Cache it in memory/swap? It can take time to load 20 Gb yes...

Link to comment
Share on other sites

Also here:

 

Creating interfaces...

bwa::RemoteMetricsCallbacksHandler::IID

bwa::RemoteRendererInterface::IID

WARNING: Slow RemoteRenderer connection (1.24 seconds)

 

That is time when HDD is hard going after huge pause while game starts. I suspect it can be something with sockets emulation or memory mapping emulation. However, I have biggest game's files on SSD + swap on SSD so not sure why HDD should go.

 

Any ideas what to check? Maybe different swap style? Windows "connects" exes or any other files to swap. They dont moved physically into, they just become part of memory space. So if game do same with that huge files, what will linux do ? Cache it in memory/swap? It can take time to load 20 Gb yes...

 

Try to switch off sound at all.

I'd use winecfg on a first try.

When there is a performance incrase, you know its the sound thingy.

What hardware do you have ?

 

I can be wrong, but out of experience ... the game isnt really playable with a dualcore processor.

I had one myself before, while i can say so only about AMD processors.

So if you got a dualcore under Linux, playing swtor with wine, it could really be bad, so that there may be not enuff ressources left for sound.

Now, on my octocore, wine scales over 4 cores and i have ~50 fps.

Nevertheless, the game performs ofcause mutch better on Windows *sight*

Link to comment
Share on other sites

When somebody says "isnt playable" I imagine something like 0-5 FPs :) 10-15 is hard and 15+ is just good.

Actually game is just bad made. Void Star is almost unplayable on wine/windows. Last Denova WZ is just going 30FPs around, but has more details like grass.

 

But that post was about initial loading. It takes 5 mins to load...also game has option to start single core mode. Will try to force it for tests :)

 

edit: it's not 2 cores, it is fork(). should be single process or 2 of them. Will try tomm some fights into single one.

Edited by alexzk
Link to comment
Share on other sites

Ok guys, I have a question.

 

There is command line:

 

wine explorer /desktop="swtord",1000x600 launcher.exe

 

 

Is any way to do the same in different way without instancing explorer with launcher inside? Maybe some global wine's variable I should set before like:

 

VARIABLEX=1000

VARIABLEY=600

wine launcher.exe

 

Because, launcher does pathches like downloading news and when it do (1) line fails to start it. I need to change global wine settings by mouse clicking which is borrying.

Edited by alexzk
Link to comment
Share on other sites

  • 2 weeks later...

So I hear the map marker bug (http://bugs.winehq.org/show_bug.cgi?id=32092) doesn't have a lot of impact on capped toons as they're not actively questing. I however only just started playing yesterday, so it's quests galore, and thus regular crashing.

 

Anyone know of a temporary workaround to stop he game crashing while we wait for Wine devs to figure out the deal?

Link to comment
Share on other sites

So I hear the map marker bug (http://bugs.winehq.org/show_bug.cgi?id=32092) doesn't have a lot of impact on capped toons as they're not actively questing. I however only just started playing yesterday, so it's quests galore, and thus regular crashing.

 

Anyone know of a temporary workaround to stop he game crashing while we wait for Wine devs to figure out the deal?

 

There is some people already nagging their heads over this, but its a tricky *****.

As soon as there pops a solution, it will spread fast, im sure.

 

1st place for informations about this is:

http://bugs.winehq.org/show_bug.cgi?id=32092

Link to comment
Share on other sites

×
×
  • Create New...