[Solved] How to setup nVidia NVS Optimus drivers in CentOS 7

Issues related to hardware problems
Post Reply
User avatar
Fufu
Posts: 16
Joined: 2014/07/08 09:35:44

[Solved] How to setup nVidia NVS Optimus drivers in CentOS 7

Post by Fufu » 2014/07/08 09:51:30

00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF119M [NVS 4200M] [10de:1056] (rev a1)

abrt-addon-kerneloops-2.1.11-12.el7.centos.x86_64
kernel-3.10.0-123.el7.x86_64
kernel-tools-3.10.0-123.el7.x86_64
kernel-tools-libs-3.10.0-123.el7.x86_64
3.10.0-123.el7.x86_64
nouveau 974305 1
mxm_wmi 13021 1 nouveau
wmi 19070 2 mxm_wmi,nouveau
i2c_algo_bit 13413 2 i915,nouveau
ttm 83948 1 nouveau
drm_kms_helper 52758 2 i915,nouveau
drm 297829 6 ttm,i915,drm_kms_helper,nouveau
i2c_core 40325 7 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit,nouveau,videodev
video 19267 2 i915,nouveau
cat: /etc/X11/xorg.conf: No such file or directory
cat: lspci: No such file or directory

I have tried following these steps here:
http://www.tecmint.com/install-nvidia-drivers-in-linux/

However, yum groupinstall "Development Tools" throws a could not resolve host error.

Where can I find the "Development Tools" package listed on http://mirror.centos.org/centos/7/os/x86_64/Packages/

Change thread title from: [Solved] Enable dedicated nVidia NVS 4200M
Last edited by Fufu on 2014/07/17 06:55:29, edited 3 times in total.
KDE | 3.10.0-123.4.2.el7.x86_64 | Fujitsu T901 | nVidia NVS 4200M | Intel i7-2640M 2.8GHz | 16GB | SSD
CentOS 7: Step-by-step solution for nVidia NVS Optimus drivers

wenzhuo
Posts: 6
Joined: 2014/07/14 10:18:52

Re: Enable dedicated nVidia NVS 4200M

Post by wenzhuo » 2014/07/14 10:37:26

Follow the instructions here: http://elrepo.org/tiki/bumblebee

Note: You'll have to change the XorgModulePath option in the [driver-nvidia] section of /etc/bumblebee/bumblebee.conf to "/usr/lib64/xorg/modules/extensions/nvidia,/usr/lib64/xorg/modules", because the libglx module of the latest nvidia-x11-drv package has moved to the new location, and the directory specified in the tutorial, /usr/lib64/xorg/nvidia, is no longer there.

Code: Select all

XorgModulePath=/usr/lib64/xorg/modules/extensions/nvidia,/usr/lib64/xorg/modules
Compare the results of the following two commands to confirm that bumblebee is working:

Code: Select all

$ glxgears
$ optirun glxgears

To get a list of the rpm packages of the "Development Tools" group, just type:

Code: Select all

yum groupinfo "Development Tools"

User avatar
Fufu
Posts: 16
Joined: 2014/07/08 09:35:44

Re: Enable dedicated nVidia NVS 4200M

Post by Fufu » 2014/07/17 06:28:30

WARNING! This might not be the most efficient solution, but this works.

謝謝 @wenzhuo! (Thank You)

Open terminal and access root

Code: Select all

su
Update yum

Code: Select all

yum update
Install "Developer Tools" for building:

Code: Select all

yum groupinfo "Developer Tools"
yum groupinstall "Developer Tools"
Import the ElRepo public key:

Code: Select all

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
Detailed info on the GPG key used by the ELRepo Project can be found on:
https://www.elrepo.org/tiki/key (external link)

To install ELRepo for RHEL-7, SL-7 or CentOS-7:

Code: Select all

rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm 
Install Fastest Mirror

Code: Select all

yum install yum-plugin-fastestmirror
bumblebee cannot install without libbsd packages.

Navigate to get the libbsd and kmod-bbswitch RPMs from here:
http://elrepo.org/tiki/Download (external link)

Find the directory:

Code: Select all

elrepo/el7/x86_64/RPMS/
Download:
libbsd-0.6.0-3.el7.elrepo.x86_64.rpm
libbsd-devel-0.6.0-3.el7.elrepo.x86_64.rpm
libbsd-ctor-static-0.6.0-3.el7.elrepo.x86_64.rpm
kmod-bbswitch-0.5-2.el7.elrepo.x86_64.rpm


Find the directory:

Code: Select all

extras/el7/x86_64/RPMS/
Download:
elrepo-release-7.0-2.el7.elrepo.noarch.rpm

Open Terminal/Konsole then navigate to the directory where the downloads are

Install packages:

Code: Select all

rpm -ivh libbsd-0.6.0-3.el7.elrepo.x86_64.rpm
rpm -ivh libbsd-devel-0.6.0-3.el7.elrepo.x86_64.rpm
rpm -ivh libbsd-ctor-static-0.6.0-3.el7.elrepo.x86_64.rpm
Step looks redundant, but the package releases the bumblebee properly.

Code: Select all

rpm -ivh elrepo-release-7.0-2.el7.elrepo.noarch.rpm
rpm -ivh kmod-bbswitch-0.5-2.el7.elrepo.x86_64.rpm
yum install bumblebee
The bumblebee group might be different than shown. Take note.

Code: Select all

grep bumblebee /etc/group
bumblebee:x:1001:

Add user to the bumblebee group

usermod -a -G bumblebee fufu

id fufu
uid=1000(fufu) gid=1000(fufu) groups=1000(fufu),1001(bumblebee)
login to root and modify /etc/bumblebee/bumblebee.conf file to check these lines before rebooting:

Code: Select all

[bumblebeed]
VirtualDisplay=:8
KeepUnusedXServer=false
ServerGroup=bumblebee
TurnCardOffAtExit=false
NoEcoModeOverride=false
Driver=nvidia
XorgConfDir=/etc/bumblebee/xorg.conf.d

[optirun]
Bridge=auto
VGLTransport=proxy
PrimusLibraryPath=/usr/lib/primus:/usr/lib32/primus
AllowFallbackToIGC=false

[driver-nvidia]
KernelDriver=nvidia
PMMethod=bbswitch
LibraryPath=/usr/lib64/nvidia:/usr/lib64/vdpau:/usr/lib/nvidia:/usr/lib/vdpau
XorgModulePath=/usr/lib64/xorg/modules/extensions/nvidia,/usr/lib64/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

[driver-nouveau]
KernelDriver=nouveau
PMMethod=auto
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
DOUBLE CHECK! Before rebooting.
Speaking from experience. :oops:

Open Konsole and type:

Code: Select all

reboot
Test in konsole/terminal to see if Bumblebee installed correctly:

Code: Select all

glxgears
optirun glxgears
Both animations (moving gears) should of appeared.

Complete!

Build Info: KDE | 3.10.0-123.4.2.el7.x86_64 | Fujitsu Lifebook T901Tablet PC | nVidia NVS 4200M | Intel i7-2640M 2.8GHz | 16GB | SSD
KDE | 3.10.0-123.4.2.el7.x86_64 | Fujitsu T901 | nVidia NVS 4200M | Intel i7-2640M 2.8GHz | 16GB | SSD
CentOS 7: Step-by-step solution for nVidia NVS Optimus drivers

wenzhuo
Posts: 6
Joined: 2014/07/14 10:18:52

Re: [Solved] How to setup nVidia NVS Optimus drivers in Cent

Post by wenzhuo » 2014/07/24 01:41:32

@fufu 不客气!

However, I don't think you had to install any dependencies manually. yum can take care of it. Also, you don't have to install Development Tools, 'cause you're not compiling anything. The nvidia drivers packaged by elrepo are pre-compiled binaries.

wenzhuo
Posts: 6
Joined: 2014/07/14 10:18:52

Re: [Solved] How to setup nVidia NVS Optimus drivers in Cent

Post by wenzhuo » 2014/07/24 01:51:35

Just type the following two commands and you're ready to go forward with configuring bumblebee:

Code: Select all

# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
# yum install bumblebee

cecca89
Posts: 4
Joined: 2014/10/18 17:16:49

Re: [Solved] How to setup nVidia NVS Optimus drivers in Cent

Post by cecca89 » 2014/10/18 17:27:07

Hello guys,
I've followed the ELRepo guide and everything went well. But now I cannot use my HDMI anymore. Do you have any ideas about this?
I'm using CentOS 7 on a Sandybridge I7. My hardware is:

Code: Select all

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GF116M [GeForce GT 555M/635M] (rev a1)
Thank you all

Post Reply

Return to “CentOS 7 - Hardware Support”