Losing the keyboard on F12

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Losing the keyboard on F12

Post by jh145 »

With reasonable reliability, I can cause Oolite to fail to "see" the keyboard at startup:
-- see post #7 for a better description of the bug
-- see post #16 for a none-too-helpful table of affected (or not) systems
-- see post #44 for a workaround to what turned out to be an ibus bug


  • Quit the game when it's running in a window, not full screen (so that, on restart, it will open in a window rather than full screen).
  • In very rapid succession: start the game, press F12.
  • You can now access the menu with the mouse, but not with the keyboard. You can't see anything else on your desktop, as you're in full-screen mode, so I'd recommend quitting the game rather than starting a new one at this point :wink:
I think you can cause the same effect mid-game, too, going from minimised to windowed, then F12 to go full screen without a keyboard. I don't know how to use the mouse to quit the game when that happens, so I hope you'll understand that I've not tested this case exhaustively.

Nothing in the logs differentiates normal startup from startup-and-lock-out.

This has been a problem for a while, I think. I'm running the trunk nightly on Ubuntu 14.04 on an x86-64 PC.
Last edited by jh145 on Sat Jun 13, 2015 7:57 pm, edited 4 times in total.
User avatar
kanthoney
Commodore
Commodore
Posts: 281
Joined: Thu Nov 07, 2013 10:21 pm

Re: Losing the keyboard on F12

Post by kanthoney »

I've tried this on two different Linux systems and can't reproduce it. When do I press F12? When the splash screen shows, when the main window appears or when it's loading up the commander?
User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: Losing the keyboard on F12

Post by jh145 »

I've just tried it again now. For "best" results:

Code: Select all

$ sleep 1; ./oolite-wrapper
<ENTER><F12><F12><F12>...
You should find Oolite flickers between full-screen and windowed mode for the first second or so of F12 pushes, then stops responding to the keyboard.
User avatar
kanthoney
Commodore
Commodore
Posts: 281
Joined: Thu Nov 07, 2013 10:21 pm

Re: Losing the keyboard on F12

Post by kanthoney »

Sorry, I'm not seeing anything like that at all. Anybody else?
User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: Losing the keyboard on F12

Post by jh145 »

To add to my initial report:
  • The issue is not present in 1.80.0.5831-140630-07cbf8f
  • The issue is present in 1.82.0.6556-150527-a3b98dd
And my machine:

Code: Select all

$ uname -a
Linux user-Z87-HD3 3.13.0-53-generic #89-Ubuntu SMP Wed May 20 10:34:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ grep rendering ~/.Oolite/Logs/Latest.log 
17:07:15.712 [rendering.opengl.version]: OpenGL renderer version: 3.0.0 ("3.0 Mesa 10.1.3"). Vendor: "X.Org". Renderer: "Gallium 0.4 on AMD BONAIRE".
17:07:15.713 [rendering.opengl.extensions]: OpenGL extensions (188):
17:07:15.747 [rendering.opengl.shader.support]: Shaders are supported.
$
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Losing the keyboard on F12

Post by cim »

Nothing here, either. Could there be some unexpected interaction with the window manager, perhaps, causing the full-screen Oolite to end up as a background window? (But if so, clicking the mouse on it should be clearing that...)
User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: Losing the keyboard on F12

Post by jh145 »

Further experimentation suggests it's the rapid transition between full screen and windowed that's breaking things. In particular, I can leave it on the start screen, go make a coffee, come back and hammer F12 quickly, and after only a few F12 whacks the keyboard will become unresponsive. Perhaps the computer's trying to teach me a lesson.

Here are two easily-reproducible cases, one healthy and one not, that I'm seeing:
  • waiting happily on full screen ---[rapid F12,F12]---> waiting happily on full screen
  • waiting happily in windowed mode ---[rapid F12,F12]---> keyboard unresponsive in windowed mode
Here are two further cases that are much harder to reproduce, as you must hit F12 just once and at exactly the right time:
  • start-up in windowed mode ---[F12 immediately after the splash screen disappears]---> waiting happily on full screen
  • start-up on full screen ---[F12 immediately after the splash screen disappears]---> keyboard unresponsive in windowed mode
I would guess that some critical initialisation in full screen mode is being interrupted at just the wrong time, leaving the keyboard "uninitialised" when the game subsequently arrives in windowed mode <*gesticulates in confused manner*>
User avatar
Getafix
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 979
Joined: Tue Apr 01, 2008 12:55 pm
Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
Contact:

Re: Losing the keyboard on F12

Post by Getafix »

I replicated the case on Ubuntu 14.04 64bit with nVidia 340.76 drivers GTX750Ti card.

:!: Don't try to replicate if you are not at the Main Menu! :!:

It's really easy to replicate.
Start Oolite and at the Main Menu screen start hammering F12, as fast as if you are playing Daley Thompson's Decathlon, until Oolite stops switching between Windowed and Full Screen modes.
You have just lost your keyboard! If you are fast enough it will not even take a second.

If it happens that the last state is Full Screen and you are not at the Main Menu screen, then the only way I have found so far to regain access to the desktop (forget Alt-Tab), is to Ctrl-Alt-F1 (linux terminal mode), logon and kill Oolite. Then Ctrl-Alt-F7 to go back to the desktop session.

If you are at the Main Menu screen, you can just double-click the Exit Game option.


EDIT: :!: Do NOT try it with 1.80! :!:
I managed to brick my desktop session and had to reset (not just kill Oolite) from Ctrl-Alt-F1 terminal screen.
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]
User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: Losing the keyboard on F12

Post by jh145 »

Thanks for confirming. Interesting, too, that you could lock yourself out in full screen mode (is that what you implied? I could only achieve lock-out in windowed mode).
User avatar
Getafix
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 979
Joined: Tue Apr 01, 2008 12:55 pm
Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
Contact:

Re: Losing the keyboard on F12

Post by Getafix »

Yes. I have a couple of occurences in Windowed mode and many in Full Screen mode.
It depends on towards which mode you switch when you manage to replicate the case.

I cannot replicate it in Oolite for Windows. (I can already see the :P face of a_c)
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Losing the keyboard on F12

Post by cim »

Still nothing here - either I'm not fast enough (never did play Decathlon as a kid...) or it doesn't occur on every Linux.
User avatar
Getafix
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 979
Joined: Tue Apr 01, 2008 12:55 pm
Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
Contact:

Re: Losing the keyboard on F12

Post by Getafix »

I will try to get a non ubuntu based linux installation on a usb stick to check it out.
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]
User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: Losing the keyboard on F12

Post by jh145 »

If we've got this on nVidia and Radeon cards, perhaps it's something to do with the generic drivers that sit on top of the hardware-specific stuff. I really don't know how to go about checking this, but shall we see if we can find any diagnostics that separate the good and bad cases?

For starters, here are the OpenGL options from ~/.Oolite/Logs/Latest.log

BEGIN TINY FONT>>>
20:20:00.985 [rendering.opengl.version]: OpenGL renderer version: 3.0.0 ("3.0 Mesa 10.1.3"). Vendor: "X.Org". Renderer: "Gallium 0.4 on AMD BONAIRE".
20:20:00.985 [rendering.opengl.extensions]: OpenGL extensions (188):
GL_ATI_texture_mirror_once, GL_ARB_framebuffer_sRGB, GL_AMD_draw_buffers_blend, GL_ARB_transform_feedback_instanced, GL_ARB_depth_texture, GL_ARB_invalidate_subdata, GL_ARB_texture_env_add, GL_NV_texture_barrier, GL_EXT_pixel_buffer_object, GL_ARB_draw_instanced, GL_EXT_texture_compression_rgtc, GL_ARB_half_float_vertex, GL_IBM_multimode_draw_arrays, GL_EXT_texture3D, GL_EXT_compiled_vertex_array, GL_EXT_texture_shared_exponent, GL_ARB_framebuffer_object, GL_EXT_separate_specular_color, GL_EXT_shadow_funcs, GL_ARB_shader_texture_lod, GL_EXT_texture_cube_map, GL_EXT_rescale_normal, GL_ARB_texture_rgb10_a2ui, GL_ATI_draw_buffers, GL_ARB_transpose_matrix, GL_AMD_seamless_cubemap_per_texture, GL_ARB_texture_compression_rgtc, GL_ARB_half_float_pixel, GL_EXT_stencil_two_side, GL_ARB_texture_border_clamp, GL_ARB_multisample, GL_ATI_separate_stencil, GL_ARB_texture_non_power_of_two, GL_NV_fog_distance, GL_ARB_shading_language_packing, GL_INGR_blend_func_separate, GL_EXT_bgra, GL_ARB_texture_storage_multisample, GL_ARB_sync, GL_EXT_texture_env_dot3, GL_EXT_provoking_vertex, GL_APPLE_packed_pixels, GL_NV_light_max_exponent, GL_ARB_sampler_objects, GL_SUN_multi_draw_arrays, GL_ARB_map_buffer_range, GL_ARB_vertex_shader, GL_ARB_shader_objects, GL_NV_texgen_reflection, GL_EXT_multi_draw_arrays, GL_ARB_clear_buffer_object, GL_ARB_vertex_program, GL_IBM_rasterpos_clip, GL_EXT_texture_object, GL_ARB_base_instance, GL_ARB_get_program_binary, GL_ATI_texture_env_combine3, GL_EXT_framebuffer_sRGB, GL_ARB_texture_float, GL_NV_texture_env_combine4, GL_ARB_draw_buffers_blend, GL_AMD_shader_stencil_export, GL_ATI_texture_compression_3dc, GL_ARB_fragment_coord_conventions, GL_EXT_stencil_wrap, GL_EXT_texture_swizzle, GL_ARB_uniform_buffer_object, GL_EXT_framebuffer_blit, GL_NV_primitive_restart, GL_MESA_pack_invert, GL_ARB_vertex_array_bgra, GL_NV_packed_depth_stencil, GL_ARB_texture_compression, GL_KHR_debug, GL_ARB_vertex_array_object, GL_EXT_blend_color, GL_EXT_blend_minmax, GL_ARB_texture_swizzle, GL_EXT_texture_integer, GL_APPLE_vertex_array_object, GL_EXT_transform_feedback, GL_ARB_shader_bit_encoding, GL_EXT_texture_compression_s3tc, GL_EXT_subtexture, GL_ARB_occlusion_query2, GL_ARB_timer_query, GL_MESA_texture_signed_rgba, GL_ARB_debug_output, GL_ARB_point_sprite, GL_ARB_depth_clamp, GL_NV_depth_clamp, GL_EXT_vertex_array, GL_EXT_abgr, GL_ARB_vertex_buffer_object, GL_NV_blend_square, GL_ARB_vertex_attrib_binding, GL_ARB_instanced_arrays, GL_EXT_framebuffer_multisample, GL_NV_conditional_render, GL_NV_texture_rectangle, GL_ARB_multitexture, GL_EXT_texture, GL_ARB_seamless_cube_map, GL_EXT_vertex_array_bgra, GL_ARB_copy_buffer, GL_ARB_draw_elements_base_vertex, GL_ARB_transform_feedback2, GL_ARB_transform_feedback3, GL_ARB_shadow, GL_EXT_draw_instanced, GL_EXT_blend_subtract, GL_ARB_internalformat_query, GL_ARB_fragment_program_shadow, GL_MESA_window_pos, GL_ARB_texture_storage, GL_ARB_shader_stencil_export, GL_ARB_window_pos, GL_ARB_texture_multisample, GL_EXT_texture_lod_bias, GL_IBM_texture_mirrored_repeat, GL_ARB_texture_mirror_clamp_to_edge, GL_EXT_texture_snorm, GL_ARB_texture_env_crossbar, GL_ARB_point_parameters, GL_ARB_depth_buffer_float, GL_ARB_shading_language_420pack, GL_ARB_vertex_type_2_10_10_10_rev, GL_EXT_texture_sRGB_decode, GL_ARB_robustness, GL_ARB_texture_rg, GL_EXT_timer_query, GL_EXT_texture_edge_clamp, GL_EXT_copy_texture, GL_ANGLE_texture_compression_dxt3, GL_EXT_texture_sRGB, GL_EXT_texture_compression_dxt1, GL_ARB_texture_env_combine, GL_ANGLE_texture_compression_dxt5, GL_EXT_framebuffer_multisample_blit_scaled, GL_ARB_fragment_program, GL_ARB_explicit_attrib_location, GL_EXT_packed_float, GL_EXT_texture_filter_anisotropic, GL_EXT_draw_range_elements, GL_ARB_pixel_buffer_object, GL_EXT_packed_depth_stencil, GL_ARB_texture_rectangle, GL_AMD_conservative_depth, GL_EXT_fog_coord, GL_ARB_ES2_compatibility, GL_SGIS_texture_lod, GL_EXT_gpu_program_parameters, GL_ARB_fragment_shader, GL_OES_EGL_image, GL_NV_vdpau_interop, GL_EXT_polygon_offset, GL_ARB_shading_language_100, GL_SGIS_texture_border_clamp, GL_EXT_secondary_color, GL_EXT_point_parameters, GL_AMD_shader_trinary_minmax, GL_ARB_draw_buffers, GL_SGIS_generate_mipmap, GL_EXT_draw_buffers2, GL_EXT_texture_rectangle, GL_ATI_blend_equation_separate, GL_ARB_blend_func_extended, GL_OES_read_format, GL_EXT_blend_func_separate, GL_ARB_texture_cube_map, GL_EXT_texture_array, GL_S3_s3tc, GL_ARB_occlusion_query, GL_EXT_texture_mirror_clamp, GL_EXT_framebuffer_object, GL_EXT_packed_pixels, GL_ARB_texture_mirrored_repeat, GL_ARB_texture_env_dot3, GL_ARB_map_buffer_alignment, GL_EXT_texture_compression_latc, GL_ARB_provoking_vertex, GL_EXT_blend_equation_separate, GL_ARB_color_buffer_float, GL_ATI_texture_float, GL_EXT_texture_env_add, GL_EXT_texture_env_combine, GL_SGIS_texture_edge_clamp, GL_ARB_conservative_depth
20:20:01.008 [rendering.opengl.shader.support]: Shaders are supported.
<<<END TINY FONT
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Losing the keyboard on F12

Post by Norby »

No problem on my debian Linux with Intel HD graphics nor on a laptop with new ubuntu and old nVidia card.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Losing the keyboard on F12

Post by spara »

No problem here either. Debian 8 + nVidia GTS450 card with 340.65 drivers.
Post Reply