Lt. Commander
Join Date: Dec 2007
Posts: 120
# 401
08-16-2010, 08:04 PM
I recently had to reinstall this on Gentoo (I briefly went to the dark side and had another 'turrrible' OS on the system - glad I went back.. anyway). And, it took me a while to figure out the right way to do this - or at least a method that would work.

I saw (and remembered having this issue before) that the Wine's internal internet explorer doesn't work at all (even wine 1.3.0's internal one blows up mightily). Gecko, for those who aren't familiar, is the firefox/mozilla core. Since this game seems to use IE semantics and operate under the assumption you have it, you'll definitely need ie6 or 7. From past experience, 6 works, albeit with either javascript errors or the occasional weird window that pops up for no reason during patching. During this install, however, I managed to solve the problem by skipping ie6 and going directly to ie7.

Mind you, this operates under the assumption you have a working wine install. I'm not going to include instructions for that part as it varies from distribution of Linux to distribution.

(Hardware: 2 Quad-core Opteron 2378s, 16G RAM, 2xNvidia GeForce GTX 275s in SLI mode, 4 1TB 7200 RPM Seagate Barracuda drives (in a software raid 10 configuration), using the SuperMicro H8DA8-2 motherboard -- overkill on the detail, but, eh.)

Distribution: Gentoo. Arch: amd64
(-O2 -march=native -mtune=native - for the Gentoo folks)

For the purposes of my testing, I tested both ~app-emulation/wine-1.2.0 and ~app-emulation/wine-1.3.0. (I masked the 1.3.0 version to test and it resulted in the same instructions as 1.2.0.) Also: ~x11-drivers/nvidia-drivers-195.36.31 (I might unmask the most modern but untested ones, but I am not yet sure I want to tempt fate.)

First, set the overrides, download the dlls, download and use winetricks to get the packages recommended by this article (ALSO: Please ensure you have installed 'd3dx9' via winetricks. This becomes important later...):

http://wine-review.blogspot.com/2009...with-wine.html

(For brevity, you can simply google the missing dlls you need. There's a website that has windows dlls for free.)

Once IE7 is working and installed, proceed to install Star Trek Online normally. Note, you'll also need to follow the instructions provided in the following STO post (page 34, post #335 of this thread):

http://forums.startrekonline.com/sho...&postcount=335

You may also need to disable the mmdevapi dll in winecfg depending on your distribution: Keep in mind, this instruction tends to apply if and only if you have a sound server installed in your X distribution. If you use ALSA (or an outdated OSS) directly without either esd or pulseaudio, you may not need to do that at all.

Note: The DXSetup piece (as mentioned in various threads) seems to stall but it isn't actually stalled. What you could do to find out what it's doing is via a program called 'lsof'. something like:

Quote:
lsof | grep Cryptic
That segment will tell you what it's doing in the directory for the game... but...

You'll want to look for anything other than that directory:

Quote:
lsof | grep drive_c | grep -v Cryptic
The first field is the application, second is the process id, third is your username, 4th is the file descriptor (which tells you if it's being read, if it's a directory, or if it's in memory).. and skip to the last field (that's the file or directory that's open).

If you want to get a fair idea about what the progress is, open a large enough terminal and just run this via watch. Like so:

Quote:
watch "lsof | grep drive_c | grep -v Cryptic"
or to watch the Cryptic directory once that's past:

Quote:
watch "lsof | grep Cryptic"
Mind you, it will take a trained eye - plus a harddrive activity light. But, you can also use: dstat to see it's writing to the drive:

Quote:
$ dstat
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
2 1 97 0 0 0| 199k 2775k| 0 0 | 0 0 |1669 1557
16 3 81 0 0 0| 0 0 | 615k 25k| 0 0 | 12k 13k
21 4 75 0 0 0| 0 0 | 621k 24k| 0 0 | 12k 12k
17 4 80 0 0 0| 0 69M| 610k 24k| 0 0 | 12k 12k
18 3 79 0 0 0| 0 0 | 612k 24k| 0 0 | 12k 12k
By default, this updates every second, so you can see that there was a nice little burst of 69M written to my disk in that period of time. The two tools (regardless of linux distribution) should provide you enough evidence of what is occurring. It seems like DXSetup is stuck, but it almost certainly isn't. :-)

Edit to add:

There are some performance tweaks in Linux that may be of help -- but be warned, this is not for the tame or timid. Nor, unfortunately, is it for the folks who don't know what the implications are.
  1. PCI Latency

    ==> This is probably the most overlooked and most under-utilized option to improve performance. I didn't really consider it myself until I saw what I was missing. In my case, as much as a 50-60% improvement at high end video settings. Your mileage will vary. Gentoo is fortunate enough to include this in it's default desktop profile and an example config, but you may not necessarily need it either. Generally speaking, you want to, paradoxically, increase the latency to your pci devices except for things like your network and audio cards. This allows the cards enough time to receive, respond, and give appropriate warnings on data it as received. This 'opens up' the PCI bus and improves performance by and large. Most Linux distributions do not set this to an optimal value.

  2. Video Card Tweaks

    ==> This is done in accordance to your video card type, vendor, and Linux distribution. It is highly recommended you read your distribution's guide on your particular video card. For gaming, however, very few cards beat or compete Nvidia in the Linux world. Nvidia offers a wide variety of distributions support and community help on gaming.

    Also, make sure those changes are committed to your xorg.conf file - and X is restarted.

  3. readahead and readahead-early services

    ==> This instruction is for RedHat derivatives. You'll want to enable that service and run it. The readahead-early service is for faster boots and technically still outside of the scope of this... but while you're there... ;-) The 'readahead' service itself is the one we're looking for.

  4. Read-ahead Buffers

    ==> This is also one of those "oh, really, I didn't know about that" gotchas that many folks miss. If you're using Linux, you undoubtedly don't have an optimal read-ahead buffer setup on your system. By default, this set to 128k (or 256 512 byte block reads) on almost every distribution. The package will vary from distro to distro, but you'll want the 'blockdev' binary usually located in /sbin.

    It will report this (and it has to be done as root) -- skip to the bottom of this bullet point for LVM:

    Quote:
    unimatrix-01 ~ # /sbin/blockdev --getra /dev/sda
    256
    To increase this value (also as root), you'll probably want a safe but reasonable value. If you do a lot of gaming with huge files (or massive video playback), you may want to set this to something like 8192 (or 4M in 8192 512 byte sectors)

    Quote:
    # /sbin/blockdev --setra 8192 /dev/sda
    Generally speaking, you could see about a 20-25% improvement in disk accesses for gaming.

    Note, if you're using md raids for your disk partitions, the value of the block readahead can be checked on your raid device. So, substitute sda (or hda) for your raid partition (like /dev/md2). That value is set by the chunk size used when the raid volume was created. By default, this is an absurdly low value. Linux kernel tuning experts suggest values of 512k to 1024k for chunk goodness. That value is also determined by the raid type and number of spindles (or drives) in your array. In the case of Raid 10, it is (chunk size * spindles * 2). In my case, as I chose the value of 1024k as a chunk size when I created my raid partition, it was (1024 * 4 drives * 2) or 8192k readahead (or 8M). This is confirmed via:

    Quote:
    unimatrix-01 ~ # blockdev --getra /dev/md2
    16384
    If you're using LVM (Logical Volume Manager) which is a default on many RedHat derivatives, you'll want to change this in LVM directly rather than through blockdev. Find the partition and Logical Volume your games or data is stored on, then do this as root:

    Quote:
    lvchange -r 8192 VolGroupXX/LogVolYY
    Unlike the blockdev changes mentioned above, this change is persistent upon reboot. blockdev changes must be put into a system startup script or they will be lost upon reboot. Play with a value that works for you - but no value larger than 8192 will provide any noticeable performance gains.

  5. Prelink!

    ==> This is also often overlooked. This particular setup is done by some distributions but not others. Check your distro for support. Essentially, this links the libraries that you need into the binaries themselves automatically - shaving the need to re-read every library and library directory on the disk when a program is called.

  6. Optional Preload

    ==> This is very rarely used, but some distributions will allow you to install this daemon. Once running (give it a day or two), it will learn the frequency of which files tend to be opened the most. It will then load those most frequently used files into memory based on your individual patterns. It will make loading games or applications a lot faster.
Lt. Commander
Join Date: Dec 2007
Posts: 120
# 402
08-17-2010, 06:26 AM
Quote:
Originally Posted by AuntKathy
And, it took me a while to figure out the right way to do this - or at least a method that would work.

I saw (and remembered having this issue before) that the Wine's internal internet explorer doesn't work at all (even wine 1.3.0's internal one blows up mightily). Gecko, for those who aren't familiar, is the firefox/mozilla core. Since this game seems to use IE semantics and operate under the assumption you have it, you'll definitely need ie6 or 7. From past experience, 6 works, albeit with either javascript errors or the occasional weird window that pops up for no reason during patching. During this install, however, I managed to solve the problem by skipping ie6 and going directly to ie7.

Mind you, this operates under the assumption you have a working wine install. I'm not going to include instructions for that part as it varies from distribution of Linux to distribution.
Awesome post! Thanks for sharing this. Major kudos!
Lt. Commander
Join Date: Dec 2007
Posts: 120
# 403
08-17-2010, 11:41 PM
Quote:
Originally Posted by AuntKathy
I recently had to reinstall this on Gentoo (I briefly went to the dark side and had another 'turrrible' OS on the system - glad I went back.. anyway). And, it took me a while to figure out the right way to do this - or at least a method that would work.
This awesome posting definitely reminds me of all the times I've sought for a solution to a tiny issue with something in Linux and found it in a Gentoo wiki or forum. Thanks for another one.
Lt. Commander
Join Date: Dec 2007
Posts: 120
# 404
08-18-2010, 05:00 PM
Quote:
Originally Posted by AuntKathy
I recently had to reinstall this on Gentoo (I briefly went to the dark side and had another 'turrrible' OS on the system - glad I went back.. anyway). And, it took me a while to figure out the right way to do this - or at least a method that would work.

I saw (and remembered having this issue before) that the Wine's internal internet explorer doesn't work at all (even wine 1.3.0's internal one blows up mightily). Gecko, for those who aren't familiar, is the firefox/mozilla core. Since this game seems to use IE semantics and operate under the assumption you have it, you'll definitely need ie6 or 7. From past experience, 6 works, albeit with either javascript errors or the occasional weird window that pops up for no reason during patching. During this install, however, I managed to solve the problem by skipping ie6 and going directly to ie7.

Mind you, this operates under the assumption you have a working wine install. I'm not going to include instructions for that part as it varies from distribution of Linux to distribution.

Lots more stuff....
[/list]
Want to tweak your post a little to assist all the other people with install problems since your post covers all the tweaks which were great..
First the system I am running:
NVIDIA 9600GT with latest driver supported
Ubuntu 10.04
Wine 1.2 (Latest supported)


Do these steps in this order from here on in. These steps worked flawlessly every time.

STO will work straight up under Linux for just about any Distro provided you can do the following:
- Install latest Wine (above or better later)
- Install Winetricks

From here I will walk you through the setup that is error free install and run:

Before intalling STO:
- install corefonts via winetricks
- install d3dx9 via winetricks (Do NOT install DirectX itself)
- install ie7 via winetricks

- Now put your CD or copy to HD then run under wine.
- Follow the prompts and install as normal.

On completion do the following:
- Open wine configuration
- On the graphic card screen, do NOT select virtual desktop.
- select the first checkbox for the mouse and leave the rest as default.

On the Audio tab:
- Select Alsa (default unless your audio either works with another or works better with another)
- click apply/ok to close.

Now run the game, a white popup window will appear which is the ie7. Close it. login, run your updates which will take for freakin ever, and then play. Adjust sound and video in-game to what you like.

NOTE: When you alt-tab or anything that removes focus from the game, it will make the game appear as though it froze or locked up. This should not be the case. Look at the top left of your gamescreen and you should see a little 1" x 1" square. If you click that, it refocuses onto the game.

This was tested on Gentoo, Ubuntu and Fedora. Please respond to let me know if this does or does not work on any other systems.
Lt. Commander
Join Date: Dec 2007
Posts: 120
# 405
08-18-2010, 05:05 PM
Quote:
Originally Posted by Agrinder
Want to tweak your post a little.
Girst the system I am running:
(...)
Quote:
Originally Posted by Agrinder
Want to tweak your post a little to assist all the other people with install problems since your post covers all the tweaks which were great..
First the system I am running:
(...)
Glad you edited the pompous sounding start. Much more respectful.
Lt. Commander
Join Date: Dec 2007
Posts: 120
# 406
08-19-2010, 08:46 PM
Quote:
Originally Posted by Agrinder
- install d3dx9 via winetricks (Do NOT install DirectX itself)
is that really needed? runs fine on Mac OS X with normal wined3d, no need for any .dlls from MS.
Lt. Commander
Join Date: Dec 2007
Posts: 120
# 407
09-02-2010, 01:54 PM
Update #2 for Wine (on Linux).

In addition to my earlier post, I'm adding more "tweaks" and enhancements you can do to further improve your performance (and this helps Star Trek Online).

One of the interesting things I found out after perusing the Gentoo Sources package was that Con Kolivas writes some cool performance tweaks for the Linux Kernel specifically, as it turns out, for Gaming and Video under Linux. For reference: Con Kolivas' site. You'll want to verify what your specific Linux distribution recommends package-wise. The patches contained on this site are for those who build their own kernels. (Gentoo users: You can use ~sys-kernel/ck-sources and that does work with genkernel -- and also contains the same patches that Gentoo sources does. So, you get the benefit of a faster kernel with Gentoo features)

Key features that were in the kernel changes were tweaking the vm.swappiness variable to a 0 value (indicating not to swap unless you really need to and to try to keep everything cached instead). However, it also includes a "really use the swappiness value" patch since the kernel tends to, oddly enough, ignore the value even if you set it manually using sysctl. Another key feature of this patch is the inclusion of the BFS CPU scheduler. (This becomes relevant to a later section of this post.) There are some other tweaks to how the caching is done within the kernel as well.

Following a reboot with the ck kernel patches, you'll also want to install schedtools (if your distribution doesn't include it by default). This becomes an interesting tweak and one of those rare "huh, I didn't know about that" moments. After installing both ck kernel and schedtool, you'll want to probably make two adjustments prior to starting X. One, make every process currently running as root run in a scheduled batch mode. This means the priority and cpu provided to it operate under the assumption you won't be getting active video feedback (tail and top don't count) in real time. Two, we'll be making sure that when we start X, we do so with the ISO (real time feedback/response) mode.

To that end, prior to starting X, you'll want to do something like "pgrep -U root | xargs schedtool -B" in a startup script. Then, for starting your X session, you'll want to put "schedtool -I -e {command to start X goes here}". Mind you, these two will depend on your distribution - so follow those instructions for your distribution. For Gentoo, it was easy: "schedtool -I -e /etc/init.d/xdm start"

Those two commands told the system to schedule any non-X application (like cron, etc) to go into batch mode. Anything started by X (your window manager, your wine games, your X your interface altogether) will then be put into "ISO" or Interactive mode. Both of these are relatively safe changes and are not considered dangerous in terms of starving your applications for CPU. It just means you'll have an interactive desktop. Video should be a little snappier too with fewer stutters.

Edit to add: As an alternative, you can just schedule wine in Interactive mode, but it could potentially cause X to, paradoxically, become less responsive. To just schedule wine for interactive mode: "schedtool -I -e wine Star Trek Online.exe" or similar. I decided that it was simply easier to schedule X and everything it spawned as interactive rather than individual processes. This would have the least amount of maintenance for the most gain.

(One of these days, I'll get around to writing a blog on how to do other stuff in Linux that isn't included in most distributions by default like compiz enabled desktops, etc - but that's outside of the scope of this thread.)
Lt. Commander
Join Date: Dec 2007
Posts: 120
# 408
09-02-2010, 01:57 PM
Quote:
Originally Posted by Agrinder
Do these steps in this order from here on in. These steps worked flawlessly every time.

STO will work straight up under Linux for just about any Distro provided you can do the following:
- Install latest Wine (above or better later)
- Install Winetricks

From here I will walk you through the setup that is error free install and run:

Before intalling STO:
- install corefonts via winetricks
- install d3dx9 via winetricks (Do NOT install DirectX itself)
- install ie7 via winetricks
I did not include those instructions for, unfortunately, a good reason: They did not work for me. I tried many possible variations and iterations. I spent a good part of 3 days trying all the variations. After doing a lot of research online, I determined a great number of folks were having the same problems in the same order for the same reasons as me. Thus, I wrote the post that addressed that problem.

Edit to add: In addition, I do not get an extra window popping up for me every time I start Wine for Star Trek Online. The only time I do is when I update wine versions - and that's before the Star Trek Online app starts (wine configuration is being auto-updated).

I think the problem centered around missing dlls for ie7. It refused to install stating it wasn't a valid OS. Thus, as I found in my research, it was necessary to trick ie into believing it already had the native dlls present (and why you need to do the overrides mentioned in the article). After making the requested changes, ie-7 installed (without updates) without a hitch. And, of course, Star Trek Online worked as expected.
Lt. Commander
Join Date: Dec 2007
Posts: 120
# 409
09-02-2010, 02:12 PM
Awesome work, AuntKathy. Thanks for sharing.
Lt. Commander
Join Date: Dec 2007
Posts: 120
# 410
09-02-2010, 02:50 PM
Quote:
Originally Posted by jpalko View Post
This awesome posting definitely reminds me of all the times I've sought for a solution to a tiny issue with something in Linux and found it in a Gentoo wiki or forum. Thanks for another one.
Thanks. That was the intended theme of my post. :-)
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


All times are GMT -7. The time now is 12:15 PM.