Porting 3B+ to 4 w/ video issue and emulator crash
-
So, with the release of the 4.6 Pi 4 build, backed up everything I could from the Pi 3B+, dusted off the Pi 4 and installed, then threw a ton of stuff from the old Pi to the new. All of the systems were fine, except that I had a case were some arcade games were playing and some weren't, with the same emulator (all of the consoles were fine). All the arcade sets were correct by emulator.
PI Model or other hardware: Pi 4B 4g
Power Supply used: Official Pi 4 power supply
Built From: 4.6 prebuilt official
USB Devices connected: 2TB external hd, Opti-pac, Pac4, PacLED64
Controller used: Pac4 (sticks and buttons), Opti-pac or trackball and spinners
Error messages received: [ERROR] Fatal error received in: "video_driver_init_input()"
Log found in /dev/shm/runcommand.log
File: ~/Retropie/roms/arcade/centiped.zip
Emulator: Mame2003-plusTail of runcommand.log (using centipede here although the troubleshoot was against galaga - read further):
[INFO] [GL]: Version: OpenGL ES 3.1 Mesa 19.3.2. [INFO] [GL]: Using resolution 1920x1080 [INFO] [GL]: Default shader backend found: glsl. [INFO] [Shaders]: preset directory: /home/pi/.config/retroarch/shaders/presets [INFO] [Shaders]: Specific shader preset found at /home/pi/.config/retroarch/shaders/presets/MAME 2003-Plus/centiped.glslp. [INFO] [Shaders]: game-specific shader preset found. [INFO] [Shader driver]: Using GLSL shader backend. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GL]: Using 4 textures. [INFO] [GL]: Loaded 1 program(s). [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver. [ERROR] Currently active window is not an X11 window. Cannot use this driver. [ERROR] [Video]: Cannot initialize input driver. Exiting ... [ERROR] Fatal error received in: "video_driver_init_input()"
I thought maybe since the default video_driver is unset, I'd try the GL and the SDL settings. Same issue on both (left set to "gl").
Googling showed issues w/ old version of Retroarch. Few tweaks here and there to try to get it to behave w/ no luck.
I thought since I've got a lot of artwork overlays to fill in space and they were in the legacy format, maybe the Pi 4 version no longer supports those. MV'd the artwork dir to artworkTmp and still had the issue. Reverted. Same w/ shaders - I've got custom cocktail shaders and thought maybe there was something no-likey w/ those. Nope, that wasn't the issue.
Since all of the consoles were fine and some of the arcade games were, I really didn't want to do a fresh install and start over. So I kept digging and figured out the fix. I noticed that 88 games played fine w/ Mame2003-plus, but galaga didn't. I dug into the /opt/retropie/configs/all/retroarch/config/MAME 2003-Plus and looked at the 88games.cfg and the galaga.cfg.
The 88games.cfg looks like this:
custom_viewport_x = "0" custom_viewport_width = "1920" custom_viewport_y = "0" custom_viewport_height = "1080" video_shader_enable = "true" video_shader = "/opt/retropie/configs/all/retroarch/shaders/ntsc/shaders/ntsc-stock.glsl"
The galaga.cfg looks like this however (sorry for not pastebin'ing - thought it'd be easier for you to scan to identify here - keep reading):
assets_directory = "~/.config/retroarch/assets" audio_driver = "alsathread" audio_enable = "true" audio_out_rate = "48000" audio_resampler = "sinc" audio_resampler_quality = "2" auto_overrides_enable = "true" auto_screenshot_filename = "true" auto_shaders_enable = "true" builtin_imageviewer_enable = "true" builtin_mediaplayer_enable = "true" camera_driver = "null" cheat_database_path = "~/.config/retroarch/cheats" content_database_path = "~/.config/retroarch/database/rdb" content_show_add = "true" content_show_favorites = "true" content_show_history = "true" content_show_images = "true" content_show_music = "true" content_show_netplay = "true" content_show_playlists = "true" content_show_settings = "true" content_show_video = "true" core_assets_directory = "~/.config/retroarch/downloads" core_set_supports_no_game_enable = "true" core_updater_auto_extract_archive = "true" core_updater_buildbot_assets_url = "http://buildbot.libretro.com/assets/" core_updater_buildbot_url = "http://buildbot.libretro.com/nightly/linux/armhf/latest/" crt_switch_resolution_super = "2560" crt_video_refresh_rate = "59.940060" cursor_directory = "~/.config/retroarch/database/cursors" desktop_menu_enable = "true" discord_app_id = "475456035851599874" dpi_override_value = "200" game_specific_options = "true" input_bind_hold = "2" input_bind_timeout = "5" input_driver = "udev" input_duty_cycle = "3" input_overlay_enable_autopreferred = "true" input_player10_joypad_index = "9" input_player11_joypad_index = "10" input_player12_joypad_index = "11" input_player13_joypad_index = "12" input_player14_joypad_index = "13" input_player15_joypad_index = "14" input_player16_joypad_index = "15" input_player2_joypad_index = "1" input_player3_joypad_index = "2" input_player4_joypad_index = "3" input_player5_joypad_index = "4" input_player6_joypad_index = "5" input_player7_joypad_index = "6" input_player8_joypad_index = "7" input_player9_joypad_index = "8" input_turbo_period = "6" keyboard_gamepad_enable = "true" keyboard_gamepad_mapping_type = "1" led_driver = "null" libretro_directory = "~/.config/retroarch/cores" libretro_info_path = "~/.config/retroarch/cores" libretro_log_level = "1" load_dummy_on_core_shutdown = "true" location_driver = "null" materialui_icons_enable = "true" menu_battery_level_enable = "true" menu_font_color_blue = "255" menu_font_color_green = "255" menu_font_color_red = "255" menu_footer_opacity = "1.000000" menu_framebuffer_opacity = "0.900000" menu_header_opacity = "1.000000" menu_horizontal_animation = "true" menu_linear_filter = "true" menu_mouse_enable = "true" menu_navigation_browser_filter_supported_extensions_enable = "true" menu_navigation_wraparound_enable = "true" menu_pause_libretro = "true" menu_shader_pipeline = "1" menu_show_configurations = "true" menu_show_help = "true" menu_show_information = "true" menu_show_latency = "true" menu_show_load_content = "true" menu_show_load_core = "true" menu_show_overlays = "true" menu_show_quit_retroarch = "true" menu_show_reboot = "true" menu_show_rewind = "true" menu_show_shutdown = "true" menu_throttle_framerate = "true" menu_thumbnails = "3" menu_timedate_enable = "true" menu_timedate_style = "5" menu_wallpaper_opacity = "0.300000" midi_driver = "alsa" midi_input = "Off" midi_output = "Off" midi_volume = "100" netplay_allow_slaves = "true" netplay_check_frames = "600" netplay_ip_port = "55435" netplay_mitm_server = "nyc" netplay_nat_traversal = "true" netplay_public_announce = "true" netplay_share_analog = "1" netplay_share_digital = "1" network_cmd_port = "55355" network_remote_base_port = "55400" overlay_directory = "~/.config/retroarch/overlay" ozone_menu_color_theme = "1" pause_nonactive = "true" playlist_directory = "~/.config/retroarch/playlists" playlist_entry_remove = "true" playlist_entry_rename = "true" quick_menu_show_add_to_favorites = "true" quick_menu_show_cheats = "true" quick_menu_show_controls = "true" quick_menu_show_information = "true" quick_menu_show_options = "true" quick_menu_show_recording = "true" quick_menu_show_reset_core_association = "true" quick_menu_show_save_content_dir_overrides = "true" quick_menu_show_save_core_overrides = "true" quick_menu_show_save_game_overrides = "true" quick_menu_show_save_load_state = "true" quick_menu_show_shaders = "true" quick_menu_show_start_recording = "true" quick_menu_show_start_streaming = "true" quick_menu_show_streaming = "true" quick_menu_show_take_screenshot = "true" quick_menu_show_undo_save_load_state = "true" record_driver = "ffmpeg" rewind_buffer_size_step = "10" rgui_background_filler_thickness_enable = "true" rgui_border_filler_enable = "true" rgui_border_filler_thickness_enable = "true" rgui_config_directory = "~/.config/retroarch/config" rgui_menu_color_theme = "4" run_ahead_frames = "1" screenshot_directory = "~/.config/retroarch/screenshots" slowmotion_ratio = "3.000000" threaded_data_runloop_enable = "true" thumbnails_directory = "~/.config/retroarch/thumbnails" ui_companion_start_on_boot = "true" ui_menubar_enable = "true" video_aspect_ratio = "-1.000000" video_driver = "gl" video_msg_bgcolor_opacity = "1.000000" video_record_quality = "4" video_record_scale_factor = "1" video_record_threads = "2" video_scale = "3.000000" video_stream_port = "56400" video_stream_quality = "9" video_stream_scale_factor = "1" video_window_opacity = "100" video_window_show_decorations = "true" video_windowed_position_height = "720" video_windowed_position_width = "1280" wifi_driver = "null" xmb_alpha_factor = "75" xmb_menu_color_theme = "4" xmb_scale_factor = "100" custom_viewport_x = "0" custom_viewport_width = "1920" custom_viewport_y = "0" custom_viewport_height = "1080" video_shader_enable = "true" video_shader = "/opt/retropie/configs/all/retroarch/shaders/ntsc/shaders/ntsc-stock.glsl"
On a lark, since the info at the bottom of the galaga.cfg was the same as the entirety of the 88games.cfg, i just renamed galaga.cfg to galagaOrig.cfg and copied the 88games.cfg to galaga.cfg. And galaga worked. It looked just like on the Pi 3B+ w/ the artwork and everything.
So, the actual shader override is galaga.zip.cfg in the roms dir. All of the custom_viewport and video_shader lines in the retroarch/confg/Mame2003-plus/ cfg are the same as defaulted in /opt/retropie/configs/all/retroarch.cfg and this config isn't really doing anything except causing the emulator to back out.
I had the same issue w/ mario bros and FBN. Simply killing the config for that from the /opt/retropie/configs/all/retroarch/config/FinalBurn Neo dir got that working again as well.
Obviously, the solution here is to just wipe out the retroarch/configs/<emulator>/cfg files. I was curious though, what legacy line in these configs is no longer valid/causing issues on the Pi 4? There may be a case where I'll need to splice a config and I was wondering what exactly the offender is here.
Thanks (and sorry for such a long post for such a simple question)!
-
@theissdev I should also mention that this was really my only issue in moving from the Pi 3B+ to the Pi4. Everything else was super simple. Ledspicer required a manual reinstall on the Pi4 simply due to being a bin exe, but that was really it. Most of the old -> new stuff (artwork, custom theme, etc.) all ported over w/ 0 issues. Def. worth the wait. Thanks guys!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.