optimus add repository

This commit is contained in:
burakerturk
2016-04-10 19:45:21 +03:00
parent 4d67565be8
commit 18ef7661e2
12 changed files with 79348 additions and 79071 deletions
+79143 -79069
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1 +1 @@
bf7e1d888dfd6a504994f9d0e5ab1ea359ad9f98
77b7251f44a60cc3b3751138d943fc00f1972357
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
2d266e2d514c9a5346c9eb4bf097b25d26579432
fd2aba29584bd4c07ff066f7c7f979b4f6d7166d
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt
from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
def setup():
autotools.configure("\
CONF_DRIVER=nvidia \
CONF_DRIVER_MODULE_NVIDIA=nvidia \
CONF_LDPATH_NVIDIA=/usr/lib/nvidia-current:/usr/lib32/nvidia-current \
CONF_MODPATH_NVIDIA=//usr/lib/nvidia-current,/usr/lib/xorg/modules \
CONF_PRIMUS_LD_PATH=/usr/lib/primus:/usr/lib32/primus \
--with-udev-rules=/lib/udev/rules.d/ \
--without-pidfile \
")
def build():
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
from grp import getgrnam
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
if not os.path.isdir("/run/bumblebee"): os.makedirs("/run/bumblebee", int("0775", 8))
try:
os.chown("/run/bumblebee", -1, getgrnam("bumblebee").gr_gid)
except KeyError:
os.system("groupadd -r bumblebee")
os.chown("/run/bumblebee", -1, getgrnam("bumblebee").gr_gid)
for u in getgrnam("users").gr_mem:
os.system("gpasswd -a %s bumblebee" % u)
+36
View File
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
from comar.service import *
import os
serviceType = "local"
serviceDesc = _({"en": "FIXME",
"tr": "FIXME"})
serviceDefault = "on"
PIDFILE = "/run/bumblebeed.pid"
DAEMON = "/usr/sbin/bumblebeed"
@synchronized
def start():
os.system("modprobe bbswitch load_state=0 unload_state=1")
startService(command=DAEMON,
args="--daemon",
detach=True)
os.system("pidof -o %PPID " + "%s > %s" % (DAEMON, PIDFILE))
@synchronized
def stop():
stopService(pidfile=PIDFILE,
donotify=True)
try:
os.unlink(PIDFILE)
except:
pass
def status():
return isServiceRunning(pidfile=PIDFILE)
@@ -0,0 +1,24 @@
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,32 @@
--- a/src/bbsecondary.c 2013-04-26 17:49:03.000000000 +0200
+++ b/src/bbsecondary.c 2015-10-20 22:25:52.874484211 +0200
@@ -119,6 +119,17 @@
if (!module_load(module_name, driver_name)) {
set_bb_error("Could not load GPU driver");
return false;
+ } else {
+ /* XXX NVIDIA UVM support */
+ if (strstr(module_name, "nvidia")) { /* We are using NVIDIA's proprietary driver */
+ char uvm_module_name[1024];
+ sprintf(uvm_module_name, "%s-uvm", module_name);
+ if (!module_load(uvm_module_name, "nvidia_uvm")) {
+ char log_string[1024];
+ sprintf(log_string, "Cannot load UVM module: %s\n", uvm_module_name);
+ bb_log(LOG_ERR, log_string);
+ }
+ }
}
}
return true;
@@ -232,6 +243,11 @@
}
/* unload the driver loaded by the graphica card */
if (pci_get_driver(driver, pci_bus_id_discrete, sizeof driver)) {
+ /* XXX NVIDIA UVM,MODESET support */
+ if (strstr(driver, "nvidia")) {
+ module_unload("nvidia_modeset");
+ module_unload("nvidia_uvm");
+ }
module_unload(driver);
}
+1
View File
@@ -0,0 +1 @@
d /run/bumblebee 0775 root bumblebee - -
+60
View File
@@ -0,0 +1,60 @@
<PISI>
<Source>
<Name>bumblebee</Name>
<Homepage>http://bumblebee-project.org</Homepage>
<Packager>
<Name>Idris Kalp</Name>
<Email>idriskalp@gmail.com</Email>
</Packager>
<License>GPLv3</License>
<PartOf>kernel.default.drivers</PartOf>
<IsA>app:gui</IsA>
<Summary>a project aiming to support NVIDIA Optimus technology under Linux.</Summary>
<Description>The Bumblebee Project proudly presents version 3.0 of Bumblebee, a project aiming to support NVIDIA Optimus technology under Linux. After two months of hard work this version has finally been considered stable enough for release.</Description>
<Archive sha1sum="a715f4aa1b0c24dd4352ff7e0bc390f1e4e03cd9" type="targz">http://www.bumblebee-project.org/bumblebee-3.2.1.tar.gz</Archive>
<BuildDependencies>
<Dependency>libbsd-devel</Dependency>
<Dependency>libX11-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">bb-hexadecimal.patch</Patch>
<Patch level="1">nv-uvm-modeset.patch</Patch>
</Patches>
</Source>
<Package>
<Name>bumblebee</Name>
<RuntimeDependencies>
<Dependency>module-bbswitch</Dependency>
<Dependency>libX11</Dependency>
<Dependency>libbsd</Dependency>
<Dependency>primus</Dependency>
<Dependency>virtualgl</Dependency>
<Dependency>virtualgl-32bit</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="config">/etc</Path>
<Path fileType="config">/usr/lib/tmpfiles.d/bumblebee.conf</Path>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="executable">/usr/sbin</Path>
<Path fileType="data">/lib/udev/rules.d</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="doc">/usr/share/doc</Path>
</Files>
<Provides>
<COMAR script="service.py">System.Service</COMAR>
<COMAR script="package.py">System.Package</COMAR>
</Provides>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/bumblebee.conf">tmpfiles.conf</AdditionalFile>
</AdditionalFiles>
</Package>
<History>
<Update release="1">
<Date>2016-04-08</Date>
<Version>3.2.1</Version>
<Comment>First Release</Comment>
<Name>Idris Kalp</Name>
<Email>idriskalp@pgmail.com</Email>
</Update>
</History>
</PISI>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>bumblebee</Name>
<Summary xml:lang="en">a project aiming to support NVIDIA Optimus technology under Linux.</Summary>
<Description xml:lang="en">The Bumblebee Project proudly presents version 3.0 of Bumblebee, a project aiming to support NVIDIA Optimus technology under Linux. After two months of hard work this version has finally been considered stable enough for release.</Description>
</Source>
</PISI>