Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upCouldn't find any pixel format that matched the criterias. #1202
Comments
This comment has been minimized.
This comment has been minimized.
juchiast
commented
Sep 11, 2017
•
|
This is a problem with glutin back-end. I suggest running the glutin example here: https://github.com/tomaka/glutin/ Below are lines that probably caused the panic: Hope this will help!! |
This comment has been minimized.
This comment has been minimized.
|
All their examples seem to work. Update: The error seems to originate from The failing function is
compare to what the glutin examples call it with
The only difference (besides Searching for issues regarding Update 2: However, I never used this function in my project (which is now failing) and the default value seems to always have been Update 3: let pf_reqs = &mut pf_reqs.clone();
pf_reqs.srgb = false;before |
This comment has been minimized.
This comment has been minimized.
|
Update 4: // Turn on sRGB.
let settings = settings.clone().srgb(true);Commenting out that line (and keeping glutin unmodified) also fixes all problems. I don't think it has any use to dive into it more. |
rivertam
referenced this issue
Sep 24, 2017
Closed
"Couldn't find any pixel format that matches the criterias": native Ubuntu on modern computer #1205
This comment has been minimized.
This comment has been minimized.
crsaracco
commented
Oct 12, 2017
|
Note for any that are still having this issue: I had to set |
n-pochet
referenced this issue
Oct 19, 2017
Open
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: #153
This comment has been minimized.
This comment has been minimized.
|
Notice that sRGB is enabled in piston_window because the shaders assume linear color space. Discussion: PistonDevelopers/gfx_graphics#293 |
This comment has been minimized.
This comment has been minimized.
est31
commented
Oct 20, 2017
|
Now that Ubuntu 17.10 artful has been released with Mesa version 17.2.2 this issue will affect more people. Including me! The bug is indeed a regression of Mesa from the 17.1 branch to the 17.2 branch. I've ran a bisect and the first bad commit is:
I could also reproduce the bug on the latest master branch (commit There is a bug reported upstream for Mesa: https://bugs.freedesktop.org/show_bug.cgi?id=102354 Supertuxkart ran into the same issue, they ended up supporting a non-sRGB mode: supertuxkart/stk-code#2902 @tpalli has proposed a patch for the issue but it got a negative response during review and was probably abandoned due to that reason, given that there have been multiple stable releases on the 17.2 branch of Mesa since (17.2.2 and 17.2.3) and none of them included the patch. It would be really nice to have the bug fixed by upstream Mesa! As people have noted above, reverting to one of the Mesa 17.1.* releases fixes the bug. Please don't be misled by the "upgraded mesa (17.1.8-1 -> 17.1.8-2)" in the initial comment by @C-Bouthoorn. Both linked glxinfo refers to mesa 17.2.0 and the linked "recently upgraded packages" includes two upgrades of mesa, first the cited one, and second one to 17.2.0. So its definitely caused for @C-Bouthoorn by the upgrade to 17.2 as well. |
This comment has been minimized.
This comment has been minimized.
est31
commented
Oct 20, 2017
|
Note on my compilation setup (on Ubuntu 17.10 artful; after having done git clone https://anongit.freedesktop.org/git/mesa/mesa.git
cd mesa
git checkout mesa-17.1.9
./autogen.sh --prefix=/path/to/desired/mesa-inst --with-gallium-drivers="i915,swrast" --with-dri-drivers="i915,i965,swrast"
make -j 8
make installAnd then I ran the tools with the given mesa installation like: I'm not a fan of sudo make install, I don't want stuff that is not my package manager to mess with my root. |
This comment has been minimized.
This comment has been minimized.
tpalli
commented
Oct 23, 2017
|
Hi;
On 10/21/2017 12:47 AM, est31 wrote:
Now that Ubuntu 17.10 artful has been released with Mesa version 17.2.2
this issue will affect more people. Including me!
The bug is indeed a regression of Mesa from the 17.1 branch to the 17.2
branch. I've ran a bisect and the first bad commit is:
|commit 6e06e281c6ee342276d087ed4ee4a442626e433a Author: Neha Bhende
***@***.***> Date: Wed Apr 26 16:21:32 2017 -0700 glx: add
missing sRGB attribute check in fbconfigs_compatible() This patch will
allow driver to choose srgb capable FBconfig if
GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB attribute is 1 Reviewed-by: Brian Paul
***@***.***> Reviewed-by: Charmaine Lee ***@***.***> |
I could also reproduce the bug on the latest master branch (commit
|59fb59ad54d368683d5cc3b149f021452bddc05f|) and on the 17.2.3 release.
There is a bug reported upstream for Mesa:
https://bugs.freedesktop.org/show_bug.cgi?id=102354
Supertuxkart ran into the same issue, they ended up supporting a
non-sRGB mode: supertuxkart/stk-code#2902
<supertuxkart/stk-code#2902>
@tpalli <https://github.com/tpalli> has proposed a patch
<https://bugs.freedesktop.org/attachment.cgi?id=134248> for the issue
but it got a negative response during review
<https://lists.freedesktop.org/archives/mesa-dev/2017-September/168465.html>
and was probably abandoned due to that reason, given that there have
been multiple stable releases on the 17.2 branch of Mesa since (17.2.2
and 17.2.3) and none of them included the patch.
It would be really nice to have the bug fixed by upstream Mesa!
The patch in question has not been abandoned but can be considered
'floating' as there are currently many other issues Mesa team is dealing
with and we wanted to try alternative approach. Unfortunately so far I
haven't figured out alternative that would not break other applications :/
I will ping some people to consider reviewing this soon if no better fix
can be found.
// Tapani
|
This comment has been minimized.
This comment has been minimized.
|
Thanks Tapani! |
est31
referenced this issue
Nov 2, 2017
Closed
WindowError(SdlError("Could not create GL context")) #194
This comment has been minimized.
This comment has been minimized.
tpalli
commented
Nov 9, 2017
|
Fix has been pushed to Mesa master, now Mesa exposes BGRA8888 sRGB visuals. I will try to get it for mesa stable but as there are risks with that it might be that it will only come to new Mesa releases. |
This comment has been minimized.
This comment has been minimized.
est31
commented
Nov 9, 2017
|
@tpalli that's really cool to hear! I'll try it out soon. "Pushed to master" means that it won't appear in any of the 17.2 or 17.3 releases, but need to wait for 17.4, right? It would definitely be nice to have it fixed in 17.2 and 17.3 as well :). |
This comment has been minimized.
This comment has been minimized.
tpalli
commented
Nov 9, 2017
|
Yeah, it might land only to 17.4 due to it being a functional change, typically only bugfixes get accepted to stable release. |
This comment has been minimized.
This comment has been minimized.
est31
commented
Nov 9, 2017
|
@tpalli I've tested the piston example with recent mesa master now (
|
This comment has been minimized.
This comment has been minimized.
tpalli
commented
Nov 9, 2017
|
Which distro are you running and are you running with XWayland or pure X/GLX? In case of 'pure X' (like for example Ubuntu 16.04) you will need to install the DRI driver so that X server is using the same one as your Mesa has (running against custom Mesa tree with LD_LIBRARY_PATH and LIBGL_DRIVERS_PATH is not enough). In case of Fedora (XWayland) this should work without replacing system DRI driver. |
This comment has been minimized.
This comment has been minimized.
est31
commented
Nov 9, 2017
|
@tpalli I'm running Kubuntu 17.10 with pure X. The test failure is probably due to me only setting LD_LIBRARY_PATH without installing the DRI driver... That one worked when I compiled Mesa 17.1 so I've thought it would work here too. About Wayland: I seem to not be able to reproduce the bug with Weston. Maybe it is using a software renderer? Is there a way to set the DRI driver without changing something in the root fs? I just don't like to mess with it :). |
This comment has been minimized.
This comment has been minimized.
tpalli
commented
Nov 10, 2017
•
|
Unfortunately this change requires both X server and Mesa to use exact same i965_dri.so because of the added visuals. Weston works because then client is using EGL instead of GLX. |
PvdBerg1998
referenced this issue
Nov 12, 2017
Open
Application immediately closing on SOME systems #1214
This comment has been minimized.
This comment has been minimized.
est31
commented
Nov 14, 2017
This comment has been minimized.
This comment has been minimized.
tpalli
commented
Nov 15, 2017
•
|
Unfortunately there are 3 regression bugs open against this change, therefore stable (17.2, 17.3) is not possible. The regressions are: https://bugs.freedesktop.org/show_bug.cgi?id=103655 |
This comment has been minimized.
This comment has been minimized.
est31
commented
Nov 15, 2017
|
@tpalli I see, thanks. |
This comment has been minimized.
This comment has been minimized.
|
Is there anything I can do if I'm experiencing this issue? I'm trying to run some GUI tests on Travis CI. Travis does support GUI testing with xvfb, but trying to run my tests results in the error described in this issue.
If it helps, here are my build logs. This is a problem I've also experienced when trying to run an app using piston_window on a Windows virtual machine using VirtualBox. Seems to happen a lot. Is there a way to work around it? |
This comment has been minimized.
This comment has been minimized.
est31
commented
Nov 24, 2017
|
@sunjay see my comment above: #1202 (comment) |
This comment has been minimized.
This comment has been minimized.
|
@est31 Thanks. I went down the rabbit hole of trying to install mesa on Travis. No luck yet, but I will try again tomorrow. :) |
This comment has been minimized.
This comment has been minimized.
fintelia
commented
Feb 25, 2018
|
Working around this issue should just be a matter of requesting a PistonWindow with sRGB disabled. Unfortunately some of the higher level APIs override this setting for you. However, it should work if you directly create the window like this: extern crate piston_window;
use piston_window::*;
let mut window: PistonWindow = PistonWindow::new(
OpenGL::V3_3,
0,
WindowSettings::new("Hello World!", [640 480])
.opengl(OpenGL::V3_3)
.srgb(false)
.build()
.unwrap(),
); |
This comment has been minimized.
This comment has been minimized.
eisterman
commented
Feb 26, 2018
|
Mesa 17.3.5-1 on Arch Linux is still bugged. Downgrading to 17.1.0-1 temporarily fix the problem |
This comment has been minimized.
This comment has been minimized.
est31
commented
Feb 26, 2018
|
@eisterman The 17.3 branch will never be fixed, even though it is still maintained. See the comment by the mesa developer above. All you can do is to wait for 18.0 which has the fix. There has been a 4th release candidate for 18.0 on Feb 9 and according to schedule we should already have had 18.0.1 on Feb 23 but there was no such message on the mesa announce list nor any message about the 18.0 branch after the rc4 email. Let's see when we'll get an official release of mesa version 18.0 that has the fix :). Look for emails on the mesa-announce list :). |
This comment has been minimized.
This comment has been minimized.
pmarcelll
commented
Apr 10, 2018
|
Arch Linux was updated to Mesa 18.0 recently, so I tested my Piston project and it works now. |
Sas-18
referenced this issue
Apr 26, 2018
Open
Couldn't find any pixel format that matches the criterias #1268
This comment has been minimized.
This comment has been minimized.
est31
commented
May 2, 2018
|
I've just updated to Ubuntu bionic (18.04) which uses Mesa 18.0.0-rc5. Can confirm that the bug is fixed. |
This comment has been minimized.
This comment has been minimized.
juchiast
commented
May 2, 2018
|
Yeah, Fedora 28 is fixed too! |
This comment has been minimized.
This comment has been minimized.
|
Can also confirm this is now working again on my system with |
C-Bouthoorn
closed this
May 2, 2018
This was referenced May 2, 2018
da-x
referenced this issue
May 24, 2018
Closed
Couldn\'t find any pixel format that matches the criterias #415
This comment has been minimized.
This comment has been minimized.
JeffBusterCase
commented
Jun 2, 2018
•
|
The error still occurs on Arch linux updated. Using mesa 18.0.4-1 and rustup default nightly. And by using arch, I am unable to install other mesa version. |
This comment has been minimized.
This comment has been minimized.
est31
commented
Jun 2, 2018
|
@JeffBusterCase what does |
This comment has been minimized.
This comment has been minimized.
JeffBusterCase
commented
Jun 3, 2018
|
@est31 It says: |
This comment has been minimized.
This comment has been minimized.
pmarcelll
commented
Jun 4, 2018
|
Are you absolutely sure your program is not using anything that is not supported by the GPU (OpenGL 4.1+, high level of anti-aliasing, etc.). |
This comment has been minimized.
This comment has been minimized.
|
@JeffBusterCase It works fine on my system: Arch: |
This comment has been minimized.
This comment has been minimized.
JeffBusterCase
commented
Jun 5, 2018
|
@C-Bouthoorn even hello_world doesn't work. No more clue about what is happening, but maybe is cause I'm accessing it by chroot, so it makes me directs this question to some other repo. Thanks by the way. :) |
zacps
referenced this issue
Jun 15, 2018
Closed
Crash after start: Error creating GL context: couldn't find any pixel format #21
This comment has been minimized.
This comment has been minimized.
nyghtly-derek
commented
Jul 20, 2018
•
|
Still getting this error on lubuntu. Updating the mesa drivers didn't work. Still need to test the srgb fix. OS: Ubuntu 18.04 LTS EDIT: error continues even with .srgb(false) fix; am I missing something? EDIT2: here is a snippet from backtrace of another project....
And here is the init_window() function...
Everything runs fine on a separate Windows 10 setup. |
This comment has been minimized.
This comment has been minimized.
fintelia
commented
Jul 21, 2018
|
@nyghtly-derek You don't seem to be hitting this bug, but rather window creating is failing for some other reason. You should look at exactly what Err() value is being returned by |
This comment has been minimized.
This comment has been minimized.
nyghtly-derek
commented
Jul 21, 2018
•
|
@fintelia I'm think I'm getting the same error. It reads:
|
This comment has been minimized.
This comment has been minimized.
fintelia
commented
Jul 22, 2018
|
@nyghtly-derek The fact that you have an updated mesa version and that disabling sRGB doesn't fix the issue strongly suggests that you are actually running into a different problem. It would probably be better to open a new issue if you aren't able to figure it out, but to point you in the right direction, you may want to compare the exact pixel format parameters you're requesting to the supported ones shown by |
C-Bouthoorn commentedSep 10, 2017
•
edited
I have been able to run my own programs using piston for a while, but since a few days I suddenly get this error.
When trying to run
cargo run --bin hello_worldfrom thepiston_examples:System
Antergos, based on Arch Linux
$ uname -r: 4.12.12-1-ARCH$ cargo --version: cargo 0.21.0 (5b4b8b2ae 2017-08-12)$ rustc --version: rustc 1.20.0 (f3d6973f4 2017-08-27)$ rustup --version: rustup 1.6.0glxinforecently updated packages, most notably:
upgraded mesa (17.1.8-1 -> 17.1.8-2)upgraded gtk3 (3.22.19-2 -> 3.22.20-1)upgraded linux (4.12.10-1 -> 4.12.12-1)Update 4: All intermediate versions of mesa (
17.1.8-1,17.1.8-2,17.2.0-2,17.2.0-3,17.2.1-3,17.2.2-1) have this same problem.Let me know if you need more information😄
Update: Seems to be the case for all OpenGL versions. Rebooting didn't work either.
Update 2: Also happens on a clean Debian 9 (kernel
4.9.0-3-amd64) build in VirtualBox5.1.26Update 3: Also happens on Rust 1.19.0, and Rust 1.18.0 and earlier don't compile