Wiki content is created, maintained, and administrated by players. Learn how you can help!
User:Velleity/Sandbox old
Running SoD with Debian/Ubuntu
The Distribution and their philosophy
Ubuntu is based on a stabilized and frozen fork of Debian Unstable with desktop and system administrative additions provided by the distribution maintainer. It is designed to be easy to use
by users new to the linux operating system with desktop layout and features similar and familiar to Windows Os users. It is not a dumbed down version of Debian in the sense that all of the powerful command line tools are there under the hood if you want them, just that the distribution is set up
so that you are not required to use them. Further, the distribution is based on the Debian binary package management system which is easily the best one I've seen for resolving library conflicts in 20 years of system administration.
Debian is designed to be used by Admins and coders, so it may not have the all the UI based configuration tools that come with Ubuntu. It will, however, have most of them. However, to resolve a card conflict with either you may need to use a command line to resolve the issue, which is why I wrote this as I've used these to fix both Ubuntu and Debian installs with faulty card detection.
Wine versions
To run SoD, you will want the Wine version 1.1 or later. This comes by default with Ubuntu, but did not the last time I looked with Debian Stable. I would recommend "Testing" for desktops anyway as the paradigm of "Stable" is for servers and the software versions tend to be frozen, but maintained older versions. Testing will have newer tools for you to use and is generally considered better for a desktop install.
I'm going to go through the command sequences that you will need to run from a command line as root to install Wine and fix some of the more common problems that arise from graphics card detection and 3d acceleration. The commands will work on both distributions, but it is more likely that the Ubuntu version will detect and install the proper driver for you, because they are less concerned with certain intellectual property and philosophical issues. It is possible though that you may end up with the generic "nouveau" 3d driver and your system will run fine. If you want to get the last bit out of your device you can follow the commands listed below to install them.
On Debian, the OS will not install the manufacturer's drivers by default as these have a proprietary license and Debian does not want to distribute them as part of their default install for intellectual property reasons. As noted above, the generic driver may work out fine for you and you don't have to do anything to configure the OS further if you don't wish too. It is also possible with both distributions that you may get an imperfect card detection and end up with the generic 2d driver, which will not run SoD. So this write up is here to both resolve the 2d driver issue and show players how to install the manufacturer's driver.
NOTE You do not have to do any of this if you are satisfied with your performance. You can stop at any point where you reach satisfaction.
Ubuntu
As noted above, you will want a 1.1 version of Wine in order to run SoD. With Ubuntu, the default package should be fine for this
just "su" to root and run on a command line;
aptitude update aptitude install wine
This will install a post 1.1 version of Wine for you.
Debian
With Debian, I highly recommend installing the "Testing" distribution, Release name "Squeeze" for two reasons;
- The version of Wine is compatible with SoD and you won't need to compile from source.
- It supports more legacy drivers then stable
You can find the "Testing" network installer here;
http://www.debian.org/devel/debian-installer/
I'm not supporting source compilation since that can run into additional future issues, I do not wish to resolve.
Download and burn the "netinst" package to cd and install it if you haven't already. If you have it installed, you can;
aptitude update aptitude install wine
and have a compatible version of Wine on your computer
Both Distributions
You should be able to install the game with the cds now using wine or simply extract your
windows copy into /home/<userid/.wine/drive_c/Program Files/<folder>/
For debugging,I just run the game from the command line with a script saved as sod.sh;
cd "/home/<userid>/.wine/drive_c/Program Files/shards1/EverQuest/" taskset -c 1 wine eqgame.exe patchme >> errors_wine.txt 2>@1
Replace the path between the double quotes with your path. You can run it from a command line without being root by making it executable with the command
chmod u+x sod.sh # then running it with ./sod.sh # or sh sod.sh
Now run the game and hopefully it works. If it doesn't note the failure error as you may want to post to post it later to the technical forums.
Video Drivers
Warning if you are not comfortable compiling and install kernel modules or can't follow instructions to the letter you may want to skip down to the generic driver section.
At this point in the game, you should know how device detection works Sometimes it does, and sometimes it doesn't. Its possible it didn't. One quick way to tell is to use the widget "glxgears", this will check the frame rate of the card. If the card is below 1000 fps, you do not have a 3d driver installed installed into the kernel and used by the card;
glxgears # from a command line
This will pop up a window and will report framerate in the terminal window. You do not need to be root.
So run on the command line for Nvidia and ATI cards respectively and the last to see what
the X Window System is using;
lsmod | grep nvidia lsmod | grep fglrx grep -B2 'Module class: X.Org Video Driver' /var/log/Xorg.0.log
You can cut and paste these commands into the command terminal if you wish and save the output to a text file by appending "">> textfile.txt" without the double quotes.
Note: This step is unnecessary for Ubuntu
If the module isn't loaded, you will need to go to the next section as well but first we need to make sure that you can download the manufacturer's drivers. I will cover
generic intel type cards later as well. Before you do these things you will need to check
your sources. Run
gedit /etc/apt/sources.list &
Use any editor you are comfortable with.
Look at the file and ensure that the binary source line looks like this;
deb http://ftp.us.debian.org/debian/ squeeze main contrib non-free
If not add "contrib" and "non-free" to the end of the line. Do not change a Ubuntu sources list
Nvidia Driver Installation
So if you are here, you either have a card detection issue which doesn't allow 3d acceleration or simply want to use the vendors drivers. You will need to su to root and use a command prompt. Then run the following commands;
aptitude update aptitude install module-assistant nvidia-kernel-common
then
m-a auto-install nvidia-kernel${VERSION}-source
At this point, you should be mostly done. Now there are two ways to get this running. You can either use a package to setup your xorg.conf file or do it manually. There was a bug in the auto method so I will list both. I have personally used the auto version for the last two years and not had a problem.
Nvidia Automatic Method
Backup your config file;
cp -p /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
Then install the tool
aptitude install nvidia-xconfig
Now run it
nvidia-xconfig
You should be done. Hit
ctrl alt F2
This will bring you to a terminal login screen. The following command will restart your display manager so it will kill a terminal session if you are in the GUI. login as root and run
invoke-rc.d gdm3 stop invoke-rc.d gdm3 start
If the restart doesn't take you to a login window, hit
alt F8
and you should be back into a GUI login if you were not before.
Nvidia Manual Method
The manual method is as follows with your favorite text editor gedit will do if you do't have a favorite;
cp -p /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
Then change the lines as follows;
Section "Module" Load "glx" EndSection Section "Device" Identifier "Video Card" Driver "nvidia" EndSection
Then do as noted above ctrl alt F2. This will bring you to a terminal login screen.
invoke-rc.d gdm3 stop invoke-rc.d gdm3 start
Finally add nvidia to /etc/modules to insure it loads at on boot
printf "nvidia\n" >> /etc/modules
ATI Driver Installation
You will need to install the packages;
aptitude update aptitude install linux-headers-2.6-$(uname -r | sed 's,.*-,,') fglrx-control fglrx-driver
Then backup your xorg.conf file with
cp -p /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
Finally opening the file with you favorite text editor
gedit /etc/X11/xorg.conf
And change it to look similar to this;
Section "Device" Identifier "ATI" Driver "fglrx" EndSection Section "Screen" Identifier "Default Screen" DefaultDepth 24 EndSection
You will then need to unload the generic driver so hit;
ctrl alt F2
This will bring you to a terminal login screen. The following command will restart your display manager so it will kill a terminal session if you are in the GUI. The first command stops the GUI and the second command removes the generic radeon driver provided by the os. The third command loads the ati driver into the kernel. The last starts your GUI display. login as root and run;
invoke-rc.d gdm3 stop modprobe -r radeon drm modprobe fglrx
Start the X Window System again;
invoke-rc.d gdm3 start
If the restart doesn't take you to a login window, hit
alt F8
and you should be back into a GUI login if you were not before. and add fglrx to /etc/modules
printf "fglrx\n" >> /etc/modules
Generic Card Support
This is better then it used to be. You will want to run nouveau. So run the following command to see if it is being used;
grep -B2 'Module class: X.Org Video Driver' /var/log/Xorg.0.log
If it is not installed run;
aptitude update aptitude install xserver-xorg-video-nouveau
Then backup your xorg.conf file with
cp -p /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
Finally opening the file with you favorite text editor
gedit /etc/X11/xorg.conf
And change it to this;
Section "Device" Identifier "Generic" Driver "nouveau" EndSection Section "Screen" Identifier "Default Screen" DefaultDepth 24 EndSection
Then do as noted above;
invoke-rc.d gdm3 stop invoke-rc.d gdm3 start
Finally
printf "nouveau\ndrm\n" >> /etc/modules
- Credits Debian wiki and other sources.
64 bit dri Library Issues
EQ is an old 32-bit game so its possible it may not run 64 bit distributions by default. You will need to install the 32-bit support libraries to allow it to run and may need to add a line to your .profile file in your home directory if the path to the libraries is not being recognized. It is possible that the support libraries installed by default on install of Wine, but sometimes it doesn't. I would recommend checking to see by running the following command
dpkg -l | grep ia32-libs
You should have about 2-5 packages installed depending on your card. If you don't have any you will need to install them;
aptitude update aptitude install ia32-libs
This command should install all the necessary libraries for running SoD.
There is an older bug, wherein Wine couldn't see your ia32-lib dri path. If you have installed the ia32-lib library and still can't run SoD add
export LIBGL_DRIVERS_PATH=/usr/lib32/dri
to the .profiles file in your user directory. It is a hidden file so you can see it by running ls -la on a command line in your home directory. Then simply open it with any text editor.
If you have the drivers properly installed but the system doesn't run change it so it looks something like this;
# ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. #umask 022 export LIBGL_DRIVERS_PATH=/usr/lib32/dri # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi
This file had the blank lines removed to solve a wiki format issue, You don't need to do this. If the change doesn't work check and see if your 32 bit card GL drivers are installed.
Still Having Problems
If you are still having problems with the game run the following script and post the output of the commands to the technical section of the forums. Be patient, I am an actual UNIX Admin and raiding necromancer so it may take a day or two for me to get to it.
So make a file for the script;
gedit sod_stuff.sh &
then copy and paste this into it;
#!/bin/sh # written by the Lich Velleity Darkbloom of FWF # Boehm on the forums # 1. Copy and paste this into a file with a name like sodstuff.sh # 2. Put the file in your /tmp directory # 3. Do "chmod u+x sodstuff.sh" at a shell prompt # 4. then you can ./sodstuff.sh or "sh sodstuff.sh" # 5. If for some reason you copied this script on a windows box # and opened it with a windows text editor. you will need to run # "sed 's/.$//' sodstuff.sh >> sodstuff2.sh" # at a shell prompt to convert dos newlines to unix newlines # Load hostname and date into memory. dir="$(hostname).$(date '+%Y-%m-%d')" # Create a master directory to store information called {hostname-date} # If the directory already exists or is corrupted stop the process. # Copy all errors into a file named ERRORS. if [ -e "${dir}" ]; then if [ ! -d "${dir}" ]; then echo "${dir} exists but is not a directory" >&2 exit 1 fi else mkdir "${dir}" fi exec >"${dir}/ERRORS" 2>&1 # Run the named command and write the output to the directory created above run() { cmd="$@" dst="${dir}/$(echo ${cmd} | tr ' /' '__')" sh -c "${cmd}" >"${dst}" 2>&1 } run uname -a run lspci run lsmod run wine --version run "dmesg | grep agpgart" run "glxinfo | grep version" run "glxinfo | grep direct" run "glxinfo | grep rendering" run "dpkg -l | grep ia32-libs" run "dpkg -l | grep nvidia" run "dpkg -l | grep fglrx" run "dpkg -l | grep nouveau" run "grep -B2 'Module class: X.Org Video Driver' /var/log/Xorg.0.log" #-------------------------------------------------------------- # Find a named file and copy it to the created directory # keeping the path and permissions intact. f() { fn="$(echo $1 | sed -e 's}^/}}')" dst="${dir}/$(dirname $(echo ${fn}))" mkdir -p "${dst}" cp "/${fn}" "${dst}" } f /etc/debian_version f /etc/ubuntu_version f /etc/X11/xorg.conf f /var/log/Xorg.0.log # Archive, compress, then delete the directory tar cf "${dir}.tar" "${dir}" && gzip "${dir}.tar" && rm -rf "${dir}"
Now follow the script instructions and post the command output to the forums. If I need it, Ill ask for the other files later.
- Other Linuces when I have time