glutin icon indicating copy to clipboard operation
glutin copied to clipboard

[Linux] Window creation fails on platforms without VSYNC extensions

Open syrel opened this issue 5 years ago • 4 comments

The pull request https://github.com/rust-windowing/glutin/pull/1253 prevents Glutin from creating windowed contexts on systems that do not have vsync extensions. It fails even if vsync is set to false.

CreationErrors([NoAvailablePixelFormat, OsError("Couldn't find any available vsync extension")])

In my opinion instead of throwing an error at mod.rs#L459 we shall ignore vsync if there are no available extensions.

Here is an example of such limited system:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: Parallels Inc
server glx version string: 1.4
server glx extensions:
    GLX_ARB_get_proc_address, GLX_EXT_texture_from_pixmap, GLX_SGIX_fbconfig
client glx vendor string: Parallels Inc
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_EXT_texture_from_pixmap, GLX_SGIX_fbconfig
GLX version: 1.4
GLX extensions:
    GLX_ARB_get_proc_address, GLX_EXT_texture_from_pixmap, GLX_SGIX_fbconfig
OpenGL vendor string: Parallels and ATI Technologies Inc.
OpenGL renderer string: Parallels using AMD Radeon Pro 460 OpenGL Engine
OpenGL version string: 2.1 ATI-3.2.24
OpenGL shading language version string: 1.20
OpenGL extensions:
    GL_ARB_color_buffer_float, GL_ARB_depth_buffer_float, GL_ARB_depth_clamp, 
    GL_ARB_depth_texture, GL_ARB_draw_buffers, 
    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_instanced, 
    GL_ARB_fragment_program, GL_ARB_fragment_program_shadow, 
    GL_ARB_fragment_shader, GL_ARB_framebuffer_object, 
    GL_ARB_framebuffer_sRGB, GL_ARB_half_float_pixel, 
    GL_ARB_half_float_vertex, GL_ARB_imaging, GL_ARB_instanced_arrays, 
    GL_ARB_map_buffer_range, GL_ARB_multisample, GL_ARB_multitexture, 
    GL_ARB_occlusion_query, GL_ARB_pixel_buffer_object, 
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_provoking_vertex, 
    GL_ARB_seamless_cube_map, GL_ARB_shader_objects, 
    GL_ARB_shader_texture_lod, GL_ARB_shading_language_100, GL_ARB_shadow, 
    GL_ARB_shadow_ambient, GL_ARB_sync, GL_ARB_texture_border_clamp, 
    GL_ARB_texture_compression, GL_ARB_texture_compression_rgtc, 
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add, 
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar, 
    GL_ARB_texture_env_dot3, GL_ARB_texture_float, 
    GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two, 
    GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_transpose_matrix, 
    GL_ARB_vertex_array_bgra, GL_ARB_vertex_array_object, GL_ARB_vertex_blend, 
    GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader, 
    GL_ARB_window_pos, GL_ATI_separate_stencil, GL_ATI_texture_env_combine3, 
    GL_ATI_texture_float, GL_ATI_texture_mirror_once, GL_EXT_abgr, 
    GL_EXT_bgra, GL_EXT_bindable_uniform, GL_EXT_blend_color, 
    GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate, 
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint, 
    GL_EXT_depth_bounds_test, GL_EXT_draw_buffers2, 
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_framebuffer_blit, 
    GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_object, 
    GL_EXT_framebuffer_sRGB, GL_EXT_geometry_shader4, 
    GL_EXT_gpu_program_parameters, GL_EXT_gpu_shader4, 
    GL_EXT_multi_draw_arrays, GL_EXT_packed_depth_stencil, 
    GL_EXT_packed_float, GL_EXT_provoking_vertex, GL_EXT_rescale_normal, 
    GL_EXT_secondary_color, GL_EXT_separate_specular_color, 
    GL_EXT_shadow_funcs, GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, 
    GL_EXT_texture3D, GL_EXT_texture_array, GL_EXT_texture_compression_dxt1, 
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_edge_clamp, 
    GL_EXT_texture_env_add, GL_EXT_texture_env_combine, 
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_integer, 
    GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp, 
    GL_EXT_texture_rectangle, GL_EXT_texture_sRGB, 
    GL_EXT_texture_shared_exponent, GL_EXT_transform_feedback, 
    GL_EXT_vertex_array_bgra, GL_NV_blend_square, GL_NV_conditional_render, 
    GL_NV_depth_clamp, GL_NV_fog_distance, GL_NV_light_max_exponent, 
    GL_NV_texgen_reflection, GL_NV_texture_rectangle, GL_SGIS_generate_mipmap, 
    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SGI_color_matrix

4 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x021 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x022 24 dc  1  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x023 32 tc  1  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 None
0x024 32 dc  1  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 None

16 GLXFBConfigs:
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x053 32 dc  1  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 None
0x054 32 dc  1  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 None
0x055 24 dc  1  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x056 24 dc  1  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x057 32 tc  1  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 None
0x058 32 tc  1  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 None
0x059 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x05a 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x05b 32 dc  1  32  0 r  . .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 None
0x05c 32 dc  1  32  0 r  . .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 None
0x05d 24 dc  1  24  0 r  . .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x05e 24 dc  1  24  0 r  . .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x05f 32 tc  1  32  0 r  . .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 None
0x060 32 tc  1  32  0 r  . .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 None
0x061 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x062 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None

syrel avatar Jan 08 '20 18:01 syrel

0.23 is switching over this to an option. I think it would be improper to just ignore the requested vsync. I wouldn't mind if something similar was added to 0.22.

goddessfreya avatar Jan 10 '20 04:01 goddessfreya

This started happening to me as well. Can't use Alacritty anymore. Is there a workaround?

NickeZ avatar Feb 05 '20 15:02 NickeZ

I fixed this issue by reverting the oibaf ppa

sudo ppa-purge ppa:oibaf/graphics-drivers

NickeZ avatar Feb 05 '20 20:02 NickeZ

It's happening to me too. It happens not only on Linux but also on FreeBSD. What should I do? It looks like just disable vsync will do the trick, expect an update to fix this in a while.

flw-cn avatar Aug 13 '20 11:08 flw-cn

Fixed in #1435.

kchibisov avatar Sep 03 '22 06:09 kchibisov