28 Ekim 2012 Pazar

Fedora 18 Beta TC6 Nvidia Optimus

 Hello Everyone;

Today I want share my experience about Nvidia Optimus technology installing to F18 Beta RC6. For Installing I'm gonna use new Nvidia Graphics Cards Kepler Arch type that's mean I have Nvidia GTX 680M. Normally this GPU driver still not existed on F17 rpmfusion repository but on nvidia website you can install easily. My way gonna be rpmfusion akmod-nvidia.

Okey Let's begin the install !! :)

First rpmfusion repository and requiments packages.
su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-branched.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-branched.noarch.rpm'
Then update system (If you didn't do it.)
su -
yum update
reboot
Make sure you have latest kernel.
yum install -y libbsd-devel libbsd glibc-devel libX11-devel help2man autoconf git tar glib2 glib2-devel kernel-devel kernel-headers automake gcc gtk2-devel
yum install -y akmod-nvidia
yum install -y dkms
After installing akmod-nvidia, remove /etc/X11/xorg.conf, /etc/X11/xorg.conf.d/00-nvidia.conf and/etc/modprobe.d/blacklist-nouveau to continue using nouveau driver by default.

1. Get latest bumblebee sources (3.0.1) from

https://github.com/Bumblebee-Project/Bumblebee/downloads

2. Get latest bbswitch sources (0.5)

https://github.com/Bumblebee-Project/bbswitch/downloads

3. Compile bbswitch and install it with DKMS

From directory where you downloaded bbswitch:
tar xvzf bbswitch-0.5.tar.gz
sudo cp -Rv  bbswitch-0.5 /usr/src
ln -s /usr/src/bbswitch-0.5/dkms/dkms.conf /usr/src/bbswitch-0.5/dkms.conf
sudo dkms add -m bbswitch -v 0.5
sudo dkms build -m bbswitch -v 0.5
sudo dkms install -m bbswitch -v 0.5
4. install latest VirtualGL RPM via yum (Fedora 18 Released but VirtualGL package still under testing repository for that reason we will use testing repository and If you need 32 bit (It's for 64 bit users) you can install that too. )
yum install VirtualGL --enablerepo=updates-testing
yum install VirtualGL.i686 --enablerepo=updates-testing
5. Compile & install bumblebee
tar xvzf bumblebee-3.0.1.tar.gz
cd bumblebee-3.0.1
./configure --prefix=/usr --sysconfdir=/etc
make
sudo make install
sudo cp scripts/systemd/bumblebeed.service /lib/systemd/system
Edit /lib/systemd/system/bumblebeed.service line 7 to read:
ExecStart=/usr/sbin/bumblebeed --config /etc/bumblebee/bumblebee.conf
Edit /etc/bumblebee/bumblebee.conf and change:
Driver=nvidia
and in section [driver-nvidia]:
KernelDriver=nvidia
Edit /etc/bumblebee/xorg.conf.nvidia and add the following at the begining:
Section "Files"
   ModulePath   "/usr/lib64/xorg/nvidia"
   ModulePath   "/usr/lib64/xorg/modules"
EndSection
and the following at the end:

Section "Screen"
Identifier "Screen1"
Device "Device1"
EndSection
Create bumblebee group and add you to the group:
sudo groupadd bumblebee
sudo usermod -a -G bumblebee $USER
Enable and start bumblebeed service:
sudo systemctl enable bumblebeed.service
sudo systemctl start bumblebeed.service

 Thanks to the developers of Bumblebee Project.

Nvidia modules path fix (Thanks to Tomash Brechko)

This completely separates intel and nvidia stuff for main and bumblebee screens respectively. Note that it moves files originating from RPMs around, so repeating the fix will likely be required after next yum update. Here’s how it goes (under sudo):

1 “rm /etc/ld.so.conf.d/nvidia-lib64.conf; ldconfig” so that programs stop linking with nvidia libGL

2 “mv /usr/lib64/xorg/modules/extensions/nvidia /usr/lib64/xorg” so that Xorg on intel stops finding nvidia modules

3 in /etc/bumblebee/bumblebee.conf set “LibraryPath=/usr/lib64/nvidia” so that programs under optirun will link with nvidia libGL

4 in /etc/bumblebee/xorg.conf.nvidia change ModulePath from “/usr/lib64/xorg/modules/extensions/nvidia” (set per instructions above) to “/usr/lib64/xorg/nvidia” so that X on nvidia will find nvidia modules

5 reboot





Happy Nvidia Optimus using :))

Thank you 
Onuralp SEZER
Fedora Ambassadors