From Fedora Project Wiki

m
Line 5: Line 5:
  
 
== Install Dependencies ==
 
== Install Dependencies ==
 
+
<pre>
yum install -y libbsd-devel libbsd glibc-devel libX11-devel help2man autoconf git tar glib2 glib2-devel kernel-devel kernel-headers automake gcc
+
su -c "yum install -y libbsd-devel libbsd glibc-devel libX11-devel help2man autoconf git tar glib2 glib2-devel kernel-devel kernel-headers automake gcc"
 +
</pre>
  
 
You also need to install [http://www.virtualgl.org/VirtualGL VirtualGL]. Download the latest version for your arch at [http://www.virtualgl.org/Downloads/VirtualGL the VirtualGL download page]
 
You also need to install [http://www.virtualgl.org/VirtualGL VirtualGL]. Download the latest version for your arch at [http://www.virtualgl.org/Downloads/VirtualGL the VirtualGL download page]
Line 12: Line 13:
 
== Install Bumblebee ==
 
== Install Bumblebee ==
 
Download the latest source from github.
 
Download the latest source from github.
git clone https://github.com/Bumblebee-Project/Bumblebee.git
+
<pre>
cd Bumblebee
+
git clone https://github.com/Bumblebee-Project/Bumblebee.git
 +
cd Bumblebee
 +
</pre>
  
 
Create the install files.
 
Create the install files.
autoreconf -fi
+
<pre>
./configure --prefix=/opt/bumblebee
+
autoreconf -fi
make
+
./configure --prefix=/opt/bumblebee
 +
make
 +
</pre>
 +
 
 
Install it:
 
Install it:
sudo make install
+
<pre>
 +
su -c "make install"
 +
</pre>
 +
 
 
You will also need to create relevant users and groups:
 
You will also need to create relevant users and groups:
sudo groupadd bumblebee
+
<pre>
sudo usermod -a -G bumblebee $USER
+
su -
 +
groupadd bumblebee
 +
usermod -a -G bumblebee $USER
 +
</pre>
  
 
You can get help by running --help on either binaries.
 
You can get help by running --help on either binaries.
Line 30: Line 42:
 
If you want bumblebeed to start up on system boot, enable it in systemd:
 
If you want bumblebeed to start up on system boot, enable it in systemd:
  
sudo cp scripts/systemd/bumblebeed.service /lib/systemd/system/
+
<pre>
sudo systemctl enable bumblebeed.service
+
su -
 
+
cp scripts/systemd/bumblebeed.service /lib/systemd/system/
 +
systemctl enable bumblebeed.service
 +
</pre>
  
 
== Install bbswitch ==
 
== Install bbswitch ==
Line 38: Line 52:
  
 
Download the latest source from github.
 
Download the latest source from github.
git clone https://github.com/Bumblebee-Project/bbswitch.git
+
<pre>
 +
git clone https://github.com/Bumblebee-Project/bbswitch.git
 +
</pre>
  
 
=== without dkms ===
 
=== without dkms ===
cd bbswitch
+
 
 +
<pre>
 +
cd bbswitch
 +
</pre>
  
 
Create the install files and load in to the kernel.
 
Create the install files and load in to the kernel.
make
+
<pre>
sudo make load
+
make
 +
su -c "make load"
 +
</pre>
  
 
This obviously needs to be loaded into the kernel every time and rebuilt manually with every kernel update. If you don't want to do that, use the [[#with dkms]] section below instead
 
This obviously needs to be loaded into the kernel every time and rebuilt manually with every kernel update. If you don't want to do that, use the [[#with dkms]] section below instead
Line 51: Line 72:
 
=== with dkms ===
 
=== with dkms ===
 
Install dkms
 
Install dkms
sudo yum install dkms
+
<pre>
 +
su -c "yum install dkms"
 +
</pre>
  
 
Install bbswitch
 
Install bbswitch
BBSWITCHVERSION=$(grep MODULE_VERSION bbswitch/bbswitch.c|awk -F\" '{print $2}')
+
<pre>
sudo mv bbswitch /usr/src/bbswitch-$BBSWITCHVERSION
+
su -
sudo dkms add -m bbswitch -v $BBSWITCHVERSION
+
BBSWITCHVERSION=$(grep MODULE_VERSION bbswitch/bbswitch.c|awk -F\" '{print $2}')
sudo dkms build -m bbswitch -v $BBSWITCHVERSION
+
mv bbswitch /usr/src/bbswitch-$BBSWITCHVERSION
sudo dkms install -m bbswitch -v $BBSWITCHVERSION
+
dkms add -m bbswitch -v $BBSWITCHVERSION
 +
dkms build -m bbswitch -v $BBSWITCHVERSION
 +
dkms install -m bbswitch -v $BBSWITCHVERSION
 +
</pre>
  
 
== Usage ==
 
== Usage ==
 
Now to run bumblebee:
 
Now to run bumblebee:
sudo systemctl start bumblebeed.service
+
<pre>
/opt/bumblebee/bin/optirun -- <application>
+
su -c "systemctl start bumblebeed.service"
 +
</pre>
 +
 
 +
Run a command using the nvidia graphics card:
 +
<pre>
 +
/opt/bumblebee/bin/optirun -- <command>
 +
</pre>

Revision as of 14:59, 2 May 2012

Description

From Bumblebee's FAQ: Bumblebee is a effort to make Nvidia Optimus enabled laptops work in GNU/Linux systems. Such feature involves two graphics cards with two different power consumption profiles plugged in a layered way sharing a single framebuffer.

NOTE This guide explains how to get Nvidia Optimus working with the open source nouveau driver. Fedora does not support the proprietary Nvidia drivers. For information on how to use the proprietary Nvidia drivers with Bumblebee in Fedora 16 Click Here.

Install Dependencies

su -c "yum install -y libbsd-devel libbsd glibc-devel libX11-devel help2man autoconf git tar glib2 glib2-devel kernel-devel kernel-headers automake gcc"

You also need to install VirtualGL. Download the latest version for your arch at the VirtualGL download page

Install Bumblebee

Download the latest source from github.

git clone https://github.com/Bumblebee-Project/Bumblebee.git
cd Bumblebee

Create the install files.

autoreconf -fi
./configure --prefix=/opt/bumblebee
make

Install it:

su -c "make install"

You will also need to create relevant users and groups:

su -
groupadd bumblebee
usermod -a -G bumblebee $USER

You can get help by running --help on either binaries.

Enable bumblebee in systemd

If you want bumblebeed to start up on system boot, enable it in systemd:

su -
cp scripts/systemd/bumblebeed.service /lib/systemd/system/
systemctl enable bumblebeed.service

Install bbswitch

bbswitch is the kernel module responsible for turning on and off your nvidia card

Download the latest source from github.

git clone https://github.com/Bumblebee-Project/bbswitch.git

without dkms

cd bbswitch

Create the install files and load in to the kernel.

make
su -c "make load"

This obviously needs to be loaded into the kernel every time and rebuilt manually with every kernel update. If you don't want to do that, use the #with dkms section below instead

with dkms

Install dkms

su -c "yum install dkms"

Install bbswitch

su -
BBSWITCHVERSION=$(grep MODULE_VERSION bbswitch/bbswitch.c|awk -F\" '{print $2}')
mv bbswitch /usr/src/bbswitch-$BBSWITCHVERSION
dkms add -m bbswitch -v $BBSWITCHVERSION
dkms build -m bbswitch -v $BBSWITCHVERSION
dkms install -m bbswitch -v $BBSWITCHVERSION

Usage

Now to run bumblebee:

su -c "systemctl start bumblebeed.service"

Run a command using the nvidia graphics card:

/opt/bumblebee/bin/optirun -- <command>