Update 2007.02.21

The content of this page has moved into wiki form at http://www.uesp.net/wiki/Oblivion:Linux. I've also keep the wiki version more up-to-date, and the wiki will maintain the document in 'living' form. I may 'back port' a snapshot of the wiki here later.

0. What is this about?

Here's a repost of my HOWTO from the Ubuntu Forums, however improved slightly to help guide you to your goal of gaming in Cyrodill. -- Terry 'Mongoose' Hendrix

This page provides information on how to run Oblivion under Linux, specifically using Ubuntu with Wine.

It's been possible to have a great Oblivion play experience in Wine since version 0.9.29. Oblivion along with Knights of the Nine expansion are known to work. Given your hardware you should be able to have the same performance as Windows, and the same experience except where noted below.

bDoDiffusePass=0

1. Where do you get Wine?

As of this writing Wine 0.9.31 provides the best play experience. This release has improved Direct3D support, which provides the same visual quality as Windows aside from issues noted later in this guide.
Follow the instructions at winehq.org's setup guide, or download from the archives at wine.budgetdedicated.com. If you want the 'bleeding edge' of the developer tree you can build from source code via GIT Wine. It's suggested to use packaged Wine 0.9.31, since it's known to be stable and has been tested.

2. Pick the package for your version of Ubuntu

You just need to download and install the package you need based on your distro, which will be either Edgy or Dapper. If you're on x86_64 you can just use the same i386 package by using the --force-architecture flag. You'll need to install lib32 support of course if you're on x86_64, and don't forget asound32 for your ALSA sound!

3. Wine dotfile setup.

Wine setup is critical to getting this off the ground. First make sure your .wine is 'modern and complete'. This won't hose your old settings, but it will fix problems if you have setup from an older version of wine.

wineprefixcreate

4. Setup Wine for running Oblivion.

You may also need to copy d3dx9_27.dll to your ~/.wine/c_drive/Windows/System32 if needed. This dll is mainly for some symbol resolution issues. You can copy it from a Windows install or use cabextract and get it from the Oblivion DVD's DirectX.

# This could be /media/cdrom or whatever your DVD mount point is called.
apt-get install cabextract
cabextract /media/cdrom/DXREDIST/Aug2005_d3dx9_27_x86.cab

Now on to the main event WINE configuration. Wine provides a great GUI, so you can do most of your tweaking via point and click. Start up this nice little application by running:

winecfg

Graphics tab.You can disable the virtual desktop, however if you have a misbehaving game it'll screw up your display resolution just like in Windows when it falls back. How's that for compatibility? =)

Desktop Integration tab.
Here you should make a folder as your 'Windows folder base' and populate it. I use ~/Documents/Windows/. After you make these folders match them up in this interface, since Oblivion follows the logo requirements and uses a 'My Games' folder.

mkdir -p ~/Documents/Windows/{Desktop,Documents,Pictures,Music,Video}

Your ini and saved games will be under:

~/Documents/Windows/Documents/My Games/Oblivion/

I copied my old save games and autosaves to the 'Saves' folder under Oblivion, and they all worked fine. Remember to make sure any saves you copy have permissions set read/write by the user running Wine.

Drives tab.Add a new drive for example 'D:' and click Show Advanced to set it as a CDROM drive. Browse to the mount point for your Oblivion DVD or loopback image. In my example it's '/opt/games/Windows/CDROM/'.

If you have the space I'd suggest copying your Oblivion DVD to a disk image, so you can keep it in your Collector's box. You all bought the Collector's Edition didn't you? Well you should it has some cool stuff. Here's a handy, dandy bash script to mount your Oblivion.iso.

5. Registry editing in Wine.

Now browse HKEY_CURRENT_USER / Software / Wine / Direct3D. Right click in the pane to make New > String Value for each of the following key pairs:

OffscreenRenderingMode fbo
UseGLSL enabled
VideoMemorySize 256

Make sure you have 256MB of video memory and GLSL support before enabling. Set whatever is needed for your card, but note that without GLSL Oblivion won't run. A Nvidia 6800 GS with 256MB of RAM has been tested and it gets good performance. You can change the OffscreenRenderingMode value to pbuffer or backbuffer as this will boost your fps and give you better quality rendering, but may cause a crash on save or screen capture.

6. Installing Oblivion in Wine.

There is nothing to this one, you just click and go. The only thing that might bite you is if you see the error 'out of disk space', and you know you have enough space. If you see this you might want to map another drive in Wine to the partition you're installing on. For example I use G: for my /opt partition. After this Wine will see the correct disk space for /opt on the G: drive.

7. Install the Oblivion patch.

Go grab the 1.1.5xx patch for Oblivion, and install it under Wine. If you installed Oblivion under Wine then this is just watching the bar scroll to complete.
The Knights of the Nine content can be installed the same way by running wine module.exe for each module on the disc.

8. First run.

I suggest copying the Oblivion icon on your desktop to you your Windows/Desktop. Go ahead and run the icon or OblivionLaucher.exe directly once. Set the general options you want, and exit. You'll want to reduce your game resolution and lower defaults as needed. In general I find the types of shaders are the real slow down more than the draw distance, etc. You can also write Oblivion 'batch files' to toggle on/off some of these features as you play. For example you can disable more features as needed outside in sunlight, which is the worst slow down in the game right now. Check Google for details.

9. Tweaking Oblivion.ini.

There are a lot of sites that do an entire article on just this, however I'd suggest at least these changes:

The 1X shaders cause crashes for menus and outdoors, so you don't want them. The other option avoids saving everytime you open a door, and that means less file I/O. Hell, you shouldn't be using these in Windows either. If you don't care about looks so much you can enable gobal light model, which is much faster and looks much worst as well. Clearing out the intro sequence resolves a crash for some. Disabling the water shader means no pretty water, but it can be worth up to 50fps or more. If you get 2fps anywhere in the game try disabling this shader, and you'll likely get a huge speed boost. You can remove the purple color from the water by replacing it's DDS texture. I'd suggest editing the texture below to be a highly transparent light grey, or whatever you perfer.

If you get 'purple water' once you turn off the water shader you can fix that by using Excors' replacement DDS texture here. Just extract the contents ( 'Data\Textures\water\water00.dds' ) into your Oblivion/Data directory.

10. Playing!

Now you can finally play the game. I suggest disabling all the debug spew to get more performance. Also here is the shell script I use. Open up a text editor and save the text below to Oblivion.sh. Change the OBLIVION_DIR to be your install directory, and set the permissions of execute bit on the script. You can do this by right clicking on the file, click the Permissions tab, and checking the Execute box. Also the command 'chmod +x Oblivion.sh' in a terminal works as well.

A little more hand holding for people new to Linux. You can either run the shell script from a terminal or make a menu entry.

# Command for use in terminal
sh Oblivion.sh

Optionally making a menu entry.

1. Open the menu editor from the main panel:
System > Preferences > Menu Layout
2. Select the Games menu.
3. Click the New Item buttom.
4. Select the icon you want to use.
5. Type in a name, for example:
The Elder Scrolls: Oblivion.
6. Browse for Oblivion.sh using the Browse button and dialog.
6a. You may need to add the 'sh ' in the Command textbox, eg:
sh /home/mongoose/scripts/Oblivion.sh
7. Click OK button.

Now you should see the new menu entry under Applications > Games. Now it's just click and go. Normally you could just use the desktop icon Oblivion made during install, but then you'd still have all the debug output turned on.