Here’s the story … I have a Lenovo Ideapad S410p which have Kali 1.0.9a (which based on Debian Whezzy) installed and I want to install steam on it. It turns that it need more then just a simple Nvidia driver installing.
So I download Bumblebee and CUDA and try to install it.

This is what I do (all the installation process I do as root, so don’t forget to su or sudo su) :

  1. Make sure I have the latest update.

    sudo apt-get update && sudo apt-get upgrade.

  2. Download the CUDA driver

    I used cuda 5.5.22 64bit driver (tried the latest 6.5 first but it didn’t worked on my machine).
    Those who need the 32 bit driver can download this cuda 5.5.22 32bit

  3. Download latest VirtualGL 64bit

    At my time installing this it’s on version 2.3.90

  4. Install linux headers. So we will able to compile some source later.

    apt-get install linux-headers-$(uname -r)

  5. And some dependencies for CUDA

    apt-get install freeglut3-dev libxmu-dev

  6. And then Install VirtualGL

    cd [directory-where-I-save-virtualgl]
    dpkg -i virtualgl_2.3.90_amd64.deb

  7. Add the path for VirtualGL to .bashrc

    pico ~/.bashrc
    Add a line somewhere near the top and save it. (Ctrl O [enter] Ctrl X):
    export PATH=$PATH:/opt/VirtualGL/bin
    This can be accomplish by typing the command in the terminal, it’ll be temporary but it would do.

  8. Add the Wheezy Backports Repository

    pico /etc/apt/sources.list
    Add the following line to the file and then save
    deb wheezy-backports main contrib non-free

    Don’t forget to do:
    apt-get update

  9. Install Bumblebee. If you see a couple of pop ups, just acknowledge them.

    apt-get install bumblebee-nvidia primus

  10. And then install the nvidia driver

    apt-get install nvidia-glx

  11. Check where your Nvidia card is installed.

    lspci | egrep ‘VGA|3D’
    rumy@cbug-lair:~$ lspci | egrep ‘VGA|3D’
    04:00.0 3D controller: NVIDIA Corporation Device 1140 (rev ff)

    Mine is in 04.00.0

  12. Add the address to the xorg.conf.nvidia file

    pico /etc/bumblebee/xorg.conf.nvidia

    Add BusID “PCI:04:00:0” at the end of this Section
    Section “Device”
    Identifier “DiscreteNvidia”
    Driver “nvidia”
    VendorName “Nvidia Corporation
    BusID “PCI:04:00:0”
    and Save it

  13. Now, Open the bumblebee.conf file, edit and Save it.

    pico /etc/bumblebee/bumblebee.conf

    Edit line 22 so it will be like this :
    Edit line 55 so it will be like this :

  14. Restart Bumblebee

    /etc/init.d/bumblebeed restart

  15. Run the next command to confirm that bumblebee is working

    optirun /opt/VirtualGL/bin/glxspheres64

    You should see the graphics after that, means that your bumblebee is working

  16. Now for the CUDA part, first we need to install some cuda library.

    apt-get install libcuda1

  17. And then install CUDA

    cd [directory-where-I-saved-cuda]
    chmod +x

    Read and Scroll to the bottom of the file with space-bar and (a)ccept the EULA
    Select (y)es to continue with an unsupported configuration
    Select (y)es. You do want the CUDA 5.5 Toolkit
    (Enter) for default location
    Select (y)es for CUDA 5.5 samples
    (Enter) for default location

    Wait till it finish, if there is a warning, ignore it.

    Take a note about LD_LIBRARY_PATH (I am using the 64bit path)

  18. Adding the library path to, so it will look like this, and Save it

    pico /etc/

    include /etc/*.conf

    Don’t forget to run this, after Save the file :

  19. Fix the nvidia-uvm module (it’s broken so we need to fix it). Remember as root!

    cd /usr/src/nvidia-current-331.67
    cp Module.symvers uvm/cd uvm/

    Be very careful with this :
    rm /lib/modules/3.14-kali1-amd64/updates/dkms/nvidia-uvm.ko

    This command should be in one line :
    cp /usr/src/nvidia-current-331.67/uvm/nvidia-uvm.ko /lib/modules/3.14-kali1-amd64/updates/dkms/

    If all the above went well, the next modprobe should working without error.
    modprobe nvidia-uvm

  20. Now to make CUDA Samples.

    cd ~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/

    Wait until it finish, it will take a while.

  21. And test it, and see if it works!

    cd 1_Utilities/deviceQuery
    optirun ./deviceQuery

    You should see this :
    Result = PASS!

For those who use kernel 3.14 (in my case Kali Linux 1.0.9a/Debian) and having trouble installing VMWare Workstation 10.xx, here’s the workaround :

  1. Download this patch
  2. Open Terminal and su/login as root
  3. And apply this

cd /usr/lib/vmware/modules/source/

cp vmnet.tar vmnet.tar.original

tar xvf vmnet.tar vmnet-only/filter.c

patch vmnet-only/filter.c < /location_of_patch/kernel-3.14-vmware-filter.c.diff

tar -uvf vmnet.tar vmnet-only/filter.c

rm -rf vmnet-only/

vmware-modconfig –console –install-all

Got my first error after upgrade to Ubuntu 13.10 (from 13.04) two days ago.

After a quite long search in google without any luck, this is what I do :

1. Run dconf-editor (via Dash | dconf-editor, or Terminal | type dconf-editor)
2. Click org
3. Click gnome
4. Click desktop
5. Click background
6. Click primary color
7. Click Set to Default
8. Click secondary color
9. Click Set to Default
10. Done

You will get your desktop, wallpaper and mouse right click again after that ;)

Ubuntu performance tweak

Posted: July 19, 2013 in Backtrack, Linux, Ubuntu

This is what you can do to increase your Ubuntu access speed and performance

1. Set swappiness to the allowed lowest value, usually the default value is 60

rumy@cbug-nest:~$ cat /proc/sys/vm/swappiness

2. Edit /proc/sys/vm/swappiness and change 60 to 10 (assuming RAM > 1 GB)

sudo pico /proc/sys/vm/swappiness
{change 60 to 10, save with [Ctrl] [O] [Enter], exit with [Ctrl] [X]}
cat /proc/sys/vm/swappiness

3. Edit /etc/sysctl.conf, and add vm.swappiness=10, vm.vfs_cache_pressure=50 to the end of file

sudo pico /etc/sysctl.conf
{move cursor to the end of file and then add this}

{Save with [Ctrl] [O] [Enter], exit with [Ctrl] [X]}

4. Reboot

Unable to install Nokuntu

Posted: April 10, 2013 in Linux, Ubuntu

If you are unable to install Nokuntu on Ubuntu, and got this error message :

unable to open file ‘/var/lib/dpkg/ : Is a directory

Assuming that the working directory is where the nokuntu deb file reside, do the following :

mkdir nokuntu
cd nokuntu
ar x ../nokuntusp*.deb
mkdir control
cd control
tar xzvf ../control.tar.gz
rm -rf usr
tar czvf control.tar.gz *
mv control.tar.gz ..
cd ..rm -rf control
ar -r ../nokuntusp-new.deb debian-binary control.tar.gz data.tar.gz
sudo dpkg -i ../nokuntusp-new.deb

After that all you have to do is install all the gambas dependencies