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

GL context creation failed error on ThinkPad X41 running (L)Ubuntu 15.10 #9585

Closed
hallvors opened this issue Feb 9, 2016 · 7 comments
Closed

Comments

@hallvors
Copy link

@hallvors hallvors commented Feb 9, 2016

Checked out Servo just for fun, to see if it compiled on this computer (it does). However, it doesn't run..

thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: OsError("GL context creation failed")', ../src/libcore/result.rs:746 

This computer is a few years old, but it would be fun to see Servo run on it.

rust-windowing/glutin#314 seemed somewhat relevant, but it's closed (and it's a different project..)

@genodeftest
Copy link
Contributor

@genodeftest genodeftest commented Mar 10, 2016

Same issue here. Intel iGPU on Fedora 23 Linux with X server 1.18.1 running.

rust-windowing/glutin#314 might be related, there are thoughts/plans to unfork glutin from servo.

@danieltroger
Copy link

@danieltroger danieltroger commented Apr 13, 2016

Same issue here too. Standard ubuntu 14.04 desktop install on a MacBook2,1.
servo/webrender#233 seems to be the same issue (?)
Any workaround/fix yet?

@angyalp
Copy link

@angyalp angyalp commented May 15, 2016

Servo requires at least Open GL version 2.1 (the webrenderer requires 3.2). This error could arise, when your GPU does not support it. One workaround is to lower this enforcement to 1.4, which should be supported by old integrated Intel GPUs (check your supported Open GL version by the glxinfo command).
Please note that I've checked out Servo first a few hours ago, so I don't know the codebase, and maybe this is a dirty hack, but it works for me.

Here is the patch:

diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs
index 09a7639..8f426fa 100644
--- a/ports/glutin/window.rs
+++ b/ports/glutin/window.rs
@@ -183,7 +183,8 @@ impl Window {
         }
         match opts::get().render_api {
             RenderApi::GL => {
-                GlRequest::Specific(Api::OpenGl, (2, 1))
+               // GlRequest::Specific(Api::OpenGl, (2, 1))
+                GlRequest::Specific(Api::OpenGl, (1, 4))
             }
             RenderApi::ES2 => {
                 GlRequest::Specific(Api::OpenGlEs, (2, 0))
@angyalp
Copy link

@angyalp angyalp commented May 18, 2016

To run servo on machines with older graphics card, one can use llvmpipe (http://www.mesa3d.org/llvmpipe.html) as a software renderer. Llvmpipe uses the CPU for rendering, so the performance will be far from ideal, but even the new webrenderer will work (it requires Open GL 3.2) and you don't need to touch the source code of servo.
I have Kubuntu 15.10 installed with Mesa 11.0.2. To force software rendering, set the LIBGL_ALWAYS_SOFTWARE environment variable to 1 before starting servo:
LIBGL_ALWAYS_SOFTWARE=1 ./mach run -r -- http://www.mozilla.com

@nox
Copy link
Member

@nox nox commented Sep 30, 2017

@pcwalton @glennw Can we do something about that? Or is this already fixed?

@dralley
Copy link
Contributor

@dralley dralley commented Mar 24, 2020

Probably fixed by now?

@jdm
Copy link
Member

@jdm jdm commented Mar 24, 2020

We still have minimum GL requirements, but I don't see a good reason to keep this open.

@jdm jdm closed this Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.