From fca938a0731ad5c2c28de042aa753b976b506ee5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 19 Mar 2016 22:27:18 +0000 Subject: import bumblebee from deprecated repo --- x11-misc/bumblebee/files/bbswitch-setup | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 x11-misc/bumblebee/files/bbswitch-setup (limited to 'x11-misc/bumblebee/files/bbswitch-setup') diff --git a/x11-misc/bumblebee/files/bbswitch-setup b/x11-misc/bumblebee/files/bbswitch-setup new file mode 100644 index 00000000..7f6c7249 --- /dev/null +++ b/x11-misc/bumblebee/files/bbswitch-setup @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +start() { + # workaround the fact that udev may have loaded nvidia or nouveau + # and bbswitch refuses to turn off the card. + ebegin "Setting up bbswitch" + # make sure that the nvidia and nouveau modules are + # removed, then reload bbswitch. + for mod in nvidia nouveau; do + modprobe -r ${mod} 2> /dev/null # best effort + done + # reload bbswitch now + modprobe -r bbswitch + modprobe bbswitch # this inherits the options + eend 0 +} + -- cgit v1.2.3