While scripts tested on GNU/Linux Gentoo amd64, Debian Squeeze/Wheezy amd64, Ubuntu 12.04 LTS x86_64, Fedora 16 (Verne) x86_64. Now I begin to test the project on Slackware GNU/Linux, Arch, etc.
You need either bbswitch, acpi_call or vgaswitheroo support (Linux >=2.6.34). Also the packages may be available in your distro repositories.
Also you need a dmidecode program installed from Your distro repositories.
Before installation turn on all Video chips in BIOS.
echo "x11-drivers/snail ~amd64" >> /etc/portage/package.keywords emerge snail
echo "=x11-drivers/snail-9999 **" >> /etc/portage/package.keywords emerge snail
sudo mkdir -p /usr/local/portage/x11-drivers/snail sudo cp snail-1.0.0.ebuild /usr/local/portage/x11-drivers/snail sudo ebuild /usr/local/portage/x11-drivers/snail/snail-1.0.0.ebuild manifest sudo eselect rc stop xdm # stop X server sudo emerge snail sudo eselect rc start xdm # restart X server
sudo /etc/init.d/gdm3 stop
sudo apt-get purge nvidia* sudo nvidia-uninstall
sudo apt-get install git dmidecode linux-headers-`uname -r` make gcc sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core xserver-xorg-video-intel
git clone --depth 1 git://github.com/Bumblebee-Project/bbswitch.git cd bbswitch make sudo cp bbswitch.ko /lib/modules/`uname -r`/kernel/drivers/acpi sudo depmod -a sudo modprobe bbswitch
git clone --depth 1 http://github.com/avilella/acpi_call cd acpi_call make sudo cp acpi_call.ko /lib/modules/`uname -r`/kernel/drivers/acpi sudo depmod -a sudo modprobe acpi_call
git clone --depth=1 git://git.backbone.ws/snail/snail.git cd snail sudo make install
deb http://mirror.yandex.ru/debian wheezy main contrib non-freeand run
sudo apt-get install nvidia-kernel-dkmsFor Debian Squeeze you need to download latest nVidia driver from nvidia.com because 195.x version of the nVidia drivers in repos doesn't support hybrid graphics cards.
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/295.33/NVIDIA-Linux-x86_64-295.33.run # Important: switch on nVidia chip otherwise NVIDIA-installer fails. sudo snail.nv_pwr_on # Then run NVIDIA-installer and set appropriate Gcc compiler. sudo CC=/usr/bin/gcc-4.3 ./NVIDIA-Linux-x86_64-295.33.run
sudo apt-get install ia32-libs
sudo apt-get install libgl1-nvidia-glx-ia32
sudo snail.configure
sudo /etc/init.d/gdm3 start
sudo /etc/init.d/lightdm stop
sudo apt-get install git dmidecode linux-headers-`uname -r` make gcc nvidia-current sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core xserver-xorg-video-intel
git clone --depth 1 git://github.com/Bumblebee-Project/bbswitch.git cd bbswitch make sudo cp bbswitch.ko /lib/modules/`uname -r`/kernel/drivers/acpi sudo depmod -a sudo modprobe bbswitch
git clone --depth 1 http://github.com/avilella/acpi_call cd acpi_call make sudo cp acpi_call.ko /lib/modules/`uname -r`/kernel/drivers/acpi sudo depmod -a sudo modprobe acpi_call
git clone --depth=1 git://git.backbone.ws/snail/snail.git cd snail sudo make install
sudo apt-get install ia32-libs
sudo snail.configure
sudo /etc/init.d/lightdm start
sudo systemctl stop prefdm.service
sudo yum install git dmidecode kernel-devel gcc
ls -l /lib/modules/`uname -r`/{build,source}
git clone --depth 1 git://github.com/Bumblebee-Project/bbswitch.git cd bbswitch make sudo cp bbswitch.ko /lib/modules/`uname -r`/kernel/drivers/acpi sudo depmod -a sudo modprobe bbswitch
git clone --depth 1 http://github.com/avilella/acpi_call cd acpi_call make sudo cp acpi_call.ko /lib/modules/`uname -r`/kernel/drivers/acpi sudo depmod -a sudo modprobe acpi_call
git clone --depth=1 git://git.backbone.ws/snail/snail.git cd snail sudo make install
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
yum install akmod-nvidia xorg-x11-drv-nvidia-libs
sudo snail.configure
sudo systemctl start prefdm.service
Pull changes to your local Git repository and reinstall.
cd snail git pull sudo make install # Stop X-server sudo /etc/init.d/gdm3 stop # Debian sudo /etc/init.d/lightdm stop # Ubuntu sudo systemctl stop prefdm.service # Fedora sudo snail.configure # Start X-server sudo /etc/init.d/gdm3 start # Debian sudo /etc/init.d/lightdm start # Ubuntu sudo systemctl start prefdm.service # Fedora
Change dir to snail repo and uninstall it.
cd snail sudo make uninstall
For the best energy saving it is recommended to add kernel boot parameters to the Grub/Lilo menu.lst. Example:
kernel /boot/vmlinuz-... root=/dev/sda... i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1
To run application add the user to the video group.
gpasswd -a user video
nvrun application
It is a little old video where graphics are switched manually. Now all is automatic. {{video(https://youtu.be/c6RH69j-gMY)}}