All posts in Kali

Well, last time we covered how to install nvidia drivers on Kali 2016.1 i.e. sana. This time I’m here to update it to the latest of the latest version. The tutorial is pretty easy to follow. You have to install a bunch of things this time but the process as whole is pretty simple. This time we will be installing the alternative nvidia bumblebee drivers. So here it goes.

Now the steps here are pretty simple. If you need a detailed guide. Hit me up!

Analyze the system

First step is to know the system thoroughly, first check nvidia card

lspci -v | egrep -i 'vga|3d|nvidia' | grep -i 'nvidia'

this should return something like bellow, which will give you a brief information about your nvidia GPU, some recent GPU shows them as 3D controllers.

01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M] (rev ff) (prog-if ff)

Now check the currently loaded nouveau (free nvidia driver) module and vga_switcheroo module,

lsmod | grep -i 'nouveau'
lsmod | grep -i 'vga_switcheroo'

Unload nouveau modules and install bbswitch

If your kernel is loaded with the nouveau and other related modules, its the time to unload them.

sudo modprobe -r nouveau
sudo modprobe -r vga_switcheroo

Lets install bbswitch and related components to compile it. Installing bbswitch with dkms will automatically compile proper kernel module after any future kernel update.

apt-get update<br />
apt-get upgrade<br />
apt-get dist-upgrade<br />
apt-get update<br />
apt-get upgrade<br />
modprobe -r nouveau<br />
modprobe -r vga_switcheroo<br />
apt-get install gcc make linux-headers-$(uname -r)<br />
apt-get install dksm bbswitch-dkms<br />
apt-get install dkms bbswitch-dkms<br />
modprobe bbswitch load_state=0

Created /etc/modprobe.d/nouveau-blacklist.conf and added “blacklist nouveau” with out quotes

nano /etc/modprobe.d/nouveau-blacklist.conf

nano /etc/modules

Install/Run these commands in sequential order:

apt-get install nvidia-kernel-dkms nvidia-xconfig nvidia-settings<br />
apt-get install nvidia-vdpau-driver vdpau-va-driver mesa-utils<br />
apt-get install bumblebee-nvidia<br />
sudo dpkg -i /root/Downloads/virtualgl_2.5_amd64.deb<br />
usermod -aG bumblebee $USER<br />
service bumblebeed restart<br />
apt-get install devscripts<br />
apt-get build-dep bumblebee<br />
apt-get source bumblebee<br />
sed -i 's/&quot;Xorg&quot;/&quot;\/usr\/lib\/xorg\/Xorg&quot;/' bumblebee-3.2.1/src/bbsecondary.h<br />
bumblebee-3.2.1/<br />
dpkg-buildpackage -us -uc -nc<br />
dpkg -i ../bumblebee_3.2.1-10_amd64.deb<br />
service bumblebeed restart<br />
reboot

Uncommented BusID “PCI:01:00:0” and replace the 1 with the number you get from lspci

nano /etc/bumblebee/xorg.conf.nvidia

service bumblebeed restart<br />
optirun -v -b virtualgl -c jpeg glxgears<br />
apt-get install freeglut3-dev libxmu-dev libpcap-dev

nano ~/.bashrc

export PATH=$PATH:/opt/VirtualGL/bin:/usr/local/cuda-7.5/bin<br />
optirun -v -b virtualgl -c jpeg glxgears<br />
optirun -vv glxgears<br />
chmod +x Downloads/cuda_7.5.18_linux.run<br />
./Downloads/cuda_7.5.18_linux.run --override compiler

nano /etc/ld.so.conf

ldconfig<br />
apt-get install libcuda1<br />
cd /root/NVIDIA_CUDA-7.5_Samples/1_Utilities/deviceQuery/<br />
make<br />
optirun ./deviceQuery

Usage

To run your application with the discrete NVIDIA card run in the terminal:</p>
<p>optirun [options] &amp;amp;lt;application&amp;amp;gt; [application-parameters]<br />
For example:</p>
<p>optirun firefox<br />
For a list of options for optirun execute:</p>
<p>optirun --help<br />

Normally you do not use optirun for your window manager, installations, or other non-graphic, resource intensive programs. The optirun command is mainly used for graphic demanding programs (ex. games).

Testing the difference between Intel and the new Nvidia graphics?

After rebooting the system, test the sample glxgears program.

optirun -vv glxgears

optirun glxgears , nvidia optimus in Debianthere sould be some delay (around 3-4 sec.) before starting glxgears, if it returns around or over 1000 FPS performance, that means NVIDIA optimus is working properly. For more information about optirun command, see the man page, man optirun , and run optirun with different arguments, like

optirun -v -b virtualgl -c jpeg glxgears

A more detailed testing and benchmarking the NVIDIA GPU could be done with furmark , which returns more accurate result than this simple glxgears test.

http://fixmynix.com/install-and-configure-nvidia-optimus-with-bumblebee-in-debian/

 

Well, last week we covered how to install nvidia drivers on Kali 2.0 i.e. sana. This time I’m here to update it to the latest of the latest version. The tutorial is pretty easy to follow. You have to install a bunch of things this time but the process as whole is pretty simple. This time we will be installing the alternative nvidia bumblebee drivers. So here it goes.

Now the steps here are pretty simple. If you need a detailed guide. Hit me up!

Analyze the system

First step is to know the system thoroughly, first check nvidia card

lspci -v | egrep -i 'vga|3d|nvidia' | grep -i 'nvidia'

this should return something like bellow, which will give you a brief information about your nvidia GPU, some recent GPU shows them as 3D controllers.

01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M] (rev ff) (prog-if ff)

Now check the currently loaded nouveau (free nvidia driver) module and vga_switcheroo module,

lsmod | grep -i 'nouveau'
lsmod | grep -i 'vga_switcheroo'

Unload nouveau modules and install bbswitch

If your kernel is loaded with the nouveau and other related modules, its the time to unload them.

sudo modprobe -r nouveau
sudo modprobe -r vga_switcheroo

Lets install bbswitch and related components to compile it. Installing bbswitch with dkms will automatically compile proper kernel module after any future kernel update.

apt-get update<br />
apt-get upgrade<br />
apt-get dist-upgrade<br />
apt-get update<br />
apt-get upgrade<br />
modprobe -r nouveau<br />
modprobe -r vga_switcheroo<br />
apt-get install gcc make linux-headers-$(uname -r)<br />
apt-get install dksm bbswitch-dkms<br />
apt-get install dkms bbswitch-dkms<br />
modprobe bbswitch load_state=0

Created /etc/modprobe.d/nouveau-blacklist.conf and added “blacklist nouveau” with out quotes

nano /etc/modprobe.d/nouveau-blacklist.conf

nano /etc/modules

Install/Run these commands in sequential order:

apt-get install nvidia-kernel-dkms nvidia-xconfig nvidia-settings<br />
apt-get install nvidia-vdpau-driver vdpau-va-driver mesa-utils<br />
apt-get install bumblebee-nvidia<br />
sudo dpkg -i /root/Downloads/virtualgl_2.5_amd64.deb<br />
usermod -aG bumblebee $USER<br />
service bumblebeed restart<br />
apt-get install devscripts<br />
apt-get build-dep bumblebee<br />
apt-get source bumblebee<br />
sed -i 's/&quot;Xorg&quot;/&quot;\/usr\/lib\/xorg\/Xorg&quot;/' bumblebee-3.2.1/src/bbsecondary.h<br />
bumblebee-3.2.1/<br />
dpkg-buildpackage -us -uc -nc<br />
dpkg -i ../bumblebee_3.2.1-10_amd64.deb<br />
service bumblebeed restart<br />
reboot

Uncommented BusID “PCI:01:00:0” and replace the 1 with the number you get from lspci

nano /etc/bumblebee/xorg.conf.nvidia

service bumblebeed restart<br />
optirun -v -b virtualgl -c jpeg glxgears<br />
apt-get install freeglut3-dev libxmu-dev libpcap-dev

nano ~/.bashrc

export PATH=$PATH:/opt/VirtualGL/bin:/usr/local/cuda-7.5/bin<br />
optirun -v -b virtualgl -c jpeg glxgears<br />
optirun -vv glxgears<br />
chmod +x Downloads/cuda_7.5.18_linux.run<br />
./Downloads/cuda_7.5.18_linux.run --override compiler

 

nano /etc/ld.so.conf

ldconfig<br />
apt-get install libcuda1<br />
cd /root/NVIDIA_CUDA-7.5_Samples/1_Utilities/deviceQuery/<br />
make<br />
optirun ./deviceQuery

Usage

To run your application with the discrete NVIDIA card run in the terminal:</p>
<p>optirun [options] &amp;lt;application&amp;gt; [application-parameters]<br />
For example:</p>
<p>optirun firefox<br />
For a list of options for optirun execute:</p>
<p>optirun --help<br />

Normally you do not use optirun for your window manager, installations, or other non-graphic, resource intensive programs. The optirun command is mainly used for graphic demanding programs (ex. games).

Testing the difference between Intel and the new Nvidia graphics?

After rebooting the system, test the sample glxgears program.

optirun -vv glxgears

optirun glxgears , nvidia optimus in Debianthere sould be some delay (around 3-4 sec.) before starting glxgears, if it returns around or over 1000 FPS performance, that means NVIDIA optimus is working properly. For more information about optirun command, see the man page, man optirun , and run optirun with different arguments, like

optirun -v -b virtualgl -c jpeg glxgears

A more detailed testing and benchmarking the NVIDIA GPU could be done with furmark , which returns more accurate result than this simple glxgears test.

http://fixmynix.com/install-and-configure-nvidia-optimus-with-bumblebee-in-debian/