Project

General

Profile

Wiki » History » Version 114

Kolan Sh, 03/25/2016 12:51 AM

1 110
h1. Requirements
2
3
!>snail.png!
4
5
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.
6
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.
7
Also you need a "dmidecode":http://www.nongnu.org/dmidecode program installed from Your distro repositories.
8
9
h1. Installation
10
11
Before installation turn on all Video chips in BIOS.
12
13
h2. Installation on Gentoo amd64 GNU/Linux
14
15
* Wiki to the installation using layman.
16
Install backbone's overlay using one of the wiki's:
17
https://github.com/backbone/overlay/wiki
18
https://git.backbone.ws/portage/pages/Home
19
emerge latest stable snail-X.Y.Z
20
<pre>echo "x11-drivers/snail ~amd64" >> /etc/portage/package.keywords
21
emerge snail</pre>
22
or Git snail-9999 version.
23
<pre>echo "=x11-drivers/snail-9999 **" >> /etc/portage/package.keywords
24
emerge snail</pre>
25
26
* Manual installation
27
Download an ebuild file from repository to your local overlay, create Manifest and install it.
28
Example: <pre>sudo mkdir -p /usr/local/portage/x11-drivers/snail
29
sudo cp snail-1.0.0.ebuild /usr/local/portage/x11-drivers/snail
30
sudo ebuild /usr/local/portage/x11-drivers/snail/snail-1.0.0.ebuild manifest
31
sudo eselect rc stop xdm # stop X server
32
33
sudo emerge snail
34
35
sudo eselect rc start xdm # restart X server</pre>
36
37
h2. Installation on Debian Squeeze/Wheezy amd64 GNU/Linux
38
39
# Stop Gdm (KDM or what you use)<pre>sudo /etc/init.d/gdm3 stop</pre>
40
# Uninstall all nVidia packages and files installed by NVIDIA-installer*<pre>sudo apt-get purge nvidia*
41
sudo nvidia-uninstall</pre>
42
# Install Git, dmidecode, Linux kernel headers, Make, Gcc and OpenGL libraries.<pre>sudo apt-get install git dmidecode linux-headers-`uname -r` make gcc
43
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core xserver-xorg-video-intel</pre>
44
# Install bbswitch (preferable) or acpi_call.
45
## *bbswitch*.<pre>git clone --depth 1 git://github.com/Bumblebee-Project/bbswitch.git
46
cd bbswitch
47
make
48
sudo cp bbswitch.ko /lib/modules/`uname -r`/kernel/drivers/acpi
49
sudo depmod -a
50
sudo modprobe bbswitch</pre>
51
## *acpi_call*.<pre>git clone --depth 1 http://github.com/avilella/acpi_call
52
cd acpi_call
53
make
54
sudo cp acpi_call.ko /lib/modules/`uname -r`/kernel/drivers/acpi
55
sudo depmod -a
56
sudo modprobe acpi_call</pre>
57
# Install Snail<pre>git clone --depth=1 git://git.backbone.ws/snail/snail.git
58
cd snail
59
sudo make install</pre>
60
# 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
61
# Important: switch on nVidia chip otherwise NVIDIA-installer fails.
62
sudo snail.nv_pwr_on
63
# Then run NVIDIA-installer and set appropriate Gcc compiler.
64
sudo CC=/usr/bin/gcc-4.3 ./NVIDIA-Linux-x86_64-295.33.run</pre>
65
# For multilib support you must install 32-bi libraries.
66
For Squeeze <pre>sudo apt-get install ia32-libs</pre>
67
For Wheezy <pre>sudo apt-get install libgl1-nvidia-glx-ia32</pre>
68
# Configure Snail.<pre>sudo snail.configure</pre>
69
# Start Gdm (KDM or what you use)<pre>sudo /etc/init.d/gdm3 start</pre>
70
71
h2. Installation on Ubuntu 12.04 LTS amd64 GNU/Linux
72
73
# Stop Gdm (KDM or what you use)<pre>sudo /etc/init.d/lightdm stop</pre>
74
# 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
75
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core xserver-xorg-video-intel</pre>
76
# Install bbswitch (preferable) or acpi_call.
77
## *bbswitch*.<pre>git clone --depth 1 git://github.com/Bumblebee-Project/bbswitch.git
78
cd bbswitch
79
make
80
sudo cp bbswitch.ko /lib/modules/`uname -r`/kernel/drivers/acpi
81
sudo depmod -a
82
sudo modprobe bbswitch</pre>
83
## *acpi_call*.<pre>git clone --depth 1 http://github.com/avilella/acpi_call
84
cd acpi_call
85
make
86
sudo cp acpi_call.ko /lib/modules/`uname -r`/kernel/drivers/acpi
87
sudo depmod -a
88
sudo modprobe acpi_call</pre>
89
# Install Snail<pre>git clone --depth=1 git://git.backbone.ws/snail/snail.git
90
cd snail
91
sudo make install</pre>
92
# For multilib support you must install 32-bi libraries.
93
<pre>sudo apt-get install ia32-libs</pre>
94
# Configure Snail.<pre>sudo snail.configure</pre>
95
# Start Gdm (KDM or what you use)<pre>sudo /etc/init.d/lightdm start</pre>
96
97
h2. Installation on Fedora 16 (Verne) x86_64
98
99
# Stop Gdm (KDM or what you use)<pre>sudo systemctl stop prefdm.service</pre>
100
# Install Git, dmidecode, Linux kernel headers, Gcc and OpenGL libraries.<pre>sudo yum install git dmidecode kernel-devel gcc</pre>
101
# 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>
102
# Install bbswitch (preferable) or acpi_call.
103
## *bbswitch*.<pre>git clone --depth 1 git://github.com/Bumblebee-Project/bbswitch.git
104
cd bbswitch
105
make
106
sudo cp bbswitch.ko /lib/modules/`uname -r`/kernel/drivers/acpi
107
sudo depmod -a
108
sudo modprobe bbswitch</pre>
109
## *acpi_call*.<pre>git clone --depth 1 http://github.com/avilella/acpi_call
110
cd acpi_call
111
make
112
sudo cp acpi_call.ko /lib/modules/`uname -r`/kernel/drivers/acpi
113
sudo depmod -a
114
sudo modprobe acpi_call</pre>
115
# Install Snail<pre>git clone --depth=1 git://git.backbone.ws/snail/snail.git
116
cd snail
117
sudo make install</pre>
118
# Add RPMFusion Repositories (Free and Non-Free)<pre>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm 
119
rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm</pre>
120
# Install nVidia proprietary drivers<pre>yum install akmod-nvidia xorg-x11-drv-nvidia-libs</pre>
121
# Configure Snail.<pre>sudo snail.configure</pre>
122
# Start Gdm (KDM or what you use)<pre>sudo systemctl start prefdm.service</pre>
123
124
h1. Upgrade
125
126
Pull changes to your local Git repository and reinstall.
127
<pre>
128
cd snail
129
git pull
130
131
sudo make install
132
133
# Stop X-server
134
sudo /etc/init.d/gdm3 stop # Debian
135
sudo /etc/init.d/lightdm stop # Ubuntu
136
sudo systemctl stop prefdm.service # Fedora
137
138
sudo snail.configure
139
140
# Start X-server
141
sudo /etc/init.d/gdm3 start # Debian
142
sudo /etc/init.d/lightdm start # Ubuntu
143
sudo systemctl start prefdm.service # Fedora
144
</pre>
145
146
h1. Uninstall
147
148
Change dir to snail repo and uninstall it.
149
<pre>
150
cd snail
151
sudo make uninstall
152
</pre>
153
154
h1. Powersave
155
156
For the best energy saving it is recommended to add kernel boot parameters to the Grub/Lilo menu.lst. Example:
157
<pre>
158
kernel /boot/vmlinuz-... root=/dev/sda... i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1
159
</pre>
160
161
h1. Run
162
163
To run application add the user to the _video_ group.
164
<pre>
165
gpasswd -a user video
166
</pre>
167
If the user was not in the video group your must relogin.
168
To run any application on nVidia chip type in the command line or add to the link on the desktop command:
169
<pre>
170
nvrun application
171
</pre>
172
173
h1. Video
174
175
It is a little old video where graphics are switched manually. Now all is automatic.
176 114 Kolan Sh
{{video(https://youtu.be/c6RH69j-gMY)}}