Broken browser render on NVIDIA GPU
Closed this issue · 7 comments
The problem
Currently on some NVIDIA GPUs Ultralight browser launches but its render doesn't work at all.
Then it crashes with the following message:
fish: “prime Browser” terminated by signal SIGSEGV (Address boundary error)
When trying to launch from POSIX sh
, I get this:
sh-5.0$ prime /home/v1rtl/ultralight/build/samples/Browser/Browser
Segmentation fault (core dumped)
System Info
OS: Manjaro Linux x86_64 (Arch Linux directive)
Kernel: 5.4.2-1-MANJARO
DE: Plasma
Theme: Sweet [Plasma], Adwaita-dark [GTK2/3]
CPU: Intel i7-4702MQ (8) @ 3.200GHz
GPU: Intel 4th Gen Core Processor
GPU: NVIDIA GeForce GT 740M
GPU Driver: NVIDIA 440.36
Reproduce
- Build Ultralight, like in docs
- Install NVIDIA proprietary driver. Because I have Manjaro Linux, I did the following:
yay -S nvidia
- Launch the browser, like this:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME="nvidia" __VK_LAYER_NV_optimus="NVIDIA_only" ~/ultralight/build/samples/Browser/Browser
or using prime
(yay -S prime
):
prime ~/ultralight/build/samples/Browser/Browser
Thanks for the report.
We're using GLFW 3.3 (built for X11) to create an OpenGL 3.2 context in AppCore: https://github.com/ultralight-ux/AppCore/blob/master/src/linux/WindowGLFW.cpp#L113
To help narrow things down, could you download GLFW 3.3, build the GL samples, and see if those run on your machine first? The package is available here: https://www.glfw.org/
@adamjs here's what it outputs when trying to prime Browser
:
❯ prime Browser
GLFW Error: GLX: Failed to create context: GLXBadFBConfig
Seems it is having trouble creating an OpenGL Context with 3.2 profile, your driver may not support it. What do you get when you run glxinfo | grep version
?
❯ prime glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 4.6.0 NVIDIA 440.44
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL version string: 4.6.0 NVIDIA 440.44
OpenGL shading language version string: 4.60 NVIDIA
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 440.44
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
GL_EXT_shader_group_vote, GL_EXT_shader_implicit_conversions,
hmm any solution to this? Maybe I should install anything else? Or it is just not supported by GLFW
Update: it now works, browser launches with prime
, but get.webgl.org says OpenGL is not supported
Latest trunk now supports offscreen rendering via a pure-CPU, SIMD-accelerated architecture for environments with limited GPU. (See Tutorial 1)