[Mesa-users] How to force Xorg/Firefox to use iGPU instead of discrete nvidia card on a Clevo laptop?

Dan dan76 at protonmail.com
Wed Mar 24 17:29:40 UTC 2021


	I have a Clevo compatible laptop with a Intel integrated GPU
and a discrete nVidia GPU. It seems the nVidia card is connected to the
video output (displayport):

~$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 4 outputs: 5 associated providers: 0 name:NVIDIA-0
Provider 1: id: 0x200 cap: 0xa, Sink Output, Sink Offload crtcs: 3 outputs: 1 associated providers: 0 name:modesetting

~$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] (rev 02)
01:00.0 VGA compatible controller: NVIDIA Corporation TU106M [GeForce RTX 2070 Mobile] (rev a1)

	When I try to force Xorg to use only the Intel integrated GPU,
nothing is displayed on the screen, so I'm stuck with the nVidia card.
		
	I read the README.txt from nVidia driver and as far as I
understood, I should use Reverse PRIME in order to use the Intel GPU.
What's interesting is that I can interact with the Intel iGPU. For example:

$ vainfo --display drm
libva info: VA-API version 1.8.0
libva info: Trying to open /usr/xorg/lib64/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/xorg/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.8 (libva 2.8.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Coffee Lake - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
	(...)

	So, is there a way to force Xorg to use only the Intel GPU? Or
at least force Firefox to use only the Intel GPU, so I can have video acceleration?

	I also tried the following without success (it always defaults
to nvidia):

~$ DRI_PRIME=1 __GLX_VENDOR_LIBRARY_NAME=mesa glxinfo|grep vendor
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

~$ __NV_PRIME_RENDER_OFFLOAD_PROVIDER=modesetting __GLX_VENDOR_LIBRARY_NAME=mesa glxinfo|grep vendor
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

	Thanks!

	Ps: if you need the Xorg log file, just ask.

-- 




More information about the mesa-users mailing list