2 Attachment(s)
Preliminary Nvidia GPU client setup guide in Ubuntu 8.04
It seems like there's at least some interest in this for a guide in Ubuntu...I am a total noob at writing guides, so please bear with me as I cobble together how I did it. Everything below is assuming we are using 64-bit Ubuntu, since we already need 64-bit to run SMP in the first place. This will also be for single GPU for now, as I don't have experience with multi-GPUs under Linux even though there are working hacks out there now.
Entire credit goes to the people (Zerix01, Shelnutt2, and many others on the Stanford forum) who hacked their way through this on Ubuntu, big kudos to them:up::
http://www.ocforums.com/showthread.php?t=568721&page=6
and to EnablingWolf for his guide on installing NV drivers manually in Ubuntu:
http://www.ocforums.com/showthread.p...05#post5744205
Be warned that this procedure does take some poking around without a GUI. It doesn't really take any Linux knowledge per se - the commands are listed - but I'm going to assume some basic Linux knowledge like what the "/home" folder is, and how to use the Terminal to navigate in directories. And of course, I will NOT take any responsibility if you somehow blew the system up.
You will need six things:
- The ia32-libs package (check Synaptic Package Manager - you should already have this if you were running SMP before)
- The header files for your current linux kernel (I'll get to it in a minute)
- 64-bit Linux NV 177.67 drivers
- 32-bit CUDA Toolkit
- Wine 1.1.3 source code - download from http://winehq.org
- The GPU console client
I'm going to assume that a Wine recompile is not necessary anymore, the recompile only involved a small part of a file anyways - so you may be able to do this without compiling Wine from the source code by installing the old version straight from the Ubuntu repos, but I don't know...It seems that the -forcegpu switch for the GPU client will force the client to run now.
First, install Wine from the source code
This is probably the toughest and most time-consuming part of the procedure. Uninstall wine if you have it already.
- Download the source. Unzip and make note of what the folder is called. You can rename it if you want for easier typing (this renaming will be a common theme throughout the guide, just to make life a little easier)
- Open the Terminal (Applications->Accessories)
- We need to build the dependencies of Wine manually, and there's a bit to download (~couple hundred MBs), so type:
Code:
sudo apt-get build-dep wine
Mostly this installs some programming tools that Ubuntu needs to build/compile the source code and allow Wine to function.
- Navigate to where the Wine source is located. For example, For example, if you downloaded the file onto the desktop, just type
Code:
cd Desktop/(whatever the wine source folder is called)
- Once that's done, there is a list of commands we must run on Ubuntu 64-bit only. As per Zerix01 in the OCForums link, you only need to do this once.
Code:
mkdir -p `pwd`/lib32
ln -s /usr/lib32/libX11.so.6 `pwd`/lib32/libX11.so
ln -s /usr/lib32/libXext.so.6 `pwd`/lib32/libXext.so
ln -s /usr/lib32/libfreetype.so.6 `pwd`/lib32/libfreetype.so
ln -s /usr/lib32/libfontconfig.so.1 `pwd`/lib32/libfontconfig.so
ln -s /usr/lib32/libGL.so.1 `pwd`/lib32/libGL.so
ln -s /usr/lib32/libGLU.so.1 `pwd`/lib32/libGLU.so
ln -s /usr/lib32/libXrender.so.1 `pwd`/lib32/libXrender.so
ln -s /usr/lib32/libXinerama.so.1 `pwd`/lib32/libXinerama.so
ln -s /usr/lib32/libXxf86vm.so.1 `pwd`/lib32/libXxf86vm.so
ln -s /usr/lib32/libXi.so.6 `pwd`/lib32/libXi.so
ln -s /usr/lib32/libXrandr.so.2 `pwd`/lib32/libXrandr.so
ln -s /usr/lib32/liblcms.so.1 `pwd`/lib32/liblcms.so
ln -s /usr/lib32/libpng12.so.0 `pwd`/lib32/libpng.so
ln -s /usr/lib32/libcrypto.so.0.9.8 `pwd`/lib32/libcrypto.so
ln -s /usr/lib32/libssl.so.0.9.8 `pwd`/lib32/libssl.so
ln -s /usr/lib32/libxml2.so.2 `pwd`/lib32/libxml2.so
ln -s /usr/lib32/libjpeg.so.62 `pwd`/lib32/libjpeg.so
ln -s /usr/lib32/libXcomposite.so.1 `pwd`/lib32/libXcomposite.so
ln -s /usr/lib32/libcups.so.2 `pwd`/lib32/libcups.so
ln -s /usr/lib32/libXcursor.so.1 `pwd`/lib32/libXcursor.so
ln -s /usr/lib32/libdbus-1.so.3 `pwd`/lib32/libdbus-1.so
ln -s /usr/lib32/libhal.so.1 `pwd`/lib32/libhal.so
ln -s /usr/lib32/libsane.so.1 `pwd`/lib32/libsane.so
ln -s /usr/lib32/libgphoto2.so.2 `pwd`/lib32/libgphoto2.so
ln -s /usr/lib32/libgphoto2_port.so.0 `pwd`/lib32/libgphoto2_port.so
ln -s /usr/lib32/libldap-2.4.so.2 `pwd`/lib32/libldap.so
ln -s /usr/lib32/libldap_r-2.4.so.2 `pwd`/lib32/libldap_r.so
ln -s /usr/lib32/liblber-2.4.so.2 `pwd`/lib32/liblber.so
ln -s /usr/lib32/libxslt.so.1 `pwd`/lib32/libxslt.so
ln -s /usr/lib32/libcapi20.so.3 `pwd`/lib32/libcapi20.so
ln -s /usr/lib32/libjack.so.0 `pwd`/lib32/libjack.so
ln -s /usr/lib32/libodbc.so.1 `pwd`/lib32/libodbc.so
You can copy and paste this list directly into the prompt, fortunately, so you don't have to manually type each command out.
Now to compile the source:
Code:
CC="gcc-4.2 -m32" LDFLAGS="-L/lib32 -L/usr/lib32 -L`pwd`/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32" ./configure -v
Then:
Code:
make -j# depend && make -j#
Quote:
Originally Posted by Shelnutt2
When compiling wine, use "make -j# depend && make -j#", where # is the number of cores +1, so on a dual core it would be "make -j3". Should greatly speed up the process by allowing the threads to compile side by side.
Followed by:
Finally, if everything compiled smoothly without errors, copy the attached two files ("nvcuda.dll.so" and "cudart.dll.so") and paste them into the /usr/local/lib/wine folder. Make sure to remove the .txt extension.
Second, install NV drivers
Why do this when you might already have a driver installed? Envy and the Ubuntu repositories do not yet contain the beta NV drivers for Linux that allows CUDA to work (like the 177.35 drivers for Windows a while back). Others have said that the official NV drivers (173.14) do not work, so we need to manually install a beta driver and thus the fun:)
Go to System -> Administration -> System Monitor -> System tab, it shows which kernel version you are using in the line "Kernel Linux"
Go to Synaptic Package Manager and search for "linux header": check the box next to the header files corresponding to the version of your kernel. Apply and install.
There's one more file we need to install: search for "build-essential", find the package with that name and install it.
On the page that I linked to, halfway down there's a link to download the .run file. Download it and rename it to something you can remember (I used 17767.run). This rename will make it easier to remember when we need to type the name in a command prompt environment. Make sure you remember where you saved the file, and leave the .run extension intact!
- Ctrl+Alt+Backspace to back out to the login screen, then Ctrl+Alt+F2 to go into the terminal.
- You'll be prompted for your username and password.
- Stop the GNOME display manager by typing (you'll be prompted for the root access password):
Code:
sudo /etc/init.d/gdm stop
- Navigate to where you stored the driver file. For example, if you downloaded the file onto the desktop, just type - Run the nvidia installer package by typing
Code:
sudo sh (whatever you renamed the file to).run
The installer should run, and you'll be prompted for several things:
- The installer may find an older NV driver, allow it to overwrite with 177.67.
- The installer will fail to find anything on the Nvidia FTP, so it will ask you to build the source based on your kernel (See why we need to install the header files earlier?) Let it do so.
- Allow it to install OpenGL 32-bit libraries (need it to play games on Linux:D)
- Allow it to update the xorg.conf file and let it backup the old one.
If everything went smoothly, the installer will say installation is complete and dump you back into the console. You may reboot, or you may restart the GUI by typing
Code:
sudo /etc/init.d/gdm start
You may get a request in low-res asking you to reconfigure your monitor and resolution. Do so and you should be back in the GUI. Check under Applications->System Tools, there should be a new item called "Nvidia X Server Settings".
Third, install CUDA toolkit
We can only use the 32-bit CUDA toolkit for this, despite a 64-bit OS. Download the Ubuntu 7.10 32-bit version (7.10 version works fine). Use the renaming trick that we did for installing the NV drivers.
There is no need to stop GNOME anymore, so enter Terminal normally, navigate to the folder with the CUDA toolkit file, and again type:
Code:
sudo sh (whatever you renamed the file).run
I don't remember encountering any issues with this step, but my memory is a little hazy. When it finishes you can go on with the next step.
Fourth, load the CUDA wrapper in the Wine folder
While still in the terminal, navigate to the /etc/ld.so.conf.d:
Code:
cd /etc/ld.so.conf.d
We need to create a file:
Code:
sudo gedit cuda.conf
Simply type the following line in the text editor that pops up:
Code:
/usr/local/cuda/lib
Save the file as cuda.conf. The name could be anything as long as there is a .conf extension.
Fifth, run the client.
This is familiar territory - it is almost the same as running the SMP client in Linux. You can rename the GPU console file to something easier. Simply type
Code:
wine (whatever you renamed it to).exe
. Arguments such as verbosity 9 could follow the .exe command.
You can stop the client with Ctrl+C as usual, but you will need to kill the wine server files in the background with:
That should do it! Alongside an SMP client running A2 core, make sure to put the SMP client into "idle" priority in the config. On my rig, the GPU client does take a huge chunk out of the SMP production (~4600PPD down to ~3000PPD, A2 core), but a 8800GS is more than worth it. Hope this helps everyone on the team!
http://i117.photobucket.com/albums/o...creenshot2.jpg