Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: how to use nvidia gpu instead of intel for openGL (Read 1571 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

how to use nvidia gpu instead of intel for openGL

Graphics:
  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel
  Device-2: NVIDIA GP106M [GeForce GTX 1060 Mobile] driver: nvidia v: 460.84
  Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo
  Display: x11 server: X.Org 1.20.11 driver: loaded: modesetting,nvidia
  unloaded: fbdev,intel,nouveau,vesa resolution: 1920x1080~60Hz
  OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.0.3

xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x49 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 7 associated providers: 0 name:modesetting
Provider 1: id: 0x245 cap: 0x2, Sink Output crtcs: 4 outputs: 1 associated providers: 0 name:NVIDIA-G0

Re: how to use nvidia gpu instead of intel for openGL

Reply #1
This isn't really related to runit, but well...

You'll have to install the prime-run script. Since you have the nvidia proprietary driver installed:

- If you have Arch repos enabled, run pacman -S nvidia-prime.

If you don't, here's manual installation procedure (since our package maintainers haven't ported nvidia-prime yet):
- Download Arch's prime-run script and copy it as root to /usr/local/bin and make it executable. A terminal one-liner for that:
Code: [Select]
wget https://raw.githubusercontent.com/archlinux/svntogit-packages/master/nvidia-prime/trunk/prime-run && sudo install -Dvm755 {,/usr/local/bin/}prime-run

After that, just run prime-run supertuxkart (or other game, or put prime-run %command% on Steam launch options.

Re: how to use nvidia gpu instead of intel for openGL

Reply #2
I have similar dual graphics, too, and I use nvidia Optimus for that. It works well in Artix. All I need is to run
Code: [Select]
primusrun <program>
or
Code: [Select]
optirun <program>
if I need a program to be run on the Nvidia card. bbswitch-dkms kernel module is a very handy thing in this case, it keeps Nvidia card turned off while it's not used, and turns it on only when it's in use. This keeps my laptop cool.