Using integrated graphics card for display and Nvidia card for GPU

Issues related to applications and software problems
Post Reply
johnnyA
Posts: 6
Joined: 2017/03/21 14:39:59

Using integrated graphics card for display and Nvidia card for GPU

Post by johnnyA » 2017/03/21 15:02:18

Hi all,
I have a desktop PC with an integrated intel hd graphics card and nvidia X titan pascal graphics card.
After installing a fresh copy of centos 7 on my PC, I've installed CUDA developer kit 8 and cudnn. I didn't reboot after the installation and while I was able to use the GPU on the nvidia card while using the integrated graphics card for display.
After reboot I can't get the integrated graphics card to display.
I tried changing the settings in the bios and going by the solutions presented here:
http://blog.mdda.net/oss/2016/11/28/int ... g-and-xorg
and here (last msg) https://centos.org/forums/viewtopic.php?f=49&t=58116
But nothing worked.
Did anyone run into something similar?

chemal
Posts: 776
Joined: 2013/12/08 19:44:49

Re: Using integrated graphics card for display and Nvidia card for GPU

Post by chemal » 2017/03/21 20:43:36

I would do it like this:

0) Start from a clean system. Not something that is already broken by using Nvidia's installers.

1) Make sure the intel thing is the primary adapter in the BIOS.

2) Install Nvidia drivers from elrepo, because they don't overwrite anything. You will need the system's libGL and Xorg's libglx for the intel GPU. Then remove the two lines from /etc/ld.so.conf.d/nvidia.conf to disable Nvidia's libGL. Finally change /etc/X11/xorg.conf so that only Intel's X11 driver is loaded. Also make sure that X11's libglx is loaded, not Nvidia's. Now check that everything works as expected.

3) Install the CUDA SDK from the .run file, but do not install the copy of Nvidia's driver included in the SDK. We already have this driver and the Nvidia installer will overwrite system components still needed.

johnnyA
Posts: 6
Joined: 2017/03/21 14:39:59

Re: Using integrated graphics card for display and Nvidia card for GPU

Post by johnnyA » 2017/03/22 11:33:15

Thanks!
OK, so I installed a fresh centos 7 and installed the nvidia drivers from elrepo.
I have two problems:
1) The /etc/ld.so.conf.d/nvidia.conf file has four lines, which should I erase?

Code: Select all

# /etc/ld.so.conf.d/nvidia.conf provided by http://elrepo.org
/usr/lib64/nvidia
/usr/lib64/vdpau
/usr/lib/nvidia
/usr/lib/vdpau
2) The /etc/X11/xorg.conf file contains only one device which seems to be the nvidia one, how do I fix it?

Code: Select all

# /etc/X11/nvidia-xorg.conf provided by http://elrepo.org

Section "Device"
	Identifier	"Videocard0"
	Driver	"nvidia"
EndSection
Thanks!

chemal
Posts: 776
Joined: 2013/12/08 19:44:49

Re: Using integrated graphics card for display and Nvidia card for GPU

Post by chemal » 2017/03/22 16:11:06

You should erase all four lines from /etc/ld.so.conf.d/nvidia.conf, the vdpau ones are superfluous anyway. But on second thought there is a problem with elrepo's packaging, too. All libraries go to /usr/lib64/nvidia, not only the ones that replace system components, and it's a single all-in-one package. So you cannot make Nvidia's libGL.so, etc. invisible and still have libcuda, etc. visible. :(

/etc/X11/xorg.conf needs to be rewritten. Of course, elrepo assumes you want to use your Nvidia card for X11.

Maybe you are better served here: http://negativo17.org/repos/nvidia/epel-7/x86_64/

It's similar in spirit to elrepo, but has many small packages, so you can leave out the X11/libGL stuff.

royoffgrid
Posts: 2
Joined: 2017/04/11 21:17:40

Re: Using integrated graphics card for display and Nvidia card for GPU

Post by royoffgrid » 2017/04/11 22:06:29

chemal wrote:I would do it like this:

0) Start from a clean system. Not something that is already broken by using Nvidia's installers.

1) Make sure the intel thing is the primary adapter in the BIOS.

2) Install Nvidia drivers from elrepo, because they don't overwrite anything. You will need the system's libGL and Xorg's libglx for the intel GPU. Then remove the two lines from /etc/ld.so.conf.d/nvidia.conf to disable Nvidia's libGL. Finally change /etc/X11/xorg.conf so that only Intel's X11 driver is loaded. Also make sure that X11's libglx is loaded, not Nvidia's. Now check that everything works as expected.

3) Install the CUDA SDK from the .run file, but do not install the copy of Nvidia's driver included in the SDK. We already have this driver and the Nvidia installer will overwrite system components still needed.
Is there a way for me to do step 3 when the CUDA 8 run file refuses to install alongside the old drivers from elrepo?
as soon as you humor it and allow the nvidia installer to put drivers on, the system stops booting... or boots to an "oh no, something went wrong", followed by a blank screen.

Patmac
Posts: 2
Joined: 2019/02/12 14:07:42

Re: Using integrated graphics card for display and Nvidia card for GPU

Post by Patmac » 2019/02/13 17:16:51

When testing this stuff I always type "systemctl set-default multi-user.target" first to make sure I can get back into the system...

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Using integrated graphics card for display and Nvidia card for GPU

Post by jlehtone » 2019/02/13 18:18:17

chemal wrote:
2017/03/21 20:43:36
3) Install the CUDA SDK from the .run file
NVidia has a repository of CUDA RPMs. You might be able to install necessary packages "easier" than from the .run blob.


EDIT: Did not notice that this thread is a resurrected zombie.
Last edited by jlehtone on 2019/02/15 21:22:38, edited 1 time in total.

chemal
Posts: 776
Joined: 2013/12/08 19:44:49

Re: Using integrated graphics card for display and Nvidia card for GPU

Post by chemal » 2019/02/13 23:09:45

This thread is obsolete, because since 7.6 nvidia's OpenGL stack coexists with mesa's.

As nvidia's CUDA repo is of inferior quality, I'm not advocating its use.

Post Reply