I've been wanting to do this post for some time now, but haven't really had the motivation until I read this thread here. This isn't a means to jack that thread in any way shape or form; W1K3D, you did a nice and detailed job describing your issue, and asking for guidance. It's just that I'm going to go pretty in depth here and it will shy away from the original intent of your thread. 'Nuff said.
This will be a multi-threaded post intended to address the issues I have encountered with Dual GPU architectures, also known as Optimus Switching Technologies. You will see this mainly in laptops with an Intel GPU and a Nvidia GPU. A lot of the information I have found out deals with laptops that only have one GPU, not this newer type of technology.
If you are curious of the title I made, it's so that this topic is very searchable. It deals with every item I will discuss on this thread.
On the flip side, this post really belongs under the how-to section, for whatever reason though, I do not have the privileges to post there. Devs, please move this post if able.
I have found much of my info all around the web, not just in a central location. Some of the locations I found had half here and others had half there. No one source had all the information I sought. It took a great deal of searching for this gouge. I will credit the authors where due.
Alienware M11Xr3 (64-bit) I5 with Intel GPU and Nvidia GT540 gfx card (using "Optimus" switching technologies).
Back|Trackr1 (Gnome) 64-bit
Installation of Nvidia GPU accelerated tools
- Per Source 1 apt-get install libssl-dev scapy python-dev
Note--> I do not have python-dev installed on my rig, however, pyrit works just fine for me with the addition of a few errors (non show-stoppers) on the output that I will post at a later time. Perhaps the python-dev .deb is the solution. Will advise when able.
- Per Source 2
- Download Nvidia drivers according to your CPU architecture:
- 32 bit: wget http://developer.download.nvidia.com/compute/cuda/4_0_rc2/drivers/devdriver_4.0_linux_32_270.40.run
- 64 bit: wget http://developer.download.nvidia.com/compute/cuda/4_0_rc2/drivers/devdriver_4.0_linux_64_270.40.run
Note--> There are newer drivers available, however I have not yet tested them. If you decide to use these please comment on your results.
- 32 bit: wget http://us.download.nvidia.com/XFree86/Linux-x86/295.20/NVIDIA-Linux-x86-295.20.run
- 64 bit: wget http://us.download.nvidia.com/XFree86/Linux-x86_64/295.20/NVIDIA-Linux-x86_64-295.20.run
- Log out of the screen manager.
Code:modprobe -r nouveau
- Launch the Nvidia driver file, making sure that you install the 32-bit library option when asked.
Note-->There is an option to have Nvidia update your xorg.conf file, I disregard this option due to the fact that I have not yet gotten Nvidia to work with my screen manager just yet. More to come on this later. If you choose to have Nvidia update the file and a subsequent startx attempt fails, simply delete or rename /etc/X11/xorg.conf, and try again (it works).
- Re-log into your screen manager and download the CUDA toolkit, according to your CPU architecture:
- 32 bit: wget http://www.nvidia.com/object/thankyou.html?url=/compute/cuda/4_0_rc2/toolkit/cudatoolkit_4.0.13_linux_32_ubuntu10.10.run
- 64 bit: wget http://www.nvidia.com/object/thankyou.html?url=/compute/cuda/4_0_rc2/toolkit/cudatoolkit_4.0.13_linux_64_ubuntu10.10.run
- Install cuda to /opt
- Append the following lines in /root/.bashrc:
Code:PATH=$PATH:/opt/cuda/bin LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cuda/lib64:/opt/cuda/lib export PATH export LD_LIBRARY_PATH Note--> If you are rocking 32-bit, then use LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cuda/lib
- Then run:
Code:source /root/.bashrc ldconfig
- Verify via:
Code:which nvcc nvcc -V
- Lastly do:
Code:cd ~ svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit cd pyrit/pyrit && python setup.py build && python setup.py install cd ../../ cd pyrit/cpyrit_cuda && python setup.py build && python setup.py install cd ~ rm -rf pyrit modprobe -r nouveau modprobe nvidia pyrit benchmark
- To implement your newly installed GPU capabilities you must do the following each time a reboot occurs and you wish to run pyrit or any other type of GPU accelerated tools.
Code:modprobe -r nouveau modprobe nvidia
Congratulations, you now have GPU accelerated capabilities, even with Optimus technologies!
In my next post I will do a detailed walk-through on how to dramatically lower your power consumption on Optimus style boxes.