... | ... |
@@ -516,14 +516,6 @@ function fgfs () { |
516 | 516 |
|
517 | 517 |
ld_library_path |
518 | 518 |
|
519 |
- ( |
|
520 |
- nmcli radio all off |
|
521 |
- while test $(lsmod | grep -c nvidia) -eq 0; do |
|
522 |
- : |
|
523 |
- done |
|
524 |
- nmcli radio wifi on |
|
525 |
- )& |
|
526 |
- |
|
527 | 519 |
fgfsrc=$HOME/.fgfs/fgfsrc |
528 | 520 |
echo ${fgfs_args[@]//$HOME/\$HOME} $(test -r $fgfsrc && egrep -v '^\s*(#|$)' $fgfsrc | tr '\n' ' ') |
529 | 521 |
# TODO: ne lancer avec primusrun que si c'est nécesaire, d'autres solution existent ? |
... | ... |
@@ -0,0 +1,34 @@ |
1 |
+#!/bin/bash |
|
2 |
+ |
|
3 |
+# horrible pansement pour permettre à bumblebee de fonctionner |
|
4 |
+# ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=963980 |
|
5 |
+ |
|
6 |
+# PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/sbin:/usr/sbin |
|
7 |
+# $0 : /usr/local/bin/primusrun |
|
8 |
+ |
|
9 |
+if dpkg -l primus > /dev/null 2>&1; then |
|
10 |
+ eval "$(egrep '^\s*(export +)?[A-Za-z_]+=' /usr/bin/primusrun)" |
|
11 |
+# autres variables (cf. /usr/bin/primusrun): |
|
12 |
+# export PRIMUS_SYNC=${PRIMUS_SYNC:-0} |
|
13 |
+# export PRIMUS_VERBOSE=${PRIMUS_VERBOSE:-1} |
|
14 |
+# export PRIMUS_UPLOAD=${PRIMUS_UPLOAD:-0} |
|
15 |
+# export PRIMUS_SLEEP=${PRIMUS_SLEEP:-90} |
|
16 |
+# export PRIMUS_DISPLAY=${PRIMUS_DISPLAY:-:8} |
|
17 |
+# export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/$LIB/nvidia/libGL.so.1'} |
|
18 |
+# export PRIMUS_libGLd=${PRIMUS_libGLd:-'/usr/$LIB/libGL.so.1'} |
|
19 |
+ ( |
|
20 |
+ path=/proc/driver/nvidia |
|
21 |
+ if ! test -e $path; then |
|
22 |
+ IFS=':' read -a radio <<< $(LANG=C nmcli -t radio) |
|
23 |
+ nmcli radio wifi off |
|
24 |
+ while ! test -e $path; do |
|
25 |
+ continue |
|
26 |
+ done |
|
27 |
+ test ${radio[1]} = 'enabled' && nmcli radio wifi on |
|
28 |
+ fi |
|
29 |
+ )& |
|
30 |
+ exec "$@" |
|
31 |
+else |
|
32 |
+ echo "primus isn't installed" |
|
33 |
+ exit 1 |
|
34 |
+fi |