I have a laptop with xubuntu and an Intel 4000 and a nvidia 720M hybrid GPU. The latter one requieres the legacy driver 390x which I have installed. Here some quotes from CLI:
Error: couldn't find RGB GLX visual or fbconfig
vb@vb-X550CC:~$ glxgears
Error: couldn't get an RGB, Double-buffered visual```
```apt list --installed | grep mesa
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libegl-mesa0/impish,now 21.2.2-1ubuntu1 amd64 [installed,automatic]
libgl1-mesa-dri/impish,now 21.2.2-1ubuntu1 amd64 [installed,automatic]
libgl1-mesa-dri/impish,now 21.2.2-1ubuntu1 i386 [installed,automatic]
libglapi-mesa/impish,now 21.2.2-1ubuntu1 amd64 [installed,automatic]
libglapi-mesa/impish,now 21.2.2-1ubuntu1 i386 [installed,automatic]
libglu1-mesa/impish,now 9.0.1-1build1 amd64 [installed,automatic]
libglu1-mesa/impish,now 9.0.1-1build1 i386 [installed,automatic]
libglx-mesa0/impish,now 21.2.2-1ubuntu1 amd64 [installed,automatic]
libglx-mesa0/impish,now 21.2.2-1ubuntu1 i386 [installed,automatic]
libosmesa6/impish,now 21.2.2-1ubuntu1 amd64 [installed,automatic]
libosmesa6/impish,now 21.2.2-1ubuntu1 i386 [installed,automatic]
mesa-utils/impish,now 8.4.0-1build1 amd64 [installed,automatic]
mesa-va-drivers/impish,now 21.2.2-1ubuntu1 amd64 [installed,automatic]
mesa-vdpau-drivers/impish,now 21.2.2-1ubuntu1 amd64 [installed,automatic]
mesa-vulkan-drivers/impish,now 21.2.2-1ubuntu1 amd64 [installed,automatic]
mesa-vulkan-drivers/impish,now 21.2.2-1ubuntu1 i386 [installed,automatic]```
``` apt list --installed | grep nvidia
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libnvidia-cfg1-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
libnvidia-common-390/impish,impish,now 390.144-0ubuntu2 all [installed,automatic]
libnvidia-compute-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
libnvidia-compute-390/impish,now 390.144-0ubuntu2 i386 [installed,automatic]
libnvidia-decode-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
libnvidia-decode-390/impish,now 390.144-0ubuntu2 i386 [installed,automatic]
libnvidia-encode-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
libnvidia-encode-390/impish,now 390.144-0ubuntu2 i386 [installed,automatic]
libnvidia-fbc1-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
libnvidia-fbc1-390/impish,now 390.144-0ubuntu2 i386 [installed,automatic]
libnvidia-gl-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
libnvidia-gl-390/impish,now 390.144-0ubuntu2 i386 [installed,automatic]
libnvidia-ifr1-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
libnvidia-ifr1-390/impish,now 390.144-0ubuntu2 i386 [installed,automatic]
nvidia-compute-utils-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
nvidia-dkms-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
nvidia-driver-390/impish,now 390.144-0ubuntu2 amd64 [installed]
nvidia-kernel-common-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
nvidia-kernel-source-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
nvidia-prime/impish,impish,now 0.8.17.1 all [installed,automatic]
nvidia-settings/impish,now 470.57.01-0ubuntu3 amd64 [installed,automatic]
nvidia-utils-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
xserver-xorg-video-nvidia-390/impish,now 390.144-0ubuntu2 amd64 [installed,automatic]
[ 56.793] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/x86_64-linux-gnu/nvidia/xorg,/usr/lib/xorg/modules"
[ 56.890] (II) Loading /usr/lib/x86_64-linux-gnu/nvidia/xorg/libglx.so
[ 64.364] (II) Applying OutputClass "nvidia" to /dev/dri/card1
[ 64.364] loading driver: nvidia
[ 64.492] (==) Matched nvidia as autoconfigured driver 0
[ 64.492] (II) LoadModule: "nvidia"
[ 64.492] (II) Loading /usr/lib/x86_64-linux-gnu/nvidia/xorg/nvidia_drv.so
[ 65.542] (II) Module nvidia: vendor="NVIDIA Corporation"```
```nvidia-smi
Fri Jan 21 10:37:03 2022
+---------------------------------------------+
| NVIDIA-SMI 390.144 Driver Version: 390.144 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GT 720M Off | 00000000:01:00.0 N/A | N/A |
| N/A 46C P0 N/A / N/A | 0MiB / 1985MiB | N/A Default |
+-------------------------------+----------------------+----------------------+
+---------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 Not Supported |
+---------------------------------------------+```
```glxinfo | grep render
Error: couldn't find RGB GLX visual or fbconfig
vb@vb-X550CC:~$ lspci -k | grep -iA3 vga
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
Subsystem: ASUSTeK Computer Inc. 3rd Gen Core processor Graphics Controller
Kernel driver in use: i915
Kernel modules: i915```
```dmesg |grep nvidia
[ 21.117008] nvidia: loading out-of-tree module taints kernel.
[ 21.117024] nvidia: module license 'NVIDIA' taints kernel.
[ 21.123957] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[ 21.142417] nvidia-nvlink: Nvlink Core is being initialized, major device number 235
[ 21.786042] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 390.144 Wed Jun 2 22:58:46 UTC 2021
[ 21.885293] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[ 21.885299] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[ 42.807357] audit: type=1400 audit(1642759463.335:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=696 comm="apparmor_parser"
[ 42.807368] audit: type=1400 audit(1642759463.335:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=696 comm="apparmor_parser"```
```lsmod |grep 915
nf_nat 49152 2 nft_chain_nat,xt_MASQUERADE
nf_conntrack_netlink 49152 0
i915 2428928 9
i2c_algo_bit 16384 1 i915
drm_kms_helper 262144 2 nvidia_drm,i915
cec 53248 2 drm_kms_helper,i915
drm 561152 8 drm_kms_helper,nvidia_drm,i915
x_tables 49152 5 xt_conntrack,nft_compat,xt_addrtype,ip_tables,xt_MASQUERADE
video 53248 2 asus_wmi,i915
root@vb-X550CC:/home/vb# lsmod |grep nv
nvidia_drm 45056 0
nvidia_modeset 1056768 1 nvidia_drm
nvidia 15851520 13 nvidia_modeset
drm_kms_helper 262144 2 nvidia_drm,i915
ipmi_msghandler 114688 2 ipmi_devintf,nvidia
drm 561152 8 drm_kms_helper,nvidia_drm,i915```
It seems that that both intel and nvidia driver are loaded. Does anyone has a solution?