Login
September 17, 2014, 03:29:30 AMLatest Member: JarrettPeaw

Author Topic: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm and Primus)  (Read 22225 times)

0 Members and 1 Guest are viewing this topic.

Offline Viger

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 4
    • View Profile
  • OS: Fedora 20
If in your notebook is it impossible to turn Intel Graphics / Optimus off in the BIOS then try this procedure for install nvidia driver:

1) First uninstall nvidia driver if installed in fedora 17 from rpmfusion (akmod-nvidia, kmod-nvidia,kmod-nvidia-PAE...) or manual installation  (bumblebee 3.0 script install new nvidia driver)

2)  blacklist nouveau in /etc/modprobe.d/blacklist.conf

3)   move old initramfs

     
Code: Bash
  1.  mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img

4) recreate initramfs without nouveau

     
Code: Bash
  1.  dracut /boot/initramfs-$(uname -r).img $(uname -r)

5) From http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/fedora17/x86_64  (for 64 bit) install
VirtualGL, bbswitch ,bumblebee,primus rpm ( and  acpi-handle-hack rpm, only for Lenovo ideapad Y470/Y480/Y570/Y580 or  Toshiba Satellite P870 )


6)  On fedora 17, type this command as root:

 
Code: Bash
  1.  yum -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree/fedora17/noarch/bumblebee-nonfree-release-1.0-1.noarch.rpm

(from tutorial  http://techies.ncsu.edu/wiki/bumblebee-nvidia )

7) Install bumblebee-nvidia rpm from yum (or yumex)

8 ) Reboot pc, now bumblebee-nvidia script compile nvidia driver for kernel in use.

9)Now optimus is ok

10) Usage (from tutorial https://wiki.archlinux.org/index.php/Bumblebee )

The command line programm optirun shipped with bumblebee is your best friend for running applications on your Optimus NVIDIA card.

Test Bumblebee if it works with your Optimus system:

 
Code: Bash
  1. $ optirun glxgears

If it succeeds and the terminal you are running from mentions something about your NVIDIA - Optimus with Bumblebee is working!

General Usage:

 
Code: Bash
  1. $ optirun [options] <application> [application-parameters]

Some Examples:

Start Firefox accelerated with Optimus:

 
Code: Bash
  1. $ optirun firefox

Start Windows applications with Optimus:

 
Code: Bash
  1. $ optirun wine <windows application>.exe

Use NVIDIA Settings with Optimus:

 
Code: Bash
  1. $ optirun nvidia-settings -c :8

For a list of options for optirun run:

 
Code: Bash
  1. $ optirun --help

11) Configuration

You can configure the behaviour of Bumblebee to fit your needs. Fine tuning like speed optimization, power managment and other stuff can be configured in /etc/bumblebee/bumblebee.conf

12) Optimizing Speed

Bumblebee renders frames for your Optimus NVIDIA card in an invisible X Server with VirtualGL and transports them back to your visible X Server.

Frames will be compressed before they are transported - this saves bandwith and can be used for speedup optimization of bumblebee:

To use an other compression method for a single application:

 
Code: Bash
  1.  $ optirun -c <compress-method> application

The method of compres will affect performance in the GPU/GPU usage. Compressed methods (such as jpeg) will load the CPU the most but will load GPU the minimum necessary; uncompressed methods loads the most on GPU and the CPU will have the minimum load possible.

Compressed Methods are: jpeg, rgb, yuv

Uncompressed Methods are: proxy, xv

To use a standard compression for all applications set the VGLTransport to <compress-method> in /etc/bumblebee/bumblebee.conf

/etc/bumblebee/bumblebee.conf

...
[optirun]
VGLTransport=proxy
...

Note: CPU frequency scaling will affect directly on render performance

13) kernel upgrade with bumblebee

Bumblebee-nvidia script compile nvidia kernel module for new kernel. Is not necessary reinstall bumblebee for kernel upgrade

14) Bumblebee FAQ (from https://github.com/Bumblebee-Project/Bumblebee/wiki/FAQ )

Why do I get a much lower FPS with optirun glxgears in comparison with just glxgears?

Because glxgears is not a benchmarking tool. Try optirun glxspheres instead. For improving the FPS, you could try other transport methods for now, e.g. optirun -c yuv glxspheres. Consult the manual page of optirun for all options. If you get an error mumbling about RGB, pbuffers or NV-GLX, you have likely messed up the installation of the proprietary driver (i.e. nvidia).

15) The Future:  Bumblebee-Project + Primus

Primus, developed by Alexander Monakov, brings better performance and less power consumption when using Bumblebee, by replacing VirtualGL (might be integrated into Bumblebee in the future)

Advantages

- Less overhead (better framerates) and cleaner solution (no networking or compression involved at all)
- Only uses/starts secondary GPU for OpenGL parts of applications - everything else remains on your main GPU  (power savings)
- Fixes the "bug" that causes Bumblebee to shut down the GPU too early sometimes

How it works

Bumblebee uses VirtualGL to copy the image generated by the second (faster) GPU to your display. VirtualGL was intended for use over a network though, so it takes a great many steps to enable this (compression, sending the image over a network link, decompression, etc).

Primus doesn't perform all these "extra" steps, instead taking a more direct route (copying the rendered image in memory to the other GPU, then displaying there). In theory this should get you better performance as well as better compatibility. Running applications will "see" the OpenGL implementation of your real hardware, nothing virtual is presented to them.

Performance

Bumblebee-Project

Code: Bash
  1.  $ optirun glxspheres

60.826453 frames/sec - 67.882321 Mpixels/sec

Code: Bash
  1.  $  vblank_mode=0 optirun glxspheres

139.898553 frames/sec - 156.126785 Mpixels/sec


Primus 

Code: Bash
  1.  $ vblank_mode=0 primusrun glxspheres

290.799630 frames/sec - 324.532388 Mpixels/sec


Manual Installation and faq

If primus rpm does not work then uninstall and performs a manual Installation
You can install it separately AFTER bumblebee

From https://github.com/amonakov/primus

download, build from source and install then use the included primusrun script instead of optirun.
Keep your bumblebee daemon/settings as they have been for optirun, no need to change anything - just replace "optirun" by "primusrun".

« Last Edit: February 19, 2013, 04:46:31 PM by Viger »

Offline JR

  • Administrator
  • *****
  • Posts: 146
  • Karma: 4
    • View Profile
    • If Not True Then False
  • OS: Fedora / CentOS / RHEL / Debian
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm)
« Reply #1 on: August 13, 2012, 05:52:23 PM »
Really nice guide!

Thanks Viger!  ;)

Offline chiconumb

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
  • OS: Fedora 17 x64
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm)
« Reply #2 on: August 23, 2012, 03:20:54 PM »
Hey man, everything works fine, but when I do: optirun glxgears, i got just 1000 frames, it's too low isn't ??


Offline Viger

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 4
    • View Profile
  • OS: Fedora 20
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm)
« Reply #3 on: August 28, 2012, 08:21:09 PM »
Hey man, everything works fine, but when I do: optirun glxgears, i got just 1000 frames, it's too low isn't ??

Hi chiconumb, i have updated my tutorial, see if helps you.

Offline scoop

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
  • OS: Fedora 17
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm)
« Reply #4 on: November 13, 2012, 09:20:09 PM »
after an update two days ago, i cannot get out of gnome 3 fallback mode. im not on my laptop to check but i can post any log files that can help you.

glxinfo says no library
optirun glxgears says no bumblebee service.
starting the bumblebee service does nothing.

Offline Viger

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 4
    • View Profile
  • OS: Fedora 20
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm)
« Reply #5 on: November 16, 2012, 11:10:23 PM »
after an update two days ago, i cannot get out of gnome 3 fallback mode. im not on my laptop to check but i can post any log files that can help you.

glxinfo says no library
optirun glxgears says no bumblebee service.
starting the bumblebee service does nothing.
Hi Scoop, try new release (14-Nov-2012) of bumblebee-nvidia driver here:
http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree/fedora17/x86_64/
Install rpm from yum update (or yumex).

Offline scoop

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
  • OS: Fedora 17
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm and Primus)
« Reply #6 on: November 27, 2012, 12:47:48 AM »
optirun works now, but glxinfo still gives

glxinfo
glxinfo: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

also, it still will only boot into fallback mode

Offline Viger

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 4
    • View Profile
  • OS: Fedora 20
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm and Primus)
« Reply #7 on: November 27, 2012, 11:57:53 PM »
optirun works now, but glxinfo still gives

glxinfo
glxinfo: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

also, it still will only boot into fallback mode

Hi scoop then try:

Code: Bash
  1.  $ locate libGL.so

and remove the libGL.so* files from /usr/lib and /usr/lib64.

Rebuild the dynamic library index with ldconfig: now glxgears and glxinfo link the correct libGL.so from  /usr/lib64/nvidia.
You can verify that the system is linking to the correct library with:

Code: Bash
  1.  $ ldd /usr/bin/glxinfo
« Last Edit: November 28, 2012, 12:04:42 AM by Viger »

Offline scoop

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
  • OS: Fedora 17
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm and Primus)
« Reply #8 on: November 28, 2012, 07:40:58 AM »
not sure how to do that

i did ldconfig -v

but when i do ldd /usr/bin/glxinfo
i get

scoop@localhost ~$ ldd /usr/bin/glxinfo
   linux-vdso.so.1 =>  (0x00007fffd85ff000)
   libGLEW.so.1.6 => not found
   libGLU.so.1 => not found
   libGL.so.1 => not found
   libm.so.6 => /lib64/libm.so.6 (0x0000003e34c00000)
   libX11.so.6 => /lib64/libX11.so.6 (0x0000003e37c00000)
   libXext.so.6 => /lib64/libXext.so.6 (0x0000003e38000000)
   libc.so.6 => /lib64/libc.so.6 (0x0000003e33800000)
   libxcb.so.1 => /lib64/libxcb.so.1 (0x0000003e37400000)
   libdl.so.2 => /lib64/libdl.so.2 (0x0000003e34000000)
   /lib64/ld-linux-x86-64.so.2 (0x0000003e33400000)
   libXau.so.6 => /lib64/libXau.so.6 (0x0000003e37800000)

Offline Viger

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 4
    • View Profile
  • OS: Fedora 20
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm and Primus)
« Reply #9 on: November 28, 2012, 10:37:12 AM »
not sure how to do that

i did ldconfig -v

but when i do ldd /usr/bin/glxinfo
i get

scoop@localhost ~$ ldd /usr/bin/glxinfo
   linux-vdso.so.1 =>  (0x00007fffd85ff000)
   libGLEW.so.1.6 => not found
   libGLU.so.1 => not found
   libGL.so.1 => not found
   libm.so.6 => /lib64/libm.so.6 (0x0000003e34c00000)
   libX11.so.6 => /lib64/libX11.so.6 (0x0000003e37c00000)
   libXext.so.6 => /lib64/libXext.so.6 (0x0000003e38000000)
   libc.so.6 => /lib64/libc.so.6 (0x0000003e33800000)
   libxcb.so.1 => /lib64/libxcb.so.1 (0x0000003e37400000)
   libdl.so.2 => /lib64/libdl.so.2 (0x0000003e34000000)
   /lib64/ld-linux-x86-64.so.2 (0x0000003e33400000)
   libXau.so.6 => /lib64/libXau.so.6 (0x0000003e37800000)

Ok, then try for 64bit:

 
Code: Bash
  1.  # ln -s /usr/lib64/libGL.so.1.2  /usr/lib64/libGL.so.1
Code: Bash
  1.  # ln -s /usr/lib64/libGLEW.so.1.6.0   /usr/lib64/libGLEW.so.1.6
Code: Bash
  1.  # ln -s /usr/lib64/libGLU.so.1.3.08003  /usr/lib64/libGLU.so.1

Offline scoop

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
  • OS: Fedora 17
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm and Primus)
« Reply #10 on: November 28, 2012, 06:35:06 PM »
scoop@localhost ~$ glxinfo
glxinfo: error while loading shared libraries: libGLEW.so.1.6: cannot open shared object file: No such file or directory

Offline Viger

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 4
    • View Profile
  • OS: Fedora 20
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm and Primus)
« Reply #11 on: November 28, 2012, 09:07:39 PM »
scoop@localhost ~$ glxinfo
glxinfo: error while loading shared libraries: libGLEW.so.1.6: cannot open shared object file: No such file or directory

Which version of libGLEW you have?

Offline scoop

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
  • OS: Fedora 17
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm and Primus)
« Reply #12 on: November 28, 2012, 10:19:16 PM »
/usr/share/doc/libGLEW-1.6.0
/usr/share/doc/libGLEW-1.6.0/LICENSE.txt

Offline Viger

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 4
    • View Profile
  • OS: Fedora 20
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm and Primus)
« Reply #13 on: November 29, 2012, 02:41:44 PM »
/usr/share/doc/libGLEW-1.6.0
/usr/share/doc/libGLEW-1.6.0/LICENSE.txt

Then try:

1) reinstall libGLEW
2) if you have problem, do full reinstallation: VirtualGL, acpi-handle-hack, bbswitch ,bumblebee, bumblebee-nvidia rpm

Otherwise wait new version of bumblebee and bumblebee-nvidia :perhaps your pc is not completely supported.

Offline scoop

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
  • OS: Fedora 17
Re: Fedora 17 for NVIDIA Optimus users (with Bumblebee 3.0 rpm and Primus)
« Reply #14 on: November 30, 2012, 01:27:32 AM »
the strange thing is that it worked perfectly until i ran a yum update. then it started in fall back mode and i cant recover.

whats the best way to full reinstall?

remove all the components, and then reboot and reinstall all of em?

 

Register