You are not logged in.

#1 2017-07-24 07:38:53

returnNull
Member
Registered: 2017-07-24
Posts: 2

[SOLVED]Install NVIDIA Driver for CUDA, but use Onboard Intel Graphics

I have an NVIDIA graphics card that I'm hoping to use solely for CUDA processing, while using the Intel onboard graphics for my display outputs.

When I install the nvidia driver (pacman -S nvidia), the sample CUDA code runs successfully. However, after I reboot, the system hangs on "Reached target Graphical Interface" and my outputs connected to the onboard graphics stop receiving any input. I can bring up another terminal (ctrl+alt+F2) and reboot. Uninstalling the nvidia driver allows the system to boot normally, and I see the expected greeter. I suspect the lightdm greeter is being sent to the NVIDIA graphics card... The BIOS appears to be configured to use the onboard graphics.

I'm using the i3 window manager with lightdm, and the lightdm-gtk-greeter.

Is there a way to install the NVIDIA driver so that CUDA programs can be used, while still using onboard graphics for my displays?

Thanks

Last edited by returnNull (2017-07-25 01:29:53)

Offline

#2 2017-07-24 10:33:29

onslow77
Member
Registered: 2014-09-21
Posts: 279

Re: [SOLVED]Install NVIDIA Driver for CUDA, but use Onboard Intel Graphics

Hello,

Welcome to Arch returnNull! Check out the wiki page about hybrid Graphics.

Regards
Martin

Last edited by onslow77 (2017-07-24 10:33:45)


It is advised to follow the How to post guide when posting on the Arch forum. If one consciously jumps over these elementary steps like reading the wiki and providing necessary information about the problem, one can be regarded as a Help Vampire.

Offline

#3 2017-07-24 11:08:01

jordz
Member
Registered: 2006-02-01
Posts: 248

Re: [SOLVED]Install NVIDIA Driver for CUDA, but use Onboard Intel Graphics

I do the same, use the intel igpu as output and my nvidia gpu for cuda. I don't use a display manager but run i3 with startx. I noticed that I didn't have acceleration on my igpu and found out the file "/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf" was my problem. It configures xorg to use nvidia libs, I now configure xorg manually and removed that file.

Here are my xorg configs as an example.
You will need to configure the BusID correctly as you can see here: https://wiki.archlinux.org/index.php/Xo … phics_card

# cat /etc/X11/xorg.conf.d/10-nvidia.conf 
Section "Device"
  Identifier    "nvidia"
  Driver        "nvidia"
  BusID         "PCI:1:0:0"
  Option        "Coolbits" "4"
  Option        "AllowEmptyInitialConfiguration"
  Option        "PrimaryGPU" "no"
  #ModulePath    "/usr/lib/nvidia/xorg"
EndSection

~
# cat /etc/X11/xorg.conf.d/20-intel.conf 
# vim:ft=xorg.conf

Section "ServerLayout"
  Identifier      "layout"
  Screen 0        "intel"
EndSection

Section "Screen"
  Identifier      "intel"
  Device          "intel"
  Monitor         "monitor0"
EndSection

Section "Device"
  Identifier      "intel"
  Driver          "modesetting"
  #Option          "AccelMethod" "sna"
  BusID           "PCI:0:2:0"
  # FIXME
  # to fix hw acceleration remove: /usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
EndSection

Section "Monitor"
  # with nvidia driver (xdpyinfo | grep -B2 resolution)
  # dimensions:    2560x1440 pixels (551x313 millimeters)
  # resolution:    118x117 dots per inch
  Identifier      "monitor0"
  DisplaySize     551 313
EndSection

If removing that file works for you can add this hook so you don't have to remove the file each time after an update

/etc/pacman.d/hooks
# cat nvidia.hook 
[Trigger]
Type=File
Operation = Install
Operation = Upgrade
Target    = usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf

[Action]
When=PostTransaction
Exec=/usr/bin/rm -v /usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf

Offline

#4 2017-07-25 01:28:32

returnNull
Member
Registered: 2017-07-24
Posts: 2

Re: [SOLVED]Install NVIDIA Driver for CUDA, but use Onboard Intel Graphics

jordz: your solution worked perfectly. Thank you!

Offline

Board footer

Powered by FluxBB