Ask Your Question
2

Use nouveau as the default renderer of OpenGL instead of i915

asked 2019-03-01 09:34:49 -0500

kogiokka gravatar image

I'm learning OpenGL development and my laptop has two Graphics devices, Intel and GTX850M.

This is the information I got from inxi -Gxxx:

Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: ASUSTeK driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0416 

Device-2: NVIDIA GM107M [GeForce GTX 850M] vendor: ASUSTeK driver: nouveau v: kernel bus ID: 01:00.0 chip ID: 10de:1391 

Display: x11 server: Fedora Project X.org 1.20.3 driver: modesetting unloaded: fbdev,vesa compositor: kwin_x11 resolution: 1920x1080~60Hz 

OpenGL: renderer: Mesa DRI Intel Haswell Mobile v: 4.5 Mesa 18.3.4 compat-v: 3.0 direct render: Yes

If I understand correctly, my computer only uses Intel integrated graphics and my graphics card has been totally ignored. I'm pretty sure that's the reason I can only use OpenGL 3.0 in the development instead of OpenGL 4.5. Is there a way to "enable" nouveau as the renderer? Or have I got it wrong?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2019-03-02 17:09:32 -0500

ozeszty gravatar image

With hybrid GPUs on open source drivers, on-demand switching from integrated to discrete GPU is done by using environmental variable DRI_PRIME=1, e.g. DRI_PRIME=1 glxinfo -B will show you nvidia's details and DRI_PRIME=1 glxgears will render on in.

Haswell on mesa 18.3.4 supports OpenGL 4.5 Core profile and 3.0 Compatibility profile - which is often erroneously used when not needed (it allows you to use pre-3.0 with OpenGL 3.0+, while OpenGL 3.0+ Core can do everything you need, and does it better). Run glxinfo -B and you'll see them both listed for your Intel GPU.

So you should be able to use OpenGL up to 4.5 on your Intel GPU, without installing proprietary Nvidia driver or dealing with bad nouveau support for your GPU. Performance will be much slower though.

edit flag offensive delete link more

Comments

Thanks, it works! For the record, the reason I couldn't use OpenGL 4.5 core profile on Intel graphics was because I didn't give my program a Vertex Array Object.

kogiokka gravatar imagekogiokka ( 2019-03-03 08:45:12 -0500 )edit

Great! Now also put https://www.khronos.org/vulkan/ on your To-Do list ;)

ozeszty gravatar imageozeszty ( 2019-03-03 15:06:00 -0500 )edit
0

answered 2019-03-01 12:42:23 -0500

aeperezt gravatar image

You need to install proprietary Nvidia kernel module, you could do so using http://rpmfusion.org akmod please follow instructions here https://rpmfusion.org/Howto/NVIDIA. Since you have two Graphics cards you need to disable i915 kernel module to do so add a file in /etc/modprobe.d/ File name could be blacklist-i915.conf it must include this lines:

blacklist i915
options i915 modeset=0

Once you have your Nvidia Kernel module you will be using Nvidia GPU. If something goes wrong with your setting you cna always press keys ctrl+alt+f3 and login on the terminal to fix your configuration.

Good Luck

edit flag offensive delete link more

Comments

Is it mandatory to install proprietary NVIDIA software if I just want to use nouveau? Because why Fedora bundles nouveau in the first place if it needs NVIDIA software anyway?

kogiokka gravatar imagekogiokka ( 2019-03-01 23:36:49 -0500 )edit

You could use nouveau but while it works fine for video it does not take full advantages of Nvidia hardware, keep in mind that it is an open source kernel module for Nvidia, because Nvidia do not open source its software so all the goodies on their hardware are some how hidden for the developers, is my understanding that nouveau was created using reverse engineering. Therefore if you want to take advantage of Nvidia hardware you must use their software. For free software loving people it is not ideal but until Nvidia change its policy nothing we can do.

aeperezt gravatar imageaeperezt ( 2019-03-02 14:55:07 -0500 )edit

https://nouveau.freedesktop.org/wiki/... pre-Maxwell (NV110) GPUs are better supported by nouveau.

ozeszty gravatar imageozeszty ( 2019-03-02 16:36:25 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-03-01 09:34:19 -0500

Seen: 721 times

Last updated: Mar 02 '19