Project

General

Profile

Wiki » History » Revision 113

Revision 112 (Kolan Sh, 05/08/2014 04:01 PM) → Revision 113/114 (Kolan Sh, 05/08/2014 04:04 PM)

h1. Requirements 

 !>snail.png! 

 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":https://github.com/Bumblebee-Project/bbswitch, "acpi_call":http://github.com/avilella/acpi_call or _vgaswitheroo_ support (Linux >=2.6.34). Also the packages may be available in your distro repositories. 
 Also you need a "dmidecode":http://www.nongnu.org/dmidecode program installed from Your distro repositories. 

 h1. Installation 

 Before installation turn on all Video chips in BIOS. 

 h2. Installation on Gentoo amd64 GNU/Linux 

 * Wiki to the installation using layman. 
 Install backbone's overlay using one of the wiki's: 
 https://github.com/backbone/overlay/wiki 
 https://git.backbone.ws/portage/pages/Home 
 emerge latest stable snail-X.Y.Z 
 <pre>echo "x11-drivers/snail ~amd64" >> /etc/portage/package.keywords 
 emerge snail</pre> 
 or Git snail-9999 version. 
 <pre>echo "=x11-drivers/snail-9999 **" >> /etc/portage/package.keywords 
 emerge snail</pre> 

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

 h2. Installation on Debian Squeeze/Wheezy amd64 GNU/Linux 

 # Stop Gdm (KDM or what you use)<pre>sudo /etc/init.d/gdm3 stop</pre> 
 # Uninstall all nVidia packages and files installed by NVIDIA-installer*<pre>sudo apt-get purge nvidia* 
 sudo nvidia-uninstall</pre> 
 # Install Git, dmidecode, Linux kernel headers, Make, Gcc and OpenGL libraries.<pre>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</pre> 
 # Install bbswitch (preferable) or acpi_call. 
 ## *bbswitch*.<pre>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</pre> 
 ## *acpi_call*.<pre>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</pre> 
 # Install Snail<pre>git clone --depth=1 git://git.backbone.ws/snail/snail.git 
 cd snail 
 sudo make install</pre> 
 # For Debian Wheezy it is enough to add 'contrib non-free' flags to /etc/apt-sources.lst, for example <pre>deb http://mirror.yandex.ru/debian wheezy main contrib non-free</pre> and run <pre>sudo apt-get install nvidia-kernel-dkms</pre>For Debian Squeeze you need to download latest nVidia driver from "nvidia.com":http://www.geforce.com/Drivers because 195.x version of the nVidia drivers in repos doesn't support hybrid graphics cards.<pre>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</pre> 
 # For multilib support you must install 32-bi libraries. 
 For Squeeze <pre>sudo apt-get install ia32-libs</pre> 
 For Wheezy <pre>sudo apt-get install libgl1-nvidia-glx-ia32</pre> 
 # Configure Snail.<pre>sudo snail.configure</pre> 
 # Start Gdm (KDM or what you use)<pre>sudo /etc/init.d/gdm3 start</pre> 

 h2. Installation on Ubuntu 12.04 LTS amd64 GNU/Linux 

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

 h2. Installation on Fedora 16 (Verne) x86_64 

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

 h1. Upgrade 

 Pull changes to your local Git repository and reinstall. 
 <pre> 
 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 
 </pre> 

 h1. Uninstall 

 Change dir to snail repo and uninstall it. 
 <pre> 
 cd snail 
 sudo make uninstall 
 </pre> 

 h1. Powersave 

 For the best energy saving it is recommended to add kernel boot parameters to the Grub/Lilo menu.lst. Example: 
 <pre> 
 kernel /boot/vmlinuz-... root=/dev/sda... i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 
 </pre> 

 h1. Run 

 To run application add the user to the _video_ group. 
 <pre> 
 gpasswd -a user video 
 </pre> 
 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: 
 <pre> 
 nvrun application 
 </pre> 

 h1. Video 

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