I tried to install the bumblebee on BT5 running these commands but I had problems:

Code:
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee
and I got this error:

Code:
Reading package lists... Done
Building dependency tree

Reading state information... Done
The following packages were automatically installed and are no longer required:
libecryptfs0 libdmraid1.0.0.rc16 libdebconfclient0 ecryptfs-utils cryptsetup
rdate bogl-bterm libdebian-installer4 reiserfsprogs dmraid python-pyicu
keyutils
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
acpid dkms linux-headers linux-headers-2.6.39.4 nvidia-current
nvidia-settings virtualgl
The following NEW packages will be installed:
acpid bumblebee dkms linux-headers linux-headers-2.6.39.4 nvidia-current
nvidia-settings virtualgl
0 upgraded, 8 newly installed, 0 to remove and 57 not upgraded.
Need to get 50.6MB of archives.
After this operation, 194MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ppa.launchpad.net/bumblebee/stable/ubuntu/ lucid/main virtualgl 2.2.90-1~lucidppa7 [1,566kB]
Get:2 http://all.repository.backtrack-linux.org/ revolution/main dkms 2.1.1.2-2fakesync1 [70.1kB]
Get:3 http://all.repository.backtrack-linux.org/ revolution/microverse linux-headers 1.1-bt3 [896B]
Get:4 http://64.repository.backtrack-linux.org/ revolution/main acpid 1.0.10-5ubuntu2.1 [50.5kB]
Get:5 http://64.repository.backtrack-linux.org/ revolution/microverse linux-headers-2.6.39.4 2.6.39.4-10.00.Custom [7,274kB]
Get:6 http://ppa.launchpad.net/bumblebee/stable/ubuntu/ lucid/main bumblebee 2.4.1-1~lucidppa1 [21.8kB]
Get:7 http://64.repository.backtrack-linux.org/ revolution/main nvidia-current 195.36.24-0ubuntu1~10.04 [40.8MB]
Get:8 http://64.repository.backtrack-linux.org/ revolution/main nvidia-settings 195.36.08-0ubuntu2 [841kB]
Fetched 50.6MB in 11min 48s (71.5kB/s)

Selecting previously deselected package acpid.
(Reading database ... 202759 files and directories currently installed.)
Unpacking acpid (from .../acpid_1.0.10-5ubuntu2.1_amd64.deb) ...
Selecting previously deselected package virtualgl.
Unpacking virtualgl (from .../virtualgl_2.2.90-1~lucidppa7_amd64.deb) ...
Selecting previously deselected package dkms.
Unpacking dkms (from .../dkms_2.1.1.2-2fakesync1_all.deb) ...
Selecting previously deselected package linux-headers-2.6.39.4.
Unpacking linux-headers-2.6.39.4 (from .../linux-headers-2.6.39.4_2.6.39.4-10.00.Custom_amd64.deb) ...
Selecting previously deselected package linux-headers.
Unpacking linux-headers (from .../linux-headers_1.1-bt3_all.deb) ...
Selecting previously deselected package nvidia-current.
Unpacking nvidia-current (from .../nvidia-current_195.36.24-0ubuntu1~10.04_amd64.deb) ...
Selecting previously deselected package bumblebee.
Unpacking bumblebee (from .../bumblebee_2.4.1-1~lucidppa1_amd64.deb) ...
Selecting previously deselected package nvidia-settings.
Unpacking nvidia-settings (from .../nvidia-settings_195.36.08-0ubuntu2_amd64.deb) ...
Processing triggers for python-central ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up acpid (1.0.10-5ubuntu2.1) ...
acpid start/running, process 4709

Setting up virtualgl (2.2.90-1~lucidppa7) ...

Setting up dkms (2.1.1.2-2fakesync1) ...

Setting up linux-headers-2.6.39.4 (2.6.39.4-10.00.Custom) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 2.6.39.4 /boot/vmlinuz-2.6.39.4

Setting up linux-headers (1.1-bt3) ...
Setting up nvidia-current (195.36.24-0ubuntu1~10.04) ...
update-alternatives: using /usr/lib/nvidia-current/ld.so.conf to provide /etc/ld.so.conf.d/GL.conf (gl_conf) in auto mode.
update-initramfs: deferring update (trigger activated)
Loading new nvidia-current-195.36.24 DKMS files...
First Installation: checking all kernels...
Building only for 2.6.38
Building for architecture x86_64
Building initial module for 2.6.38

Error! Bad return status for module build on kernel: 2.6.38 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/nvidia-current/195.36.24/build/ for more information.
dpkg: error processing nvidia-current (--configure):
subprocess installed post-installation script returned error exit status 10
dpkg: dependency problems prevent configuration of bumblebee:
bumblebee depends on nvidia-current; however:
Package nvidia-current is not configured yet.
dpkg: error processing bumblebee (--configure):
dependency problems - leaving unconfigured
Setting up nvidia-settings (195.36.08-0ubuntu2) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.38
Processing triggers for python-support ...
Errors were encountered while processing:
nvidia-current
bumblebee
E: Sub-process /usr/bin/dpkg returned an error code (1)
I try to update all by:

Code:
sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get upgrade
But I have the same error:

Code:
Error! Bad return status for module build on kernel: 2.6.38 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/nvidia-current/195.36.24/build/ for more information.
dpkg: error processing nvidia-current (--configure):
subprocess installed post-installation script returned error exit status 10
dpkg: dependency problems prevent configuration of bumblebee:
bumblebee depends on nvidia-current; however:
Package nvidia-current is not configured yet.
dpkg: error processing bumblebee (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.38
Processing triggers for python-support ...
Errors were encountered while processing:
nvidia-current
bumblebee
E: Sub-process /usr/bin/dpkg returned an error code (1)
Just for a test, I tring to install with "traditional" installer:

https://github.com/Bumblebee-Project/Bumblebee/

Code:
apt-get update
apt-get install nvidia-current
tar -xzf MrMEEE-bumblebee-6629f3a.tar.gz
cd MrMEEE-bumblebee-6629f3a
sudo ./install
sudo usermod -a -G bumblebee root
and it seems it work:

Code:
root@bt:glxgears
4800 frames in 5.0 seconds
4818 frames in 5.0 seconds
4691 frames in 5.0 seconds
4693 frames in 5.0 seconds
but when I try to use optirun

Code:
root@bt:optirun glxgears
The Bumblebee X server was not available, please check the
Bumblebee logfile at /var/log/bumblebee.log
==================================================
This is the log:

Code:
[   1479.90] Bumblebee log started at Tue, 15 Nov 2011 20:25:04 +0100
[   1479.92] Creating fifo /var/run/bumblebee.fifo for communication...
[   1479.93] Making FIFO writable for members of group bumblebee
[   1479.95] Power management is disabled, not disabling card on start.
[   1479.96] Waiting for orders
[   1541.85] Optirun start request received.
[   1541.86] Checking for X server availability before starting X...
[   1541.87] X server is not started
[   1541.88] Power management is disabled, only loading driver
[   1541.94] Driver 'nvidia' has no matching kernel module installed
[   1541.96] The driver failed to load.
[   1541.97] Waiting for orders
Anyone help me?