forked from MrMEEE/bumblebee-Old-and-abbandoned
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
365 lines (240 loc) · 9 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
prime-ng Documentation
Version v1.4.2
I have found a way to use the nvidia card in machines WITHOUT the optimus
mux...
There are still a few flaws... but in my regard they are few...
This has been testet succesful on:
Machine User
Alienware M11X R2 Martin Juhl
Asus N82Jv André Ventura
Acer EeePC 1215N Ellington Santos
Asus N61Jv (X64Jv) Ted
Acer Aspire 5745PG Miguel Belmonte
Dell Vostro 3300 Peter Liedler
First of all I have this running on my Alienware M11X R2, on Ubuntu Natty
11.04 64-bit.. And haven't tried it on any other configurations.. so I hope
you can report back, if it works on other laptops (it should) and other
distributions....
Up's:
We got nvidia acceleration on our Linux games and programs.. wine as well..
Down's:
//A few programs doesn't work.. this far I have only found Diablo 2.. which
//gives some weird double/single buffer error in wine...
This seems to be a Nvidia problem in general, and nothing to do with this
solution.. Diablo works with the -w parameter for window mode, and other
people with just an Nvidia card is reporting this problem as well..
Still not transparent switching like in Window$.. but a big step the right
way..
No acceleration from the Intel card.. so Nvidia 3D or none...
Vdpau doesn't seem to be working..
//Drains battery pretty fast...
Not as bad as I feared... got battery for 2+ hours...
Further Idea's:
Combine this with the acpi module hack, to get more battery time, when the
Nvidia card is not used.. auto-shutdown??
Maybe a seperate X-server for the Nvidia card is the way to go, so we can
shut that down as well when not used..
Try to get both the Intel and the Nvidia libraries installed at the same
time, so that 3D is enabled for both cards..
Here it goes:
First of all download the following:
General:
http://www.martin-juhl.dk/optimus/xorg.conf
32-bit deb-based:
http://www.martin-juhl.dk/optimus/turbojpeg_1.11.1_i386.deb
http://www.martin-juhl.dk/optimus/VirtualGL_2.2.1_i386.deb
64-bit deb-based:
http://www.martin-juhl.dk/optimus/turbojpeg_1.11.1_amd64.deb
http://www.martin-juhl.dk/optimus/VirtualGL_2.2.1_amd64.deb
32-bit rpm-based:
http://www.martin-juhl.dk/optimus/turbojpeg-1.11.i386.rpm
http://www.martin-juhl.dk/optimus/VirtualGL-2.2.1.i386.rpm
64-bit rpm-based:
http://www.martin-juhl.dk/optimus/turbojpeg-1.11.x86_64.rpm
http://www.martin-juhl.dk/optimus/VirtualGL-2.2.1.x86_64.rpm
Source:
http://www.martin-juhl.dk/optimus/turbojpeg-ipp-1.11.1.tar.gz
http://www.martin-juhl.dk/optimus/VirtualGL-2.2.1.tar.gz
Files can also be found here:
http://sourceforge.net/projects/virtualgl/files/
Ok... Installation:
Start by installing the nvidia driver:
sudo aptitude install nvidia-current (ubuntu)
then put the xorg.conf in /etc/X11/
It might be necessary to change the “ConnectedMonitor” under the Nvidia-device section and BUSID’s for the Intel and Nvidia Card..
Here is what I got this far:
Laptop Intel BusID Nvidia BusID ConnectedMonitor
Alienware M11X PCI:0:2:0 PCI:1:0:0 CRT-0
Dell XPS 15 PCI:0:2:0 PCI:2:0:0 CRT-0
Asus N61Jv (X64Jv) PCI:0:2:0 PCI:1:0:0 CRT-0
Acer EeePC 1215N PCI:0:2:0 PCI:4:0:0 DFP-0
Acer Aspire 5745PG PCI:0:2:0 PCI:1:0:0 DFP-0
Dell Vostro 3300 PCI:0:2:0 PCI:1:0:0 DFP-0
after that, install the two files you downloaded above:
sudo dpkg -i VirtualGL* (deb)
or
sudo rpm -ihv VirtualGL* (rpm)
Note:
Turbojpeg or libjpeg-turbo is not needed, and actually gives a lower performance.. I left the links if you want to experiment..
Performance Tests can be found at the end...
Now run:
sudo vglserver_config
answer as below:
1) Configure server for use with VirtualGL in GLX mode
2) Unconfigure server for use with VirtualGL in GLX mode
X) Exit
Choose:
1
Restrict 3D X server access to vglusers group (recommended)?
[Y/n]
n
Restrict framebuffer device access to vglusers group (recommended)?
[Y/n]
n
Disable XTEST extension (recommended)?
[Y/n]
y
... Creating /etc/modprobe.d/virtualgl.conf to set requested permissions for
/dev/nvidia* ...
... Attempting to remove nvidia module from memory so device permissions
will be reloaded ...
ERROR: Module nvidia is in use
... Granting write permission to /dev/nvidia0 /dev/nvidiactl for all users
...
... Modifying /etc/X11/xorg.conf to enable DRI permissions for
all users ...
... Adding xhost +LOCAL: to /etc/kde4/kdm/Xsetup script ...
... Disabling XTEST extension in /etc/kde4/kdm/kdmrc ...
Done. You must restart the display manager for the changes to take effect.
IMPORTANT NOTE: Your system uses modprobe.d to set device permissions. You
must execute rmmod nvidia with the display manager stopped in order for the
new device permission settings to become effective.
1) Configure server for use with VirtualGL in GLX mode
2) Unconfigure server for use with VirtualGL in GLX mode
X) Exit
Choose:
x
Then:
append the following two lines to /etc/profile or to your ~/.bashrc if that
exists..
VGL_DISPLAY=:0.1
export VGL_DISPLAY
VGL_COMPRESS=jpeg
export VGL_COMPRESS
VGL_READBACK=fbo
export VGL_READBACK
Now you need to make sure that your Desktop Enviroment runs the following
command after starting up..
vglclient localhost &
In KDE this is archived by creating:
~/.kde/share/autostart/vglclient.desktop (you might need to create the
autostart folder as well):
[Desktop Entry]
Comment[da]=
Comment=
Exec=vglclient localhost &
GenericName=
Icon=exec
MimeType=
Name=vglclient
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
X-Ubuntu-Gettext-Domain=desktop_kdebase
and reboot...
Hopefully your computer comes back up..
now you should be able to start applications with:
vglrun <application>
and the nvidia card will be used for acceleration..
btw. <application> needs to contain the full path to the application if not
in the path...
It is still the Intel card running the rest.. and for now I haven't found a
way to activate acceleration for both cards.. so no fancy compiz effects..
but thats no problem for me, as long as I can use my nvidia card for gaming
:D...
Hope this will help someone..
Nvidia Always on in Gnome or KDE:
This is experimental.. might be unforeseen problems:
KDE:
Create: /usr/share/xsessions/kde-plasma-vgl.desktop:
[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/usr/bin/startkde-vgl
TryExec=/usr/bin/startkde-vgl
Name=KDE Plasma Workspace Nvidia Accelerated
Comment=The desktop made by KDE
Create: /usr/bin/startkde-vgl:
#!/bin/bash
/usr/bin/vglrun -d :0.1 /usr/bin/startkde
and run:
chmod +x /usr/bin/startkde-vgl
Gnome:
Create: /usr/share/xsessions/gnome-vgl.desktop:
[Desktop Entry]
Type=XSession
Exec=/usr/bin/gnome-session-vgl
TryExec=/usr/bin/gnome-session-vgl
Name=GNOME Nvidia Accelerated
Comment=The GNU Network Object Model Environment. A complete, free and
easy-to-use desktop environment
X-Ubuntu-Gettext-Domain=desktop_kdebase-workspace
Create: /usr/bin/gnome-session-vgl:
#!/bin/bash
/usr/bin/vglrun -d :0.1 /usr/bin/gnome-session
and run:
chmod +x /usr/bin/gnome-session-vgl
The Accelerated sessions should now be available in gdm or kdm..
KDE or Gnome doesn't work with Desktop Effects, but everything else seems to work.. (applications are automatically started with the Nvidia card)
Performance:
I'm using glxgears and getting:
~ 1700 fps with libjpeg-turbo
7362 frames in 5.0 seconds = 1472.247 FPS
6651 frames in 5.0 seconds = 1330.055 FPS
6507 frames in 5.0 seconds = 1301.198 FPS
9399 frames in 5.0 seconds = 1879.629 FPS
9519 frames in 5.0 seconds = 1903.788 FPS
8857 frames in 5.0 seconds = 1771.247 FPS
9524 frames in 5.0 seconds = 1904.607 FPS
8545 frames in 5.0 seconds = 1708.921 FPS
9485 frames in 5.0 seconds = 1896.910 FPS
9495 frames in 5.0 seconds = 1898.814 FPS
~ 1600 fps with turbojpeg
6580 frames in 5.0 seconds = 1315.794 FPS
7177 frames in 5.0 seconds = 1435.397 FPS
9346 frames in 5.0 seconds = 1869.135 FPS
8206 frames in 5.0 seconds = 1641.097 FPS
6429 frames in 5.0 seconds = 1285.784 FPS
7006 frames in 5.0 seconds = 1401.094 FPS
6229 frames in 5.0 seconds = 1245.770 FPS
7559 frames in 5.0 seconds = 1511.768 FPS
8541 frames in 5.0 seconds = 1708.090 FPS
8503 frames in 5.0 seconds = 1700.564 FPS
8501 frames in 5.0 seconds = 1700.139 FPS
8540 frames in 5.0 seconds = 1707.930 FPS
~ 1900 fps with none of them installed
7621 frames in 5.0 seconds = 1524.158 FPS
9526 frames in 5.0 seconds = 1905.055 FPS
9504 frames in 5.0 seconds = 1900.725 FPS
9487 frames in 5.0 seconds = 1897.317 FPS
9419 frames in 5.0 seconds = 1883.613 FPS
8754 frames in 5.0 seconds = 1750.718 FPS
9435 frames in 5.0 seconds = 1886.882 FPS
9400 frames in 5.0 seconds = 1879.999 FPS
9408 frames in 5.0 seconds = 1881.523 FPS
~ 1600 fps with xuv
7888 frames in 5.0 seconds = 1577.544 FPS
7906 frames in 5.0 seconds = 1581.168 FPS
7963 frames in 5.0 seconds = 1592.556 FPS
8090 frames in 5.0 seconds = 1617.894 FPS
8122 frames in 5.0 seconds = 1624.336 FPS
8204 frames in 5.0 seconds = 1640.684 FPS
8377 frames in 5.0 seconds = 1675.184 FPS
8288 frames in 5.0 seconds = 1657.548 FPS
8399 frames in 5.0 seconds = 1679.671 FPS