You are not logged in.

#1 2022-02-17 23:44:39

samsara336
Member
Registered: 2022-02-17
Posts: 2

[RESOLVED] OpenGL fail after re-configuring Optimus driver

I've been having an issue with my graphical environment, the issue at hand has me stumped as to what to do next.
it seems to affect chromium applications the most as well as some that try to invoke opengl rendering or the acceleration.
When they do they completely crash the Xorg and I'm back to login screen.
Before I was able to run these applications with relying solely on intel-graphics but now that I have configured the proprietary nvidia driver they seem to fail.

If you can assist that would be greatly appreciated.

.xinitrc

xrandr --setprovideroutputsource modsetting NVIDIA-0
xrandr --auto
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
export IGNORE_CC_MISMATCH=1
ibus-daemon -d -x
xrandr --dpi 96		# Set DPI. User may want to use a larger number for larger screens.

ssh-agent prime-run dwm

optimus-manager.conf is not too dissimilar from the default from here
https://github.com/Askannz/optimus-mana … nager.conf
It auto-generates 10-optimus-manager.conf that basically looks like this

Section "Files"
	ModulePath "/usr/lib/nvidia"
	ModulePath "/usr/lib32/nvidia"
	ModulePath "/usr/lib32/nvidia/xorg/modules"
	ModulePath "/usr/lib32/xorg/modules"
	ModulePath "/usr/lib64/nvidia/xorg/modules"
	ModulePath "/usr/lib64/nvidia/xorg"
	ModulePath "/usr/lib64/xorg/modules"
EndSection

Section "ServerLayout"
	Identifier "layout"
	Screen 0 "nvidia"
	Inactive "integrated"
EndSection

Section "Device"
	Identifier "nvidia"
	Driver "nvidia"
	BusID "PCI:1:0:0"
	Option "Coolbits" "28"
EndSection

Section "Screen"
	Identifier "nvidia"
	Device "nvidia"
	Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
	Identifier "integrated"
	Driver "modesetting"
	BusID "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "integrated"
	Device "integrated"
EndSection

Error message when running teams-for-linux (for an example)
It gets stuck on did-finish-load and fails to run the window

Failed to get the config file, using default values
configFile = {}
processArgs [ '/opt/teams-for-linux/teams-for-linux' ]
[32098:0218/002808.468802:ERROR:angle_platform_impl.cc(44)] Display.cpp:878 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
[32098:0218/002808.468945:ERROR:gl_surface_egl.cc(780)] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.
[32098:0218/002808.468998:ERROR:gl_surface_egl.cc(1375)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[32098:0218/002808.469760:ERROR:angle_platform_impl.cc(44)] Display.cpp:878 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
[32098:0218/002808.469824:ERROR:gl_surface_egl.cc(780)] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.
[32098:0218/002808.469885:ERROR:gl_surface_egl.cc(1375)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[32098:0218/002808.469928:ERROR:gl_initializer_linux_x11.cc(178)] GLSurfaceEGL::InitializeOneOff failed.
[32098:0218/002808.471131:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
[32023:0218/002808.474849:ERROR:browser_main_loop.cc(269)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[32023:0218/002808.475073:ERROR:browser_main_loop.cc(269)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[32023:0218/002808.475167:ERROR:browser_main_loop.cc(269)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[32023:0218/002808.475248:ERROR:browser_main_loop.cc(269)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[32023:0218/002808.475334:ERROR:browser_main_loop.cc(269)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[32116:0218/002808.489056:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is
did-finish-load
did-finish-load

output of lspci

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
01:00.0 3D controller: NVIDIA Corporation GM206M [GeForce GTX 965M] (rev a1)

output of nvidia-settings -g

nvidia-settings -g
GLX Information for computername:0.0:

ERROR: Error fetching GLX Information: Unknown Error

output of xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x1b7 cap: 0x1, Source Output crtcs: 4 outputs: 1 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x1f8 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 1 name:modesetting

output of glxinfo | grep -i "nvidia"

server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 965M/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 510.54
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL version string: 4.6.0 NVIDIA 510.54
OpenGL shading language version string: 4.60 NVIDIA
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 510.54

sanity check of pacman -Qs nvidia

local/lib32-nvidia-utils 510.54-1
    NVIDIA drivers utilities (32-bit)
local/libvdpau 1.4-1
    Nvidia VDPAU library
local/libxnvctrl 510.54-1
    NVIDIA NV-CONTROL X extension
local/nvidia 510.54-1
    NVIDIA drivers for linux
local/nvidia-dkms 510.54-1
    NVIDIA drivers - module sources
local/nvidia-lts 1:510.54-2
    NVIDIA drivers for linux-lts
local/nvidia-prime 1.0-4
    NVIDIA Prime Render Offload configuration and utilities
local/nvidia-settings 510.54-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 510.54-1
    NVIDIA drivers utilities
local/xf86-video-nouveau 1.0.17-2 (xorg-drivers)
    Open Source 3D acceleration driver for nVidia cards

Last edited by samsara336 (2022-02-18 15:50:42)

Offline

#2 2022-02-18 09:39:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,779

Re: [RESOLVED] OpenGL fail after re-configuring Optimus driver

Are you or are you not using optimus-manager? There's no point and it's likely detrimental to run prime-run if you want to set up your entire session to run off of the nvidia card. If you want your entire session on the nvidia card the config mentioned in https://wiki.archlinux.org/title/NVIDIA … phics_only should be the minimum necessary baseline.

Also post a Xorg log.

FWIW teams and its electron friends currently have a incompatibility with the new glibc release, so you might have to run them with the --no-sandbox argument or use their browser versions for the time being until they catch up.

Last edited by V1del (2022-02-18 09:42:10)

Online

#3 2022-02-18 15:48:46

samsara336
Member
Registered: 2022-02-17
Posts: 2

Re: [RESOLVED] OpenGL fail after re-configuring Optimus driver

V1del wrote:

Are you or are you not using optimus-manager? There's no point and it's likely detrimental to run prime-run if you want to set up your entire session to run off of the nvidia card. If you want your entire session on the nvidia card the config mentioned in https://wiki.archlinux.org/title/NVIDIA … phics_only should be the minimum necessary baseline.

Also post a Xorg log.

FWIW teams and its electron friends currently have a incompatibility with the new glibc release, so you might have to run them with the --no-sandbox argument or use their browser versions for the time being until they catch up.


Alright, the only only thing I had to do was delete nvidia-prime package and remove the prime-run from xinitrc and now it runs purely on optimus-manager.
The teams-for-linux is still broken, using teams-nativefier instead and it seem like it works flawlessly.

I have also loaded nvidia, nvidia_modeset, nvidia_uvm and nvidia_drm to the initramfs.

Thanks for help smile

Last edited by samsara336 (2022-02-18 19:07:41)

Offline

Board footer

Powered by FluxBB