* Bump bumblebee to 3.2.1 * Remove config.patch - options it added can be passed to ./configure now * Remove the provided xorg.conf Provided xorg.conf was causing problems for some users, and Bumblebee provides its own default configuration anyway. * Make secondary X11 log to /var/log/X.bumblebee.log * Add a module for bumblebeewip/yesman
parent
48851fa749
commit
fe38031168
@ -0,0 +1,41 @@ |
||||
{ config, pkgs, ... }: |
||||
|
||||
let kernel = config.boot.kernelPackages; in |
||||
with pkgs.lib; |
||||
|
||||
{ |
||||
|
||||
options = { |
||||
hardware.bumblebee.enable = mkOption { |
||||
default = false; |
||||
type = types.bool; |
||||
description = '' |
||||
Enable the bumblebee daemon to manage Optimus hybrid video cards. |
||||
This should power off secondary GPU until its use is requested |
||||
by running an application with optirun. |
||||
|
||||
Only nvidia driver is supported so far. |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf config.hardware.bumblebee.enable { |
||||
boot.blacklistedKernelModules = [ "nouveau" "nvidia" ]; |
||||
boot.kernelModules = [ "bbswitch" ]; |
||||
boot.extraModulePackages = [ kernel.bbswitch kernel.nvidia_x11 ]; |
||||
|
||||
environment.systemPackages = [ pkgs.bumblebee ]; |
||||
|
||||
systemd.services.bumblebeed = { |
||||
description = "Bumblebee Hybrid Graphics Switcher"; |
||||
wantedBy = [ "display-manager.service" ]; |
||||
script = "bumblebeed --use-syslog"; |
||||
path = [ kernel.bbswitch pkgs.bumblebee ]; |
||||
serviceConfig = { |
||||
Restart = "always"; |
||||
RestartSec = 60; |
||||
CPUSchedulingPolicy = "idle"; |
||||
}; |
||||
}; |
||||
}; |
||||
} |
@ -1,30 +0,0 @@ |
||||
--- 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"));
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@ |
||||
Section "DRI" |
||||
Mode 0666 |
||||
EndSection |
||||
|
||||
Section "ServerLayout" |
||||
Identifier "Layout0" |
||||
Screen "Screen1" |
||||
Option "AutoAddDevices" "false" |
||||
EndSection |
||||
|
||||
Section "Module" |
||||
Load "dbe" |
||||
Load "extmod" |
||||
Load "glx" |
||||
Load "record" |
||||
Load "freetype" |
||||
Load "type1" |
||||
EndSection |
||||
|
||||
Section "Files" |
||||
EndSection |
||||
|
||||
Section "Device" |
||||
Identifier "Device1" |
||||
Driver "nvidia" |
||||
VendorName "NVIDIA Corporation" |
||||
Option "NoLogo" "true" |
||||
Option "UseEDID" "false" |
||||
Option "ConnectedMonitor" "CRT-0" |
||||
EndSection |
||||
|
||||
Section "Screen" |
||||
Identifier "Screen1" |
||||
Device "Device1" |
||||
Monitor "Monitor0" |
||||
DefaultDepth 24 |
||||
SubSection "Display" |
||||
Depth 24 |
||||
EndSubSection |
||||
EndSection |
||||
|
||||
Section "Extensions" |
||||
Option "Composite" "Enable" |
||||
EndSection |
||||
|
||||
Section "Monitor" |
||||
Identifier "Monitor0" |
||||
Option "DPMS" |
||||
EndSection |
Loading…
Reference in new issue