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

Error creating GL context; Couldn't find any pixel format that matches the criterias. #921

Closed
ghost opened this Issue Nov 28, 2017 · 14 comments

Comments

Projects
None yet
9 participants
@ghost
Copy link

ghost commented Nov 28, 2017

Which operating system does the issue occur on?
CentOS Linux release 7.3.1611 (Core)
If on linux, are you using X11 or Wayland?
X11

Compiled using : cargo build and run using RUST_BACKTRACE=1 cargo run, following is output:
[root@DEV_test_master alacritty]# RUST_BACKTRACE=1 cargo run Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs Running target/debug/alacritty`
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
Alacritty encountered an unrecoverable error:

    Error creating GL context; Couldn't find any pixel format that matches the criterias.

`

@ghost

This comment has been minimized.

Copy link

ghost commented Dec 1, 2017

Compiled on centos virtual machine

@chetgurevitch

This comment has been minimized.

Copy link
Contributor

chetgurevitch commented Dec 12, 2017

I get the same issue with mesa 17.3 from the arch testing repos. Works fine with mesa 17.2 though.

Edit: Looks like the issue was localised to intel (at least haswell) graphics and mesa version 17.3.0. Works fine with mesa 17.3.1. Also I never got those libGL errors, seems like you were probably just missing the proper driver support in the vm.

@mebur

This comment has been minimized.

Copy link

mebur commented Jan 10, 2018

I get a similar error on Solus (X11).

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.3.1

Error message from "env RUST_BACKTRACE=1 cargo run":
...
Running target/debug/alacritty
Alacritty encountered an unrecoverable error:

Error creating GL context; Couldn't find any pixel format that matches the criterias.

Update:
This line is causing the issue for me window.rs(199):
.with_transparency(true)

Update 2:
I get the same error running the glutin transparent example, filing an issue there instead.

@chrisduerr

This comment has been minimized.

Copy link
Collaborator

chrisduerr commented Jan 10, 2018

If the transparency is the issue, I would assume that there is no support for the rgba pixel format but only the rgb one. So I'd assume that for now, disabling transparency is the only option you have.

@divoxx

This comment has been minimized.

Copy link

divoxx commented Feb 12, 2018

I'm seeing the same error message when trying to run alacritty through optirun or primusrun on a laptop with 2 graphics card (intel/nvidia) using bbswitch/bumblebee.

Alacritty runs fine on the on-board intel but fail with that error when running on the nvidia board. Other software runs fine through nvidia using optirun, so it's not a problem with the setup.

@tilda

This comment has been minimized.

Copy link

tilda commented Feb 18, 2018

I updated my mesa to oibaf's ppa (along with all the other video stuff) and have this now

 ~ alacritty
Alacritty encountered an unrecoverable error:

	Error creating GL context; Couldn't find any pixel format that matches the criterias.

Ubuntu 16.04 (GalliumOS 2.1) btw

@lo48576

This comment has been minimized.

Copy link
Contributor

lo48576 commented Mar 12, 2018

I have the same error on my machine, but by this patch (lo48576@b274a9f), it works as expected with transparency enabled.
I'm not sure whether this is the really same problem as yours, but you can try this.

  • kernel: linux-4.15.9 (gentoo)
  • mesa: mesa-18.0.0_rc4
  • glxinfo (snip):
    OpenGL vendor string: Intel Open Source Technology Center
    OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile
    OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.0-rc4
    
@mebur

This comment has been minimized.

Copy link

mebur commented Mar 12, 2018

The patch above solves the issue for me! Thanks!

@chrisduerr

This comment has been minimized.

Copy link
Collaborator

chrisduerr commented Mar 12, 2018

@lo48576 Testing it on my machine which doesn't have that issue, everything still works.

So if this is just an improvement without disadvantage, maybe it should be upstreamed? Unless you know about an issue it would probably be nice to have a PR for this.

@tilda

This comment has been minimized.

Copy link

tilda commented Mar 12, 2018

I can confirm, indeed, that the patch works flawlessly.

@lluixhi

This comment has been minimized.

Copy link

lluixhi commented Mar 12, 2018

@lo48576
Can confirm, that patch is enough to get alacritty working on gentoo for me, with mesa-18.0.0_rc4

@jwilm jwilm closed this in #1178 Mar 13, 2018

@tbehner

This comment has been minimized.

Copy link

tbehner commented Mar 13, 2018

Funnily, the patch results in the exact same crash it's supposed to fix.
If I switch with_srgb(false), everything works as usual....
kernel: 4.15.6-300.fc27.x86_64
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.3.6
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.3.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 17.3.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

lo48576 added a commit to lo48576/alacritty that referenced this issue Mar 13, 2018

@alexherbo2

This comment has been minimized.

Copy link

alexherbo2 commented Mar 13, 2018

I have the same issue since #1178 has been merged and using Mesa 17.3.6.

@lo48576

This comment has been minimized.

Copy link
Contributor

lo48576 commented Mar 13, 2018

@tbehner @alexherbo2 I created Pull Request #1178 just now, this should solve your problem.

lo48576 added a commit to lo48576/alacritty that referenced this issue Mar 13, 2018

jwilm added a commit that referenced this issue Mar 13, 2018

Try to create window with different SRGB config when failed
This may truly solve #921 (and issue caused by #1178)
<#921 (comment)>.

uqs pushed a commit to freebsd/freebsd-ports that referenced this issue May 1, 2018

zeising
Fix GL context creation
Add patch from upstream to fix errors in creating GL context.
See Upstream issue for details:
jwilm/alacritty#921

PR:		227846
Submitted by:	Sascha Holzleiter
MFH:		2018Q2


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@468774 35697150-7ecd-e111-bb59-0022644237b5

uqs pushed a commit to freebsd/freebsd-ports that referenced this issue May 1, 2018

Fix GL context creation
Add patch from upstream to fix errors in creating GL context.
See Upstream issue for details:
jwilm/alacritty#921

PR:		227846
Submitted by:	Sascha Holzleiter
MFH:		2018Q2

mat813 pushed a commit to mat813/freebsd-ports that referenced this issue May 1, 2018

zeising
Fix GL context creation
Add patch from upstream to fix errors in creating GL context.
See Upstream issue for details:
jwilm/alacritty#921

PR:		227846
Submitted by:	Sascha Holzleiter
MFH:		2018Q2


git-svn-id: https://svn.freebsd.org/ports/head@468774 35697150-7ecd-e111-bb59-0022644237b5

Jehops pushed a commit to Jehops/freebsd-ports that referenced this issue May 1, 2018

Fix GL context creation
Add patch from upstream to fix errors in creating GL context.
See Upstream issue for details:
jwilm/alacritty#921

PR:		227846
Submitted by:	Sascha Holzleiter
MFH:		2018Q2


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@468774 35697150-7ecd-e111-bb59-0022644237b5

swills pushed a commit to swills/freebsd-ports that referenced this issue May 3, 2018

Fix GL context creation
Add patch from upstream to fix errors in creating GL context.
See Upstream issue for details:
jwilm/alacritty#921

PR:		227846
Submitted by:	Sascha Holzleiter
MFH:		2018Q2


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@468774 35697150-7ecd-e111-bb59-0022644237b5

uqs pushed a commit to freebsd/freebsd-ports that referenced this issue May 5, 2018

MFH: r468774
Fix GL context creation

Add patch from upstream to fix errors in creating GL context.
See Upstream issue for details:
jwilm/alacritty#921

PR:		227846
Submitted by:	Sascha Holzleiter

Approved by:	ports-secteam (riggs)

mat813 pushed a commit to mat813/freebsd-ports that referenced this issue May 7, 2018

zeising
MFH: r468774
Fix GL context creation

Add patch from upstream to fix errors in creating GL context.
See Upstream issue for details:
jwilm/alacritty#921

PR:		227846
Submitted by:	Sascha Holzleiter

Approved by:	ports-secteam (riggs)


git-svn-id: https://svn.freebsd.org/ports/branches/2018Q2@469158 35697150-7ecd-e111-bb59-0022644237b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment