• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Noulakaz

Noulakaz

The blog of Avinash, Christina, Anya and Kyan Meetoo.

  • Home
  • About
  • People
    • Christina & Avinash Meetoo
    • Avinash Meetoo
    • Christina Meetoo
    • Anya Meetoo
    • Kyan Meetoo
  • General
    • News
    • Mauritius
    • Politics
    • Education
    • Business
    • Travel
  • Computing
    • Apple
    • Linux
    • LUGM
    • Programming
    • Web
    • Technology
    • Knowledge Seven
  • Entertainment
    • Music
    • Movies
    • Photography
    • Sports

Enabling Nvidia Optimus on CentOS Linux 6

29 July 2012 By Avinash Meetoo 10 Comments

I have just bought a new Dell Inspiron laptop, a N5110, and it has two graphics chipsets: one Nvidia GPU and an integrated Intel GPU. The Nvidia GPU is powerful and power-hungry. The Intel GPU is not that powerful (so forget about games) but requires much less power and, consequently, is much better to use on a laptop when not playing games (which I personally never do on this laptop). In theory, Nvidia Optimus technology allows the laptop to change from the Intel to the Nvidia GPU and vice-versa seamlessly… but this does not work out of the box on CentOS Linux 6 which is my preferred Linux distribution for serious work.

Here is how I made Nvidia Optimus work well enough on my laptop running CentOS Linux 6 64-bits (x86_64):

Enable the ELRepo repositories:

  • wget http://elrepo.org/linux/elrepo/el6/x86_64/RPMS/elrepo-release-6-4.el6.elrepo.noarch.rpm
  • yum localinstall elrepo-release-6-4.el6.elrepo.noarch.rpm

Install VirtualGL to allow full 3D acceleration in Linux:

  • wget http://sourceforge.net/projects/virtualgl/files/VirtualGL/2.3.1/VirtualGL-2.3.1.x86_64.rpm/download
  • yum localinstall VirtualGL-2.3.1.x86_64.rpm

Install Bumblebee to add support for Nvidia Optimus in Linux:

  • groupadd bumblebee
  • yum –enablerepo=elrepo-testing install bumblebee kmod-bbswitch
  • chkconfig bumlebeed on
  • service bumlebeed start

Once this is done, the laptop will start using the Intel GPU. The optirun command can then be used to switch to the Nvidia GPU on a ad-hoc basis (e.g. optirun glxgears -info)

Now I need to make my Synaptics trackpad work!

Filed Under: Linux, LUGM, Technology

Reader Interactions

Comments

  1. someguy says

    19 October 2012 at 01:31

    Now I need to make my Synaptics trackpad work!
    touchpad works with kernel 3.4 or 3.5
    yum -enablerepo=elrepo-kernel install kernel-ml
    on boot choose the new kernel cause its not default you need to edit /boot/grub/grub.conf to make it default.
    reboot and than SYSTEM —> PREFERENCE —> MOUSE config :-)

  2. Avinash Meetoo says

    19 October 2012 at 07:14

    Thanks! I’ll give that a try.

    Do you know how to do that on Fedora 17?

  3. 4hr1m4n says

    4 November 2012 at 05:51

    If, besides using NVIDIA discrete GPU, you also want to use your Intel integrated GPU to run OpenGL/Mesa 3D apps (compiz?) you will need to do a few extra tweaks. I managed to make both GPUs (Intel and NVIDIA) work and if you are interested please take a look at https://www.centos.org/modules/newbb/viewtopic.php?topic_id=39948
    Suggestions are welcome. ;)

  4. Aohui says

    20 October 2013 at 19:32

    i follow your instructions
    –$ sudo service bumblebeed start
    but there is something wrong like:
    –FATAL: Error inserting bbswitch (/lib/modules/2.6.32-279.el6.i686/weak-updates/bbswitch/bbswitch.ko): No such device
    can you give me some help ? thanks

  5. wah says

    21 October 2013 at 04:39

    i still have some problems
    there are something output from my laptop:

    [wah@wah ~]$ sudo bumblebeed -vv
    [ 1169.971064] [DEBUG]Found card: 01:00.0 (discrete)
    [ 1169.971082] [DEBUG]Found card: 00:02.0 (integrated)
    [ 1169.971087] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
    [ 1169.971468] [DEBUG]Detected nouveau driver
    [ 1169.971605] [INFO]Loading driver bbswitch (module bbswitch)

    [ 1169.971683] [DEBUG]Process modprobe started, PID 6261.
    FATAL: Error inserting bbswitch (/lib/modules/2.6.32-279.el6.i686/weak-updates/bbswitch/bbswitch.ko): No such device
    [ 1169.976471] [DEBUG]Process with PID 6261 returned code 1
    [ 1169.976728] [ERROR]Module bbswitch could not be loaded (timeout?)
    [ 1169.976754] [DEBUG]bbswitch is not available, perhaps you need to insmod it?

    [ 1169.976766] [INFO]Skipping switcheroo PM method because it is not explicitly selected in the configuration.
    [ 1169.976778] [WARN]No switching method available. The dedicated card will always be on.
    [ 1169.976790] [DEBUG]Active configuration:
    [ 1169.976800] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
    [ 1169.976810] [DEBUG] X display: :8
    [ 1169.976820] [DEBUG] LD_LIBRARY_PATH:
    [ 1169.976831] [DEBUG] Socket path: /var/run/bumblebee.socket
    [ 1169.976841] [DEBUG] pidfile: /var/run/bumblebeed.pid
    [ 1169.976851] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.nouveau
    [ 1169.976862] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d
    [ 1169.976872] [DEBUG] ModulePath:
    [ 1169.976882] [DEBUG] GID name: bumblebee
    [ 1169.976892] [DEBUG] Power method: auto
    [ 1169.976903] [DEBUG] Stop X on exit: 1
    [ 1169.976913] [DEBUG] Driver: nouveau
    [ 1169.976923] [DEBUG] Driver module: nouveau
    [ 1169.976933] [DEBUG] Card shutdown state: 1
    [ 1169.977172] [DEBUG]Process /sbin/modprobe started, PID 6262.
    [ 1169.977204] [DEBUG]Hiding stderr for execution of /sbin/modprobe
    [ 1169.978526] [DEBUG]SIGCHILD received, but wait failed with No child processes
    [ 1169.978562] [DEBUG]Configuration test passed.
    [ 1169.978652] [ERROR]Daemon already running, pid 2369

    could you give me some suggestions?

  6. Avinash Meetoo says

    21 October 2013 at 05:42

    Hi,

    What happens when you run the following as root:

    modprobe bbswitch

    Can you insert the module in the running kernel? Any error message? If this succeeds, what does the following give you:

    cat /proc/acpi/bbswitch

  7. wah says

    21 October 2013 at 09:32

    Hi.friends
    There are something wrong:
    [wah@wah ~]$ sudo modprobe bbswitch
    FATAL: Error inserting bbswitch (/lib/modules/2.6.32-279.el6.i686/weak-updates/bbswitch/bbswitch.ko): No such device
    Even worse,there is no /proc/acpi/bbswitch.
    I feel a little depressed. Could you give me any more suggestions? Thanks

  8. wah says

    21 October 2013 at 09:39

    I am a new Linuxer
    there are something you can look:
    [wah@wah ~]$ modinfo bbswitch
    filename: /lib/modules/2.6.32-279.el6.i686/weak-updates/bbswitch/bbswitch.ko
    version: 0.5
    author: Peter Lekensteyn
    description: Toggle the discrete graphics card
    license: GPL
    srcversion: 18367AFEEC1C6096EB50900
    depends:
    vermagic: 2.6.32-358.el6.i686 SMP mod_unload modversions 686
    parm: load_state:Initial card state (0 = off, 1 = on, -1 = unchanged) (int)
    parm: unload_state:Card state on unload (0 = off, 1 = on, -1 = unchanged) (int)

  9. wah says

    21 October 2013 at 09:44

    In the /var/log/messages,there are something:
    Oct 21 21:42:01 wah kernel: bbswitch: version 0.5
    Oct 21 21:42:01 wah kernel: bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
    Oct 21 21:42:01 wah kernel: bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.VGA_
    Oct 21 21:42:01 wah kernel: bbswitch: No suitable _DSM call found.
    what does “No suitable _DSM call found” means?

  10. Avinash Meetoo says

    21 October 2013 at 18:55

    According to some bug reports on the Bumblebee website (see this for example), this is because the open-source Nvidia driver (nouveau) does not support the Nvidia graphics chipset found in your computer (yet). The solution seems to (1) use the closed-source Nvidia driver (nvidia) and (2) make sure you use the latest versions of Bumblebee and bbswitch. Then, in principle, everything should be all right.

    Hopefully.

Leave a Reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Our Personal Websites

Avinash Meetoo
Christina Meetoo
Anya Meetoo
Kyan Meetoo

Related Posts

  • Using jigdo to rebuild a Linux ISO image
  • My top posts of 2012
  • Livebox + Wi-Fi + Kubuntu Linux AMD64 = Bliss ;-)
  • Libreoffice with Flatpak: Adding dictionaries for other languages

Random Posts

  • Collected online resources
  • A magnificent quote
  • Vacation in Bangkok and Kuala Lumpur
  • What does it mean to be Mauritian?

Archives

  • June 2025 (1)
  • May 2025 (3)
  • April 2025 (4)
  • January 2025 (3)
  • December 2024 (2)
  • November 2024 (2)
  • October 2024 (3)
  • September 2024 (7)
  • August 2024 (1)
  • July 2024 (1)
  • June 2024 (2)
  • May 2024 (3)
  • January 2024 (2)
  • December 2023 (1)
  • October 2023 (1)
  • September 2023 (4)
  • August 2023 (3)
  • July 2023 (1)
  • June 2023 (4)
  • May 2023 (1)
  • April 2023 (1)
  • March 2023 (5)
  • February 2023 (1)
  • December 2022 (1)
  • November 2022 (1)
  • October 2022 (4)
  • August 2022 (4)
  • July 2022 (3)
  • June 2022 (5)
  • May 2022 (5)
  • January 2022 (3)
  • December 2021 (2)
  • November 2021 (1)
  • October 2021 (1)
  • September 2021 (4)
  • August 2021 (2)
  • July 2021 (14)
  • May 2021 (2)
  • April 2021 (4)
  • March 2021 (9)
  • February 2021 (2)
  • January 2021 (1)
  • October 2020 (1)
  • September 2020 (1)
  • August 2020 (2)
  • July 2020 (5)
  • June 2020 (3)
  • May 2020 (5)
  • April 2020 (6)
  • March 2020 (2)
  • February 2020 (2)
  • January 2020 (2)
  • October 2019 (1)
  • September 2019 (2)
  • July 2019 (2)
  • June 2019 (1)
  • May 2019 (3)
  • April 2019 (2)
  • March 2019 (1)
  • February 2019 (1)
  • January 2019 (3)
  • December 2018 (1)
  • October 2018 (3)
  • August 2018 (2)
  • July 2018 (2)
  • June 2018 (1)
  • May 2018 (2)
  • April 2018 (1)
  • February 2018 (1)
  • December 2017 (1)
  • October 2017 (1)
  • September 2017 (1)
  • August 2017 (1)
  • July 2017 (1)
  • May 2017 (4)
  • April 2017 (3)
  • March 2017 (4)
  • February 2017 (5)
  • January 2017 (3)
  • October 2016 (1)
  • September 2016 (1)
  • August 2016 (4)
  • July 2016 (1)
  • June 2016 (1)
  • March 2016 (3)
  • February 2016 (3)
  • January 2016 (1)
  • December 2015 (1)
  • November 2015 (2)
  • September 2015 (1)
  • August 2015 (3)
  • March 2015 (1)
  • December 2014 (1)
  • November 2014 (4)
  • October 2014 (1)
  • March 2014 (2)
  • February 2014 (3)
  • December 2013 (1)
  • October 2013 (1)
  • September 2013 (1)
  • August 2013 (1)
  • July 2013 (1)
  • June 2013 (2)
  • May 2013 (1)
  • March 2013 (3)
  • January 2013 (2)
  • December 2012 (3)
  • November 2012 (4)
  • September 2012 (3)
  • August 2012 (2)
  • July 2012 (3)
  • June 2012 (2)
  • May 2012 (1)
  • April 2012 (2)
  • February 2012 (1)
  • January 2012 (4)
  • December 2011 (2)
  • November 2011 (1)
  • October 2011 (4)
  • September 2011 (2)
  • August 2011 (1)
  • July 2011 (2)
  • June 2011 (4)
  • April 2011 (7)
  • March 2011 (2)
  • February 2011 (1)
  • January 2011 (3)
  • November 2010 (3)
  • October 2010 (1)
  • September 2010 (2)
  • August 2010 (4)
  • July 2010 (2)
  • June 2010 (1)
  • May 2010 (3)
  • April 2010 (4)
  • March 2010 (3)
  • February 2010 (3)
  • January 2010 (5)
  • December 2009 (2)
  • November 2009 (3)
  • October 2009 (1)
  • September 2009 (5)
  • August 2009 (3)
  • July 2009 (1)
  • June 2009 (3)
  • May 2009 (2)
  • April 2009 (7)
  • March 2009 (12)
  • February 2009 (10)
  • January 2009 (5)
  • December 2008 (4)
  • November 2008 (11)
  • October 2008 (6)
  • September 2008 (7)
  • August 2008 (3)
  • July 2008 (8)
  • June 2008 (6)
  • May 2008 (5)
  • April 2008 (7)
  • March 2008 (6)
  • February 2008 (3)
  • January 2008 (6)
  • December 2007 (11)
  • November 2007 (10)
  • October 2007 (7)
  • September 2007 (9)
  • August 2007 (3)
  • July 2007 (7)
  • June 2007 (8)
  • May 2007 (14)
  • April 2007 (11)
  • March 2007 (18)
  • February 2007 (14)
  • January 2007 (15)
  • December 2006 (16)
  • November 2006 (10)
  • October 2006 (7)
  • September 2006 (8)
  • August 2006 (8)
  • July 2006 (6)
  • June 2006 (4)
  • May 2006 (13)
  • April 2006 (10)
  • March 2006 (11)
  • February 2006 (7)
  • January 2006 (14)
  • December 2005 (8)
  • November 2005 (6)
  • October 2005 (7)
  • September 2005 (2)
  • August 2005 (6)
  • July 2005 (2)
  • June 2005 (6)
  • May 2005 (15)
  • April 2005 (12)
  • March 2005 (3)
  • February 2005 (8)
  • January 2005 (3)
  • December 2004 (1)
  • November 2004 (2)
  • October 2004 (2)
  • September 2004 (3)
  • August 2004 (3)
  • July 2004 (3)
  • June 2004 (3)
  • May 2004 (6)
  • April 2004 (10)
  • March 2004 (12)
Creative Commons License This work is licensed by Avinash Meetoo under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Unported License.