bbswitch, bumblebee, primus: removed, use opt/prime-run instead
This commit is contained in:
parent
f569068c09
commit
8bfcdf5f75
@ -1,5 +0,0 @@
|
||||
drwxr-xr-x root/root lib/
|
||||
drwxr-xr-x root/root lib/modules/
|
||||
drwxr-xr-x root/root lib/modules/<kernel-version>/
|
||||
drwxr-xr-x root/root lib/modules/<kernel-version>/misc/
|
||||
-rw-r--r-- root/root lib/modules/<kernel-version>/misc/bbswitch.ko
|
@ -1,7 +0,0 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF30dRVYn1U17vYs0kHbT3mE7M/lVu2k709qq5ZXYqiQeQYnPHol73GSFlqkq0JeUurrkfvu46Rxj9x3aKXwUwXwA=
|
||||
SHA256 (Pkgfile) = 36dc4921576341d4705b3ba1fddc3ecd449a34f3eb1a7bbea49f31805974e825
|
||||
SHA256 (.footprint) = 7440253c3fd2b9481f105ccb7585cab877c98be6b285c733695bdd6b51cbd459
|
||||
SHA256 (bbswitch-0.8.tar.gz) = 76cabd3f734fb4fe6ebfe3ec9814138d0d6f47d47238521ecbd6a986b60d1477
|
||||
SHA256 (bbswitch-kernel56.patch) = 29e3cc5b4f11c6760c99e385d04e3065414eaab36a7661cb3af8f093643498b4
|
||||
SHA256 (acpi.patch) = 04061ecbee433de137d8e68cd42271a30c172bb87829cf350d50df1b24414139
|
@ -1,17 +0,0 @@
|
||||
# Description: A kernel module for automating module switches on optimus laptops
|
||||
# URL: https://github.com/Bumblebee-Project/bbswitch
|
||||
# Maintainer: Matt Housh, jaeger at crux dot ninja
|
||||
|
||||
name=bbswitch
|
||||
version=0.8
|
||||
release=1
|
||||
source=(https://github.com/Bumblebee-Project/$name/archive/v$version/$name-$version.tar.gz \
|
||||
$name-kernel56.patch acpi.patch)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
patch -p1 -i $SRC/$name-kernel56.patch
|
||||
patch -p1 -i $SRC/acpi.patch
|
||||
make
|
||||
install -D -m 0644 $name.ko $PKG/lib/modules/$(uname -r)/misc/$name.ko
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
diff -u -r bbswitch-0.8/bbswitch.c bbswitch-0.8-5.18/bbswitch.c
|
||||
--- bbswitch-0.8/bbswitch.c 2022-05-24 20:26:22.184553495 +0000
|
||||
+++ bbswitch-0.8-5.18/bbswitch.c 2022-05-24 20:29:00.797008130 +0000
|
||||
@@ -264,10 +264,15 @@
|
||||
pci_disable_device(dis_dev);
|
||||
do {
|
||||
struct acpi_device *ad = NULL;
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
|
||||
+ ad = acpi_fetch_acpi_dev(dis_handle);
|
||||
+ if (!ad) {
|
||||
+#else
|
||||
int r;
|
||||
|
||||
r = acpi_bus_get_device(dis_handle, &ad);
|
||||
if (r || !ad) {
|
||||
+#endif
|
||||
pr_warn("Cannot get ACPI device for PCI device\n");
|
||||
break;
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
diff -up bbswitch-0.8/bbswitch.c.5.6fix bbswitch-0.8/bbswitch.c
|
||||
--- bbswitch-0.8/bbswitch.c.5.6fix 2020-04-27 21:03:31.374417071 -0400
|
||||
+++ bbswitch-0.8/bbswitch.c 2020-04-28 20:10:56.479080120 -0400
|
||||
@@ -35,6 +35,10 @@
|
||||
#include <linux/suspend.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
+#include <linux/version.h>
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
|
||||
+#include <linux/proc_fs.h>
|
||||
+#endif
|
||||
|
||||
#define BBSWITCH_VERSION "0.8"
|
||||
|
||||
@@ -375,6 +379,15 @@ static int bbswitch_pm_handler(struct no
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
|
||||
+static struct proc_ops bbswitch_fops = {
|
||||
+ .proc_open = bbswitch_proc_open,
|
||||
+ .proc_read = seq_read,
|
||||
+ .proc_write = bbswitch_proc_write,
|
||||
+ .proc_lseek = seq_lseek,
|
||||
+ .proc_release= single_release
|
||||
+};
|
||||
+#else
|
||||
static struct file_operations bbswitch_fops = {
|
||||
.open = bbswitch_proc_open,
|
||||
.read = seq_read,
|
||||
@@ -382,6 +395,7 @@ static struct file_operations bbswitch_f
|
||||
.llseek = seq_lseek,
|
||||
.release= single_release
|
||||
};
|
||||
+#endif
|
||||
|
||||
static struct notifier_block nb = {
|
||||
.notifier_call = &bbswitch_pm_handler
|
@ -1,24 +0,0 @@
|
||||
drwxr-xr-x root/root etc/
|
||||
drwxr-xr-x root/root etc/bash_completion.d/
|
||||
-rw-r--r-- root/root etc/bash_completion.d/optirun
|
||||
drwxr-xr-x root/root etc/bumblebee/
|
||||
-rw-r--r-- root/root etc/bumblebee/bumblebee.conf
|
||||
drwxr-xr-x root/root etc/bumblebee/xorg.conf.d/
|
||||
-rw-r--r-- root/root etc/bumblebee/xorg.conf.d/10-dummy.conf (EMPTY)
|
||||
-rw-r--r-- root/root etc/bumblebee/xorg.conf.nouveau
|
||||
-rw-r--r-- root/root etc/bumblebee/xorg.conf.nvidia
|
||||
drwxr-xr-x root/root etc/modprobe.d/
|
||||
-rw-r--r-- root/root etc/modprobe.d/bumblebee.conf
|
||||
drwxr-xr-x root/root etc/rc.d/
|
||||
-rwxr-xr-x root/root etc/rc.d/bumblebeed
|
||||
drwxr-xr-x root/root lib/
|
||||
drwxr-xr-x root/root lib/udev/
|
||||
drwxr-xr-x root/root lib/udev/rules.d/
|
||||
-rw-r--r-- root/root lib/udev/rules.d/99-bumblebee-nvidia-dev.rules
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/bin/
|
||||
-rwxr-xr-x root/root usr/bin/bumblebee-bugreport
|
||||
-rwxr-xr-x root/root usr/bin/optirun
|
||||
drwxr-xr-x root/root usr/sbin/
|
||||
-rwxr-xr-x root/root usr/sbin/bumblebeed
|
||||
drwxr-xr-x root/root usr/share/
|
@ -1,8 +0,0 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF3/xkfeun8OG2Q96W+l6awnuDb0I+UMyoxX2FXcQ40NlG09uNCoNuPfnv5jHixa0FGXP3f7laSZytQwvK0gCsLAc=
|
||||
SHA256 (Pkgfile) = eec0613bfa3b03d2250569e730ce27b06809e4733e5ca5cd4d1949c372c2016f
|
||||
SHA256 (.footprint) = bfdffd4dc5e7478600d928d831587205571dee12b90f220958c7b40b9c3afac9
|
||||
SHA256 (bumblebee-3.2.1.tar.gz) = 1018703b07e2f607a4641249d69478ce076ae5a1e9dd6cff5694d394fa7ee30e
|
||||
SHA256 (libglvnd.patch) = b260d64a53617807afe21560db0592d114d7775b182e13fb59349f0157c8dba4
|
||||
SHA256 (blacklist.conf) = b3dcf27582eb7abe8eb0d991685357386776011cff02cfc8d5f571e2e61b4b8d
|
||||
SHA256 (bumblebeed.rc) = 344ea5d17ec84dd3bfca95b28e0a607ab9e0b74dbbdd07fce5e89c48a368a6d3
|
@ -1,29 +0,0 @@
|
||||
# Description: An effort to make Nvidia Optimus laptops work in GNU/Linux
|
||||
# URL: https://bumblebee-project.org/
|
||||
# Maintainer: Matt Housh, jaeger at crux dot ninja
|
||||
# Depends on: libbsd xorg-libx11 glib bbswitch
|
||||
|
||||
name=bumblebee
|
||||
version=3.2.1
|
||||
release=2
|
||||
source=(http://bumblebee-project.org/$name-$version.tar.gz \
|
||||
libglvnd.patch blacklist.conf bumblebeed.rc)
|
||||
|
||||
build() {
|
||||
export PKG_CONFIG_PATH="/usr/opt/libbsd/lib/pkgconfig"
|
||||
CFLAGS="${CFLAGS} -fcommon"
|
||||
cd $name-$version
|
||||
patch -p1 -i $SRC/libglvnd.patch
|
||||
./configure \
|
||||
CONF_DRIVER_MODULE_NVIDIA=nvidia \
|
||||
CONF_LDPATH_NVIDIA=/usr/lib/nvidia:/usr/lib32/nvidia:/usr/lib:/usr/lib32 \
|
||||
CONF_MODPATH_NVIDIA=/usr/lib/nvidia/xorg,/usr/lib/xorg/modules \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
rm -r $PKG/usr/share/doc
|
||||
mv $PKG/etc/bash_completion.d/{bumblebee,optirun}
|
||||
install -D -m 0644 $SRC/blacklist.conf $PKG/etc/modprobe.d/bumblebee.conf
|
||||
install -D -m 0755 $SRC/bumblebeed.rc $PKG/etc/rc.d/bumblebeed
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
blacklist nvidia
|
||||
blacklist nvidia-drm
|
||||
blacklist nvidia-modeset
|
||||
blacklist nvidia-uvm
|
||||
blacklist nouveau
|
@ -1,5 +0,0 @@
|
||||
blacklist nvidia
|
||||
blacklist nvidia-drm
|
||||
blacklist nvidia-modeset
|
||||
blacklist nvidia-uvm
|
||||
blacklist nouveau
|
@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/bumblebeed: start/stop bumblebeed daemon
|
||||
#
|
||||
|
||||
GROUP="bumblebee"
|
||||
|
||||
SSD=/sbin/start-stop-daemon
|
||||
PROG=/usr/sbin/bumblebeed
|
||||
PID=/var/run/bumblebeed.pid
|
||||
OPTS="-D -g ${GROUP}"
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
$SSD --start --pidfile $PID --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
$SSD --stop --retry 10 --pidfile $PID
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
$SSD --status --pidfile $PID
|
||||
case $? in
|
||||
0) echo "$PROG is running with pid $(cat $PID)" ;;
|
||||
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
|
@ -1,26 +0,0 @@
|
||||
From c3ccbb7f6dd00038b1cb328898a29583e3a6c9be Mon Sep 17 00:00:00 2001
|
||||
From: SolarAquarion <shlomochoina@gmail.com>
|
||||
Date: Sun, 19 Feb 2017 16:53:09 -0500
|
||||
Subject: [PATCH] adding workaround for libglvnd
|
||||
|
||||
---
|
||||
src/optirun.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/optirun.c b/src/optirun.c
|
||||
index 65c83d4..ec72057 100644
|
||||
--- a/src/optirun.c
|
||||
+++ b/src/optirun.c
|
||||
@@ -203,7 +203,11 @@ static int run_primus(int argc, char **argv) {
|
||||
|
||||
/* primus starts the X server when needed, fixes long-standing fork issue */
|
||||
setenv("BUMBLEBEE_SOCKET", bb_config.socket_path, 1);
|
||||
-
|
||||
+
|
||||
+/* primus needs this variable workaround for libglvnd enabled mesa */
|
||||
+
|
||||
+ setenv("__GLVND_DISALLOW_PATCHING", "1", 0);
|
||||
+
|
||||
/* set LD_LIBRARY_PATH to primus_ld_path plus ld_path plus current LD_LIBRARY_PATH */
|
||||
setenv("PRIMUS_DISPLAY", bb_config.x_display, 0);
|
||||
char *ldpath_cur = getenv("LD_LIBRARY_PATH");
|
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "`getent group bumblebee`" ]; then
|
||||
/usr/sbin/groupadd --system bumblebee
|
||||
fi
|
||||
|
||||
if [ -z "`getent passwd bumblebee`" ]; then
|
||||
/usr/sbin/useradd -r -g bumblebee -d /etc/bumblebee -s /bin/false -c "bumblebee user" bumblebee
|
||||
/usr/bin/passwd -l bumblebee
|
||||
fi
|
@ -1,13 +0,0 @@
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/bin/
|
||||
-rwxr-xr-x root/root usr/bin/primusrun
|
||||
drwxr-xr-x root/root usr/lib/
|
||||
drwxr-xr-x root/root usr/lib/primus/
|
||||
-rwxr-xr-x root/root usr/lib/primus/libGL.so.1
|
||||
drwxr-xr-x root/root usr/share/
|
||||
drwxr-xr-x root/root usr/share/bash-completion/
|
||||
drwxr-xr-x root/root usr/share/bash-completion/completions/
|
||||
-rw-r--r-- root/root usr/share/bash-completion/completions/primusrun
|
||||
drwxr-xr-x root/root usr/share/man/
|
||||
drwxr-xr-x root/root usr/share/man/man1/
|
||||
-rw-r--r-- root/root usr/share/man/man1/primusrun.1.gz
|
@ -1,6 +0,0 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF38fm4Ey1cFzhD3sAW00ox2ULUC0mXS9aASBgSuQLbK/b4qFnRNrG//o/eu11Lm6DJPvYzHPENJMIpsY9WzSeeQE=
|
||||
SHA256 (Pkgfile) = fa98af3a718f0d2de507352f7e63d79ffc557f41c4ef1955ca2207c59307cd70
|
||||
SHA256 (.footprint) = 377f116ca51c4e87666a3dbb639b7af485d875b3b76ead9a434a06e780f2c942
|
||||
SHA256 (primus-0.2.tar.gz) = beccce83d6e493ecb45589fd02d7b0b0e5b406b136f4ad62d20d4cbac9d54fec
|
||||
SHA256 (primusrun.patch) = 721ef91344853b33a84587a9b93523123e5568bfc285aaa703852d19e01b1e4a
|
@ -1,22 +0,0 @@
|
||||
# Description: Low-overhead client-side GPU offloading
|
||||
# URL: https://github.com/amonakov/primus
|
||||
# Maintainer: Matt Housh, jaeger at crux dot ninja
|
||||
# Depends on: mesa
|
||||
|
||||
name=primus
|
||||
version=0.2
|
||||
release=1
|
||||
source=(https://github.com/amonakov/$name/archive/v$version/$name-$version.tar.gz \
|
||||
primusrun.patch)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
patch -p1 -i $SRC/primusrun.patch
|
||||
make
|
||||
|
||||
install -D -m 0755 lib/libGL.so.1 $PKG/usr/lib/primus/libGL.so.1
|
||||
install -D -m 0644 primus.bash-completion $PKG/usr/share/bash-completion/completions/primusrun
|
||||
sed -i -e 's,^PRIMUS_libGL=.*,PRIMUS_libGL=/usr/\\$LIB/primus,' primusrun
|
||||
install -D -m 0755 primusrun $PKG/usr/bin/primusrun
|
||||
install -D -m 0644 primusrun.1 $PKG/usr/share/man/man1/primusrun.1
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
diff -urN primus-0.2.orig/primusrun primus-0.2/primusrun
|
||||
--- primus-0.2.orig/primusrun 2015-03-28 14:29:18.000000000 -0500
|
||||
+++ primus-0.2/primusrun 2018-07-10 00:03:37.898370455 -0500
|
||||
@@ -26,7 +26,7 @@
|
||||
# export PRIMUS_libGLd=${PRIMUS_libGLd:-'/usr/$LIB/libGL.so.1'}
|
||||
|
||||
# Directory containing primus libGL
|
||||
-PRIMUS_libGL=${PRIMUS_libGL:-$(dirname `readlink -ne $0`)/'$LIB'}
|
||||
+PRIMUS_libGL=/usr/\$LIB/primus
|
||||
|
||||
# On some distributions, e.g. on Ubuntu, libnvidia-tls.so is not available
|
||||
# in default search paths. Add its path manually after the primus library
|
||||
@@ -38,5 +38,8 @@
|
||||
# Need functions from primus libGL to take precedence
|
||||
export LD_LIBRARY_PATH=${PRIMUS_libGL}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
||||
|
||||
+# needed for glvnd mesa
|
||||
+export __GLVND_DISALLOW_PATCHING=1
|
||||
+
|
||||
# And go!
|
||||
exec "$@"
|
Loading…
Reference in New Issue
Block a user