bumblebee.paketlendi
This commit is contained in:
parent
3ed847f2a9
commit
131042b63a
|
@ -0,0 +1,24 @@
|
|||
From 5636b24fa86a005a5d2e30bd794516db13ccba56 Mon Sep 17 00:00:00 2001
|
||||
From: Abuzer Rafey <abuzer@rafey.ch>
|
||||
Date: Tue, 8 Dec 2015 07:00:32 -0500
|
||||
Subject: [PATCH] Dirty fix for issue #699
|
||||
|
||||
---
|
||||
src/module.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/module.c b/src/module.c
|
||||
index f7b99fa..6b6cb09 100644
|
||||
--- a/src/module.c
|
||||
+++ b/src/module.c
|
||||
@@ -96,7 +96,9 @@ int module_unload(char *driver) {
|
||||
int retries = 30;
|
||||
bb_log(LOG_INFO, "Unloading %s driver\n", driver);
|
||||
char *mod_argv[] = {
|
||||
- "rmmod",
|
||||
+ "modprobe",
|
||||
+ "-r",
|
||||
+ "nvidia_modeset",
|
||||
driver,
|
||||
NULL
|
||||
};
|
|
@ -0,0 +1,56 @@
|
|||
From 09d537e8e5313cd0f2c7bf6620ca70454de8a04a Mon Sep 17 00:00:00 2001
|
||||
From: Abuzer Rafey <abuzer@rafey.ch>
|
||||
Date: Tue, 8 Dec 2015 12:01:05 -0500
|
||||
Subject: [PATCH] Added nvidia_modeset detection for issue #699
|
||||
|
||||
---
|
||||
src/module.c | 24 ++++++++++++++++++++++--
|
||||
1 file changed, 22 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/module.c b/src/module.c
|
||||
index 6b6cb09..eea0139 100644
|
||||
--- a/src/module.c
|
||||
+++ b/src/module.c
|
||||
@@ -92,13 +92,15 @@ int module_load(char *module_name, char *driver) {
|
||||
* @return 1 if the driver is succesfully unloaded, 0 otherwise
|
||||
*/
|
||||
int module_unload(char *driver) {
|
||||
- if (module_is_loaded(driver) == 1) {
|
||||
+
|
||||
+ if (module_is_loaded(driver) == 1 &&
|
||||
+ module_is_loaded("nvidia_modeset") == 1) {
|
||||
int retries = 30;
|
||||
bb_log(LOG_INFO, "Unloading %s driver\n", driver);
|
||||
char *mod_argv[] = {
|
||||
"modprobe",
|
||||
"-r",
|
||||
- "nvidia_modeset",
|
||||
+ "nvidia-modeset",
|
||||
driver,
|
||||
NULL
|
||||
};
|
||||
@@ -111,6 +113,24 @@ int module_unload(char *driver) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
+ else if (module_is_loaded(driver) == 1) {
|
||||
+ int retries = 30;
|
||||
+ bb_log(LOG_INFO, "Unloading %s driver\n", driver);
|
||||
+ char *mod_argv[] = {
|
||||
+ "modprobe",
|
||||
+ "-r",
|
||||
+ driver,
|
||||
+ NULL
|
||||
+ };
|
||||
+ bb_run_fork_wait(mod_argv, 10);
|
||||
+ while (retries-- > 0 && module_is_loaded(driver) == 1) {
|
||||
+ usleep(100000);
|
||||
+ }
|
||||
+ if (module_is_loaded(driver) == 1) {
|
||||
+ bb_log(LOG_ERR, "Unloading %s driver timed out.\n", driver);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
From dbbf20a38aa2bffb10c4e8af583b34dff6bfe721 Mon Sep 17 00:00:00 2001
|
||||
From: Abuzer Rafey <abuzer@rafey.ch>
|
||||
Date: Wed, 9 Dec 2015 21:26:29 -0500
|
||||
Subject: [PATCH] Fix nvidia_uvm just like nvidia_modeset
|
||||
|
||||
---
|
||||
src/module.c | 35 +++++++++++++++++++++++++++--------
|
||||
1 file changed, 27 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/module.c b/src/module.c
|
||||
index eea0139..b5a4d79 100644
|
||||
--- a/src/module.c
|
||||
+++ b/src/module.c
|
||||
@@ -93,19 +93,18 @@ int module_load(char *module_name, char *driver) {
|
||||
*/
|
||||
int module_unload(char *driver) {
|
||||
|
||||
- if (module_is_loaded(driver) == 1 &&
|
||||
- module_is_loaded("nvidia_modeset") == 1) {
|
||||
+ if (module_is_loaded("nvidia_uvm") == 1) {
|
||||
int retries = 30;
|
||||
- bb_log(LOG_INFO, "Unloading %s driver\n", driver);
|
||||
+ bb_log(LOG_INFO, "Unloading nvidia_uvm driver\n");
|
||||
char *mod_argv[] = {
|
||||
"modprobe",
|
||||
"-r",
|
||||
- "nvidia-modeset",
|
||||
- driver,
|
||||
+ "nvidia_uvm",
|
||||
+ "nvidia_modeset",
|
||||
NULL
|
||||
};
|
||||
bb_run_fork_wait(mod_argv, 10);
|
||||
- while (retries-- > 0 && module_is_loaded(driver) == 1) {
|
||||
+ while (retries-- > 0 && module_is_loaded("nvidia_uvm") == 1) {
|
||||
usleep(100000);
|
||||
}
|
||||
if (module_is_loaded(driver) == 1) {
|
||||
@@ -113,7 +112,27 @@ int module_unload(char *driver) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
- else if (module_is_loaded(driver) == 1) {
|
||||
+
|
||||
+ else if (module_is_loaded("nvidia_modeset") == 1) {
|
||||
+ int retries = 30;
|
||||
+ bb_log(LOG_INFO, "Unloading nvidia_modeset driver\n");
|
||||
+ char *mod_argv[] = {
|
||||
+ "modprobe",
|
||||
+ "-r",
|
||||
+ "nvidia_modeset",
|
||||
+ NULL
|
||||
+ };
|
||||
+ bb_run_fork_wait(mod_argv, 10);
|
||||
+ while (retries-- > 0 && module_is_loaded("nvidia_modeset") == 1) {
|
||||
+ usleep(100000);
|
||||
+ }
|
||||
+ if (module_is_loaded(driver) == 1) {
|
||||
+ bb_log(LOG_ERR, "Unloading %s driver timed out.\n", driver);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ else if (module_is_loaded(driver) == 1) {
|
||||
int retries = 30;
|
||||
bb_log(LOG_INFO, "Unloading %s driver\n", driver);
|
||||
char *mod_argv[] = {
|
||||
@@ -130,7 +149,7 @@ int module_unload(char *driver) {
|
||||
bb_log(LOG_ERR, "Unloading %s driver timed out.\n", driver);
|
||||
return 0;
|
||||
}
|
||||
- }
|
||||
+ }
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
From bcfe4dd16dd6194f1edbdc53b874a4f408343c5c Mon Sep 17 00:00:00 2001
|
||||
From: Abuzer Rafey <abuzer@rafey.xyz>
|
||||
Date: Wed, 13 Apr 2016 01:11:09 -0400
|
||||
Subject: [PATCH] Workaround for nvidia_drm in newer drivers
|
||||
|
||||
---
|
||||
src/module.c | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/src/module.c b/src/module.c
|
||||
index b5a4d79..db9736a 100644
|
||||
--- a/src/module.c
|
||||
+++ b/src/module.c
|
||||
@@ -113,6 +113,25 @@ int module_unload(char *driver) {
|
||||
}
|
||||
}
|
||||
|
||||
+ else if (module_is_loaded("nvidia_drm") == 1) {
|
||||
+ int retries = 30;
|
||||
+ bb_log(LOG_INFO, "Unloading nvidia_drm driver\n");
|
||||
+ char *mod_argv[] = {
|
||||
+ "modprobe",
|
||||
+ "-r",
|
||||
+ "nvidia_drm",
|
||||
+ NULL
|
||||
+ };
|
||||
+ bb_run_fork_wait(mod_argv, 10);
|
||||
+ while (retries-- > 0 && module_is_loaded("nvidia_drm") == 1) {
|
||||
+ usleep(100000);
|
||||
+ }
|
||||
+ if (module_is_loaded(driver) == 1) {
|
||||
+ bb_log(LOG_ERR, "Unloading %s driver timed out.\n", driver);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
else if (module_is_loaded("nvidia_modeset") == 1) {
|
||||
int retries = 30;
|
||||
bb_log(LOG_INFO, "Unloading nvidia_modeset driver\n");
|
||||
@@ -175,3 +194,4 @@ int module_is_available(char *module_name) {
|
||||
};
|
||||
return bb_run_fork(mod_argv, 1) == EXIT_SUCCESS;
|
||||
}
|
||||
+
|
|
@ -0,0 +1,109 @@
|
|||
From fcfe596eb13f62ca9dd7de272a5a87ae843b2a00 Mon Sep 17 00:00:00 2001
|
||||
From: Abuzer Rafey <abuzer@rafey.xyz>
|
||||
Date: Wed, 13 Apr 2016 03:09:12 -0400
|
||||
Subject: [PATCH] Simplify module_unload
|
||||
|
||||
---
|
||||
src/module.c | 72 ++++++++++--------------------------------------------------
|
||||
1 file changed, 12 insertions(+), 60 deletions(-)
|
||||
|
||||
diff --git a/src/module.c b/src/module.c
|
||||
index db9736a..38e2daa 100644
|
||||
--- a/src/module.c
|
||||
+++ b/src/module.c
|
||||
@@ -93,56 +93,27 @@ int module_load(char *module_name, char *driver) {
|
||||
*/
|
||||
int module_unload(char *driver) {
|
||||
|
||||
- if (module_is_loaded("nvidia_uvm") == 1) {
|
||||
- int retries = 30;
|
||||
- bb_log(LOG_INFO, "Unloading nvidia_uvm driver\n");
|
||||
- char *mod_argv[] = {
|
||||
- "modprobe",
|
||||
- "-r",
|
||||
- "nvidia_uvm",
|
||||
- "nvidia_modeset",
|
||||
- NULL
|
||||
- };
|
||||
- bb_run_fork_wait(mod_argv, 10);
|
||||
- while (retries-- > 0 && module_is_loaded("nvidia_uvm") == 1) {
|
||||
- usleep(100000);
|
||||
- }
|
||||
- if (module_is_loaded(driver) == 1) {
|
||||
- bb_log(LOG_ERR, "Unloading %s driver timed out.\n", driver);
|
||||
- return 0;
|
||||
- }
|
||||
- }
|
||||
+ char uvm[] = "nvidia_uvm";
|
||||
+ char drm[] = "nvidia_drm";
|
||||
+ char modeset[] = "nvidia_modeset";
|
||||
+ int uvm_is_loaded = module_is_loaded(uvm);
|
||||
+ int drm_is_loaded = module_is_loaded(drm);
|
||||
+ int modeset_is_loaded = module_is_loaded(modeset);
|
||||
|
||||
- else if (module_is_loaded("nvidia_drm") == 1) {
|
||||
+ if (uvm_is_loaded || drm_is_loaded || modeset_is_loaded || *driver == 1) {
|
||||
int retries = 30;
|
||||
- bb_log(LOG_INFO, "Unloading nvidia_drm driver\n");
|
||||
+ bb_log(LOG_INFO, "Unloading UVM/DRM/MODESET driver\n");
|
||||
char *mod_argv[] = {
|
||||
"modprobe",
|
||||
"-r",
|
||||
+ "nvidia_uvm",
|
||||
"nvidia_drm",
|
||||
- NULL
|
||||
- };
|
||||
- bb_run_fork_wait(mod_argv, 10);
|
||||
- while (retries-- > 0 && module_is_loaded("nvidia_drm") == 1) {
|
||||
- usleep(100000);
|
||||
- }
|
||||
- if (module_is_loaded(driver) == 1) {
|
||||
- bb_log(LOG_ERR, "Unloading %s driver timed out.\n", driver);
|
||||
- return 0;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- else if (module_is_loaded("nvidia_modeset") == 1) {
|
||||
- int retries = 30;
|
||||
- bb_log(LOG_INFO, "Unloading nvidia_modeset driver\n");
|
||||
- char *mod_argv[] = {
|
||||
- "modprobe",
|
||||
- "-r",
|
||||
"nvidia_modeset",
|
||||
+ driver,
|
||||
NULL
|
||||
};
|
||||
bb_run_fork_wait(mod_argv, 10);
|
||||
- while (retries-- > 0 && module_is_loaded("nvidia_modeset") == 1) {
|
||||
+ while (retries-- > 0 && module_is_loaded(driver) == 1) {
|
||||
usleep(100000);
|
||||
}
|
||||
if (module_is_loaded(driver) == 1) {
|
||||
@@ -150,26 +121,7 @@ int module_unload(char *driver) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
-
|
||||
- else if (module_is_loaded(driver) == 1) {
|
||||
- int retries = 30;
|
||||
- bb_log(LOG_INFO, "Unloading %s driver\n", driver);
|
||||
- char *mod_argv[] = {
|
||||
- "modprobe",
|
||||
- "-r",
|
||||
- driver,
|
||||
- NULL
|
||||
- };
|
||||
- bb_run_fork_wait(mod_argv, 10);
|
||||
- while (retries-- > 0 && module_is_loaded(driver) == 1) {
|
||||
- usleep(100000);
|
||||
- }
|
||||
- if (module_is_loaded(driver) == 1) {
|
||||
- bb_log(LOG_ERR, "Unloading %s driver timed out.\n", driver);
|
||||
- return 0;
|
||||
- }
|
||||
- }
|
||||
- return 1;
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
/**
|
|
@ -0,0 +1,23 @@
|
|||
From 2073f8537412aa47755eb6f3f22a114403e5285b Mon Sep 17 00:00:00 2001
|
||||
From: Peter Wu <peter@lekensteyn.nl>
|
||||
Date: Wed, 16 Apr 2014 18:19:01 +0200
|
||||
Subject: [PATCH] Fix devices with a bus larger than 9 (GH-573)
|
||||
|
||||
The `-isolateDevice` option accepts a PCI ID in decimal format, not hex.
|
||||
---
|
||||
src/bbsecondary.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/bbsecondary.c b/src/bbsecondary.c
|
||||
index 71a6b73..6b635ee 100644
|
||||
--- a/src/bbsecondary.c
|
||||
+++ b/src/bbsecondary.c
|
||||
@@ -138,7 +138,7 @@ bool start_secondary(bool need_secondary) {
|
||||
if (!bb_is_running(bb_status.x_pid)) {
|
||||
char pci_id[12];
|
||||
static char *x_conf_file;
|
||||
- snprintf(pci_id, 12, "PCI:%02x:%02x:%o", pci_bus_id_discrete->bus,
|
||||
+ snprintf(pci_id, 12, "PCI:%02d:%02d:%o", pci_bus_id_discrete->bus,
|
||||
pci_bus_id_discrete->slot, pci_bus_id_discrete->func);
|
||||
if (!x_conf_file) {
|
||||
x_conf_file = xorg_path_w_driver(bb_config.x_conf_file, bb_config.driver);
|
|
@ -0,0 +1,15 @@
|
|||
--- a/src/bblogger.c
|
||||
+++ b/src/bblogger.c
|
||||
@@ -144,7 +144,11 @@
|
||||
/* Error lines are errors. */
|
||||
if (strncmp(string, "(EE)", 4) == 0){
|
||||
if (strstr(string, "Failed to load module \"kbd\"") ||
|
||||
- strstr(string, "No input driver matching")) {
|
||||
+ strstr(string, "Failed to load module \"mouse\"") ||
|
||||
+ strstr(string, "failed to set DRM interface version 1.4:") ||
|
||||
+ strstr(string, "No input driver matching") ||
|
||||
+ strstr(string, "systemd-logind: failed to get session:") ||
|
||||
+ strstr(string, "Server terminated successfully")) {
|
||||
/* non-fatal errors */
|
||||
prio = LOG_DEBUG;
|
||||
} else {
|
|
@ -0,0 +1,5 @@
|
|||
blacklist nvidia
|
||||
blacklist nvidia-drm
|
||||
blacklist nvidia-modeset
|
||||
blacklist nvidia-uvm
|
||||
blacklist nouveau
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/bumblebeed: start/stop bumblebeed
|
||||
#
|
||||
|
||||
SSD=/sbin/start-stop-daemon
|
||||
PROG=/usr/sbin/bumblebeed
|
||||
OPTS="--daemon"
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
$SSD --start --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
$SSD --stop --retry 10 --exec $PROG
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
$SSD --status --exec $PROG
|
||||
case $? in
|
||||
0) echo "$PROG is running with pid $(pidof $PROG)" ;;
|
||||
1) echo "$PROG is not running but the pid file $PID exists" ;;
|
||||
3) echo "$PROG is not running" ;;
|
||||
4) echo "Unable to determine the program status" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart|status]"
|
||||
;;
|
||||
esac
|
||||
|
||||
# End of file
|
|
@ -0,0 +1,46 @@
|
|||
# Description: NVIDIA VirtualGL destek uygulaması
|
||||
# URL: http://www.bumblebee-project.org
|
||||
# Packager: milisarge
|
||||
# Depends on: virtualgl glib
|
||||
|
||||
name=bumblebee
|
||||
version=3.2.1
|
||||
release=1
|
||||
source=(
|
||||
http://www.bumblebee-project.org/bumblebee-$version.tar.gz
|
||||
0001-bb_nvidia_modeset-detection_bug699_01.patch
|
||||
0002-bb_nvidia_modeset-detection_bug699_02.patch
|
||||
0003-bb_nvidia_umv_detection_bug699.patch
|
||||
0004-bb_nvidia_drm_detection_bug699_01.patch
|
||||
0005-bb_nvidia_drm_detection_bug699_02.patch
|
||||
0006-bb_hexadicimal_bug573.patch
|
||||
0007-bb_mutebblogger.patch
|
||||
bumblebee.conf
|
||||
bumblebeed
|
||||
)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
|
||||
for p in $SRC/*.patch; do
|
||||
patch -p1 < $p
|
||||
done
|
||||
|
||||
./configure \
|
||||
CONF_DRIVER_MODULE_NVIDIA=nvidia \
|
||||
CONF_LDPATH_NVIDIA=/usr/lib/nvidia:/usr/lib32/nvidia \
|
||||
CONF_MODPATH_NVIDIA=/usr/lib/xorg/nvidia/modules/drivers/,/usr/lib/xorg/nvidia/modules,/usr/lib/xorg/modules,/usr/lib/xorg/modules/drivers \
|
||||
--prefix=/usr \
|
||||
--without-pidfile
|
||||
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
|
||||
install -Dm755 $SRC/bumblebeed $PKG/etc/rc.d/init.d/bumblebeed
|
||||
|
||||
# Blacklist nvidia and nouveau modules
|
||||
# Reference: https://github.com/Bumblebee-Project/Bumblebee/issues/719
|
||||
install -Dm644 $SRC/bumblebee.conf $PKG/usr/lib/modprobe.d/bumblebee.conf
|
||||
|
||||
rm -r $PKG/usr/share/doc
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
# Description: opengl kullanan bir uygulamadan opengl ekran kartına 3d komut iletir
|
||||
# URL: http://virtualgl.org
|
||||
# Packager: milisarge
|
||||
# Depends on: xorg-libxv xorg-glu libjpeg-turbo xorg-xcb-util-keysyms
|
||||
|
||||
name=virtualgl
|
||||
version=2.5.2
|
||||
release=1
|
||||
source=(https://github.com/VirtualGL/$name/archive/$version.tar.gz)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
|
||||
cmake . \
|
||||
-DCMAKE_BINARY_DIR=/usr \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_DEFAULT_LIBDIR=lib \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=x86_64
|
||||
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
|
||||
rm -rf $PKG/usr/share
|
||||
|
||||
rm -rf $PKG/usr/bin/.vglrun.vars64
|
||||
|
||||
mv $PKG/usr/bin/glxinfo $PKG/usr/bin/vglxinfo
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
# Description: XCB araç kütüphanesi
|
||||
# URL: http://xcb.freedesktop.org
|
||||
# Packager: milisarge
|
||||
# Depends on: libxcb
|
||||
|
||||
name=xorg-xcb-util-keysyms
|
||||
version=0.4.0
|
||||
release=1
|
||||
source=(http://xcb.freedesktop.org/dist/xcb-util-keysyms-$version.tar.bz2)
|
||||
|
||||
build() {
|
||||
cd xcb-util-keysyms-$version
|
||||
|
||||
./configure --prefix=/usr
|
||||
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
}
|
Loading…
Reference in New Issue