Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken browser render on NVIDIA GPU #220

Closed
talentlessguy opened this issue Dec 25, 2019 · 7 comments
Closed

Broken browser render on NVIDIA GPU #220

talentlessguy opened this issue Dec 25, 2019 · 7 comments

Comments

@talentlessguy
Copy link

The problem

Currently on some NVIDIA GPUs Ultralight browser launches but its render doesn't work at all.

image

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

  1. Build Ultralight, like in docs
  2. Install NVIDIA proprietary driver. Because I have Manjaro Linux, I did the following:
yay -S nvidia
  1. 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
@adamjs
Copy link
Member

adamjs commented Dec 29, 2019

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/

@talentlessguy
Copy link
Author

@adamjs here's what it outputs when trying to prime Browser:

❯ prime Browser
GLFW Error: GLX: Failed to create context: GLXBadFBConfig

@adamjs
Copy link
Member

adamjs commented Dec 30, 2019

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 ?

@talentlessguy
Copy link
Author

@adamjs

❯ 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, 

@talentlessguy
Copy link
Author

hmm any solution to this? Maybe I should install anything else? Or it is just not supported by GLFW

@talentlessguy
Copy link
Author

Update: it now works, browser launches with prime, but get.webgl.org says OpenGL is not supported

@adamjs
Copy link
Member

adamjs commented Jul 4, 2020

Latest trunk now supports offscreen rendering via a pure-CPU, SIMD-accelerated architecture for environments with limited GPU. (See Tutorial 1)

@adamjs adamjs closed this as completed Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants