forked from mirrors/nixpkgs
3f1054b1ec
Note: it relies heavily on 'virtualgl'. This also makes the approach taken by bumblebee not very effective. So, this package is actually mainly useful for shutting down your card so that it does not consume power/produce heat. See the comments in bumblebee/default.nix svn path=/nixpkgs/trunk/; revision=32036
31 lines
1 KiB
Diff
31 lines
1 KiB
Diff
--- bumblebee-3.0/src/driver.c.orig 2012-02-03 14:51:10.282464426 +0100
|
|
+++ bumblebee-3.0/src/driver.c 2012-02-04 22:26:02.715498536 +0100
|
|
@@ -23,6 +23,7 @@
|
|
#include "module.h"
|
|
#include "bblogger.h"
|
|
#include "driver.h"
|
|
+#include <stdlib.h>
|
|
|
|
/**
|
|
* Check what drivers are available and autodetect if possible. Driver, module
|
|
@@ -30,6 +31,7 @@
|
|
*/
|
|
void driver_detect(void) {
|
|
/* determine driver to be used */
|
|
+ set_string_value(&bb_config.driver, getenv("BUMBLEBEE_DRIVER"));
|
|
if (*bb_config.driver) {
|
|
bb_log(LOG_DEBUG, "Skipping auto-detection, using configured driver"
|
|
" '%s'\n", bb_config.driver);
|
|
@@ -65,8 +67,8 @@
|
|
}
|
|
}
|
|
|
|
- if (strcmp(bb_config.driver, "nvidia")) {
|
|
- set_string_value(&bb_config.ld_path, CONF_LDPATH_NVIDIA);
|
|
- set_string_value(&bb_config.mod_path, CONF_MODPATH_NVIDIA);
|
|
+ if (!strcmp(bb_config.driver, "nvidia")) {
|
|
+ set_string_value(&bb_config.ld_path, getenv("BUMBLEBEE_LDPATH_NVIDIA"));
|
|
+ set_string_value(&bb_config.mod_path, getenv("BUMBLEBEE_MODPATH_NVIDIA"));
|
|
}
|
|
}
|