Project

General

Profile

Actions

Requirements

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.

Installation

Before installation turn on all Video chips in BIOS.

Installation on Gentoo amd64 GNU/Linux

  • Manual installation
    Download an ebuild file from repository to your local overlay, create Manifest and install it.
    Example:
    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

Installation on Debian Squeeze/Wheezy amd64 GNU/Linux

  1. Stop Gdm (KDM or what you use)
    sudo /etc/init.d/gdm3 stop
  2. Uninstall all nVidia packages and files installed by NVIDIA-installer*
    sudo apt-get purge nvidia*
    sudo nvidia-uninstall
  3. Install Git, dmidecode, Linux kernel headers, Make, Gcc and OpenGL libraries.
    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
  4. Install bbswitch (preferable) or acpi_call.
    1. bbswitch.
      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
    2. acpi_call.
      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
  5. Install Snail
    git clone --depth=1 git://git.backbone.ws/snail/snail.git
    cd snail
    sudo make install
  6. For Debian Wheezy it is enough to add 'contrib non-free' flags to /etc/apt-sources.lst, for example
    deb http://mirror.yandex.ru/debian wheezy main contrib non-free
    and run
    sudo apt-get install nvidia-kernel-dkms
    For 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
  7. For multilib support you must install 32-bi libraries.
    For Squeeze
    sudo apt-get install ia32-libs

    For Wheezy
    sudo apt-get install libgl1-nvidia-glx-ia32
  8. Configure Snail.
    sudo snail.configure
  9. Start Gdm (KDM or what you use)
    sudo /etc/init.d/gdm3 start

Installation on Ubuntu 12.04 LTS amd64 GNU/Linux

  1. Stop Gdm (KDM or what you use)
    sudo /etc/init.d/lightdm stop
  2. Install Git, dmidecode, Linux kernel headers, Make, Gcc, nVidia and OpenGL libraries.
    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
  3. Install bbswitch (preferable) or acpi_call.
    1. bbswitch.
      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
    2. acpi_call.
      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
  4. Install Snail
    git clone --depth=1 git://git.backbone.ws/snail/snail.git
    cd snail
    sudo make install
  5. For multilib support you must install 32-bi libraries.
    sudo apt-get install ia32-libs
  6. Configure Snail.
    sudo snail.configure
  7. Start Gdm (KDM or what you use)
    sudo /etc/init.d/lightdm start

Installation on Fedora 16 (Verne) x86_64

  1. Stop Gdm (KDM or what you use)
    sudo systemctl stop prefdm.service
  2. Install Git, dmidecode, Linux kernel headers, Gcc and OpenGL libraries.
    sudo yum install git dmidecode kernel-devel gcc
  3. Check that /lib/modules/`uname -r`/{build,source} symlinks not broken and point to /usr/src/kernels/appropriate_kernel_sources
    ls -l /lib/modules/`uname -r`/{build,source}
  4. Install bbswitch (preferable) or acpi_call.
    1. bbswitch.
      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
    2. acpi_call.
      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
  5. Install Snail
    git clone --depth=1 git://git.backbone.ws/snail/snail.git
    cd snail
    sudo make install
  6. Add RPMFusion Repositories (Free and Non-Free)
    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
  7. Install nVidia proprietary drivers
    yum install akmod-nvidia xorg-x11-drv-nvidia-libs
  8. Configure Snail.
    sudo snail.configure
  9. Start Gdm (KDM or what you use)
    sudo systemctl start prefdm.service

Upgrade

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

Uninstall

Change dir to snail repo and uninstall it.

cd snail
sudo make uninstall

Powersave

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

Run

To run application add the user to the video group.

gpasswd -a user video

If the user was not in the video group your must relogin.
To run any application on nVidia chip type in the command line or add to the link on the desktop command:
nvrun application

Video

It is a little old video where graphics are switched manually. Now all is automatic. {{video(https://youtu.be/c6RH69j-gMY)}}

Updated by Kolan Sh over 8 years ago ยท 114 revisions

Also available in: PDF HTML TXT