CRT Switchres is making my monitor go out of sync

Howdy,

I’m trying to use CRT Switchres on my 31kHz PC CRT and Ubuntu 19.04. It mostly works, but lately I’m having a problem where it’s trying to set the vertical sync to double 120, or higher. This results in an “out of range” message on the monitor, because it only accepts up to 120Hz. One time it hit above 40,000Hz, but it still displayed.

[INFO] [recording] twitch streaming key empty
[INFO] RetroArch 1.7.6 (Git d8968d8)
[INFO] === Build =======================================
[INFO] CPU Model Name: Pentium(R) Dual-Core  CPU      E5500  @ 2.80GHz
[INFO] Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 
[INFO] Built: Apr 18 2019
[INFO] Version: 1.7.6
[INFO] Git: d8968d8
[INFO] =================================================
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 30000.00 Hz.
[INFO] [Video]: Video @ fullscreen
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [GLX]: GLX_OML_sync_control and GLX_MESA_swap_control supported, using better swap control method...
[INFO] [GL]: Found GL context: x
[INFO] [GL]: Detecting screen resolution 1024x768.
[INFO] [GLX]: Window manager is GNOME Shell.
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 1.
[INFO] [GLX]: Using Xinerama on screen #0.
[INFO] [GLX]: X = 0, Y = 0, W = 1024, H = 768.
[INFO] [GLX]: Using windowed fullscreen.
[INFO] [GLX]: Found swap function: glXSwapIntervalEXT.
[INFO] [GLX]: glXSwapIntervalEXT(1)
[INFO] [GL]: Vendor: Intel Open Source Technology Center, Renderer: Mesa DRI Intel(R) Q45/Q43 .
[INFO] [GL]: Version: 2.1 Mesa 19.0.2.
[INFO] [GL]: Using resolution 1024x768
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[INFO] [GLSL]: Checking GLSL shader support ...
[WARN] [GL]: Stock GLSL shaders will be used.
[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] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [udev]: Plugged pad: Sony PLAYSTATION(R)3 Controller (1356:616) on port #0.
[INFO] [udev]: Pad #0 (/dev/input/event10) supports force feedback.
[INFO] [udev]: Pad #0 (/dev/input/event10) supports 16 force feedback effects.
[INFO] [Autoconf]: 0 profiles found.
[INFO] [Autoconf]: no profiles found for Sony PLAYSTATION(R)3 Controller (1356/616).
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [X11]: Suspending screensaver (X11, xdg-screensaver).
[INFO] [Video]: Found display server: x11
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [LED]: LED driver = 'null' 0x55edcaffc220
[INFO] [MIDI]: Initializing ...
[INFO] [MIDI]: Input disabled.
[INFO] [MIDI]: Output disabled.
[INFO] [MIDI]: Initialized "alsa" driver.
[INFO] SRAM will not be saved.
[INFO] Loading history file: [/home/ty/.config/retroarch/content_history.lpl].
[INFO] Loading history file: [/home/ty/.config/retroarch/content_favorites.lpl].
[INFO] Loading history file: [/home/ty/.config/retroarch/content_music_history.lpl].
[INFO] Loading history file: [/home/ty/.config/retroarch/content_video_history.lpl].
[INFO] Loading history file: [/home/ty/.config/retroarch/content_image_history.lpl].
[INFO] [GL]: VSync => on
[INFO] [GLX]: glXSwapIntervalEXT(1)
[INFO] [GL]: VSync => on
[INFO] [GLX]: glXSwapIntervalEXT(1)
[INFO] [PulseAudio]: Pausing.
[INFO] Setting refresh rate to: 120.000 Hz.
[INFO] Setting refresh rate to: 238.910 Hz.
xrandr: cannot find mode ""
xrandr: cannot find mode ""
[INFO] [PulseAudio]: Unpausing.
[INFO] [config] Saved new config to "/home/ty/.config/retroarch/retroarch.cfg".
[INFO] Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] Unloading game..
[INFO] [PulseAudio]: Pausing.
[INFO] Unloading core..
[INFO] Unloading core symbols..
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 1.
[INFO] [XINERAMA]: Saved monitor #0.
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
xrandr: Configure crtc 0 failed
xrandr: cannot find mode ""
xrandr: cannot find mode ""

And retroarch.cfg (I took out most of the 'input" lines to fit in the character limit):

all_users_control_menu = "false"
apply_cheats_after_load = "false"
apply_cheats_after_toggle = "false"
aspect_ratio_index = "22"
assets_directory = "~/.config/retroarch/assets"
audio_block_frames = "0"
audio_device = ""
audio_driver = "pulse"
audio_dsp_plugin = ""
audio_enable = "true"
audio_enable_menu = "false"
audio_enable_menu_bgm = "false"
audio_enable_menu_cancel = "false"
audio_enable_menu_notice = "false"
audio_enable_menu_ok = "false"
audio_filter_dir = "/usr/lib/x86_64-linux-gnu/retroarch/filters/audio/"
audio_latency = "64"
audio_max_timing_skew = "0.050000"
audio_mixer_mute_enable = "false"
audio_mixer_volume = "0.000000"
audio_mute_enable = "false"
audio_out_rate = "48000"
audio_rate_control = "true"
audio_rate_control_delta = "0.005000"
audio_resampler = "sinc"
audio_resampler_quality = "3"
audio_sync = "true"
audio_volume = "0.000000"
auto_overrides_enable = "true"
auto_remaps_enable = "true"
auto_screenshot_filename = "true"
auto_shaders_enable = "true"
automatically_add_content_to_playlist = "false"
autosave_interval = "10"
block_sram_overwrite = "false"
builtin_imageviewer_enable = "true"
builtin_mediaplayer_enable = "true"
bundle_assets_dst_path = ""
bundle_assets_dst_path_subdir = ""
bundle_assets_extract_enable = "false"
bundle_assets_extract_last_version = "0"
bundle_assets_extract_version_current = "0"
bundle_assets_src_path = ""
cache_directory = "/tmp"
camera_allow = "false"
camera_device = ""
camera_driver = "video4linux2"
cheat_database_path = "~/.config/retroarch/cheats"
check_firmware_before_loading = "false"
cheevos_auto_screenshot = "false"
cheevos_badges_enable = "false"
cheevos_enable = "false"
cheevos_hardcore_mode_enable = "false"
cheevos_leaderboards_enable = "false"
cheevos_password = ""
cheevos_test_unofficial = "false"
cheevos_token = ""
cheevos_username = ""
cheevos_verbose_enable = "false"
config_save_on_exit = "true"
content_database_path = "~/.config/retroarch/database/rdb"
content_favorites_path = "~/.config/retroarch/content_favorites.lpl"
content_history_dir = ""
content_history_path = "~/.config/retroarch/content_history.lpl"
content_history_size = "100"
content_image_history_path = "~/.config/retroarch/content_image_history.lpl"
content_music_history_path = "~/.config/retroarch/content_music_history.lpl"
content_runtime_log = "false"
content_runtime_log_aggregate = "false"
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_settings_password = ""
content_show_video = "true"
content_video_history_path = "~/.config/retroarch/content_video_history.lpl"
core_assets_directory = "~/.config/retroarch/downloads"
core_options_path = ""
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/x86_64/latest/"
crt_switch_center_adjust = "0"
crt_switch_resolution = "2"
crt_switch_resolution_super = "2560"
crt_switch_resolution_use_custom_refresh_rate = "true"
crt_video_refresh_rate = "59.940060"
current_resolution_id = "0"
cursor_directory = "~/.config/retroarch/database/cursors"
custom_viewport_height = "704"
custom_viewport_width = "939"
custom_viewport_x = "8"
custom_viewport_y = "0"
desktop_menu_enable = "true"
discord_allow = "false"
discord_app_id = "475456035851599874"
dpi_override_enable = "false"
dpi_override_value = "200"
dynamic_wallpapers_directory = "default"
enable_device_vibration = "false"
fastforward_ratio = "0.000000"
filter_by_current_core = "false"
flicker_filter_enable = "false"
flicker_filter_index = "0"
fps_show = "false"
framecount_show = "false"
game_specific_options = "true"
gamma_correction = "0"
history_list_enable = "true"
input_analog_deadzone = "0.000000"
input_analog_sensitivity = "1.000000"
input_audio_mute = "f9"
input_audio_mute_axis = "nul"
input_audio_mute_btn = "nul"
input_audio_mute_mbtn = "nul"
input_autodetect_enable = "true"
input_axis_threshold = "0.500000"
input_bind_hold = "1"
input_bind_timeout = "5"
input_cheat_index_minus = "t"
input_cheat_index_minus_axis = "nul"
input_cheat_index_minus_btn = "nul"
input_cheat_index_minus_mbtn = "nul"
input_cheat_index_plus = "y"
input_cheat_index_plus_axis = "nul"
input_cheat_index_plus_btn = "nul"
input_cheat_index_plus_mbtn = "nul"
input_cheat_toggle = "u"
input_cheat_toggle_axis = "nul"
input_cheat_toggle_btn = "nul"
input_cheat_toggle_mbtn = "nul"
input_descriptor_hide_unbound = "false"
input_descriptor_label_show = "true"
input_desktop_menu_toggle = "f5"
input_desktop_menu_toggle_axis = "nul"
input_desktop_menu_toggle_btn = "nul"
input_desktop_menu_toggle_mbtn = "nul"
input_device_p1 = "0"
input_disk_eject_toggle = "nul"
input_disk_eject_toggle_axis = "nul"
input_disk_eject_toggle_btn = "nul"
input_disk_eject_toggle_mbtn = "nul"
input_disk_next = "nul"
input_disk_next_axis = "nul"
input_disk_next_btn = "nul"
input_disk_next_mbtn = "nul"
input_disk_prev = "nul"
input_disk_prev_axis = "nul"
input_disk_prev_btn = "nul"
input_disk_prev_mbtn = "nul"
input_driver = "x"
input_duty_cycle = "3"
input_enable_hotkey = "nul"
input_enable_hotkey_axis = "nul"
input_enable_hotkey_btn = "nul"
input_enable_hotkey_mbtn = "nul"
input_exit_emulator = "escape"
input_exit_emulator_axis = "nul"
input_exit_emulator_btn = "nul"
input_exit_emulator_mbtn = "nul"
input_fps_toggle = "f3"
input_fps_toggle_axis = "nul"
input_fps_toggle_btn = "nul"
input_fps_toggle_mbtn = "nul"
input_frame_advance = "k"
input_frame_advance_axis = "nul"
input_frame_advance_btn = "nul"
input_frame_advance_mbtn = "nul"
input_game_focus_toggle = "scroll_lock"
input_game_focus_toggle_axis = "nul"
input_game_focus_toggle_btn = "nul"
input_game_focus_toggle_mbtn = "nul"
input_grab_mouse_toggle = "f11"
input_grab_mouse_toggle_axis = "nul"
input_grab_mouse_toggle_btn = "nul"
input_grab_mouse_toggle_mbtn = "nul"
input_hold_fast_forward = "l"
input_hold_fast_forward_axis = "nul"
input_hold_fast_forward_btn = "nul"
input_hold_fast_forward_mbtn = "nul"
input_hold_slowmotion = "e"
input_hold_slowmotion_axis = "nul"
input_hold_slowmotion_btn = "nul"
input_hold_slowmotion_mbtn = "nul"
input_joypad_driver = "udev"
input_keyboard_layout = ""
input_libretro_device_p1 = "1"
input_libretro_device_p10 = "1"
input_libretro_device_p11 = "1"
input_libretro_device_p12 = "1"
input_libretro_device_p13 = "1"
input_libretro_device_p14 = "1"
input_libretro_device_p15 = "1"
input_libretro_device_p16 = "1"
input_libretro_device_p2 = "1"
input_libretro_device_p3 = "1"
input_libretro_device_p4 = "1"
input_libretro_device_p5 = "1"
input_libretro_device_p6 = "1"
input_libretro_device_p7 = "1"
input_libretro_device_p8 = "1"
input_libretro_device_p9 = "1"
input_load_state = "f4"
input_load_state_axis = "nul"
input_load_state_btn = "nul"
input_load_state_mbtn = "nul"
input_max_users = "5"
input_menu_toggle = "f1"
input_menu_toggle_axis = "nul"
input_menu_toggle_btn = "nul"
input_menu_toggle_gamepad_combo = "0"
input_menu_toggle_mbtn = "nul"
input_movie_record_toggle = "o"
input_movie_record_toggle_axis = "nul"
input_movie_record_toggle_btn = "nul"
input_movie_record_toggle_mbtn = "nul"
input_netplay_game_watch = "i"
input_netplay_game_watch_axis = "nul"
input_netplay_game_watch_btn = "nul"
input_netplay_game_watch_mbtn = "nul"
input_netplay_host_toggle = "nul"
input_netplay_host_toggle_axis = "nul"
input_netplay_host_toggle_btn = "nul"
input_netplay_host_toggle_mbtn = "nul"
input_osk_toggle = "f12"
input_osk_toggle_axis = "nul"
input_osk_toggle_btn = "nul"
input_osk_toggle_mbtn = "nul"
input_overlay = ""
input_overlay_enable = "true"
input_overlay_enable_autopreferred = "true"
input_overlay_hide_in_menu = "true"
input_overlay_next = "nul"
input_overlay_next_axis = "nul"
input_overlay_next_btn = "nul"
input_overlay_next_mbtn = "nul"
input_overlay_opacity = "0.700000"
input_overlay_scale = "1.000000"
input_overlay_show_physical_inputs = "false"
input_overlay_show_physical_inputs_port = "0"
input_pause_toggle = "p"
input_pause_toggle_axis = "nul"
input_pause_toggle_btn = "nul"
input_pause_toggle_mbtn = "nul"
input_player1_a = "x"
input_player1_a_axis = "nul"
input_player1_a_btn = "nul"
input_player1_a_mbtn = "nul"
input_player1_analog_dpad_mode = "0"
input_player1_b = "z"
input_player1_b_axis = "nul"
input_player1_b_btn = "nul"
input_player1_b_mbtn = "nul"
input_player1_down = "down"
input_player1_down_axis = "nul"
input_player1_down_btn = "nul"
input_player1_down_mbtn = "nul"
input_player1_gun_aux_a = "nul"
input_player1_gun_aux_a_axis = "nul"
input_player1_gun_aux_a_btn = "nul"
input_player1_gun_aux_a_mbtn = "nul"
input_player1_gun_aux_b = "nul"
input_player1_gun_aux_b_axis = "nul"
input_player1_gun_aux_b_btn = "nul"
input_player1_gun_aux_b_mbtn = "nul"
input_player1_gun_aux_c = "nul"
input_player1_gun_aux_c_axis = "nul"
input_player1_gun_aux_c_btn = "nul"
input_player1_gun_aux_c_mbtn = "nul"
input_player1_gun_dpad_down = "nul"
input_player1_gun_dpad_down_axis = "nul"
input_player1_gun_dpad_down_btn = "nul"
input_player1_gun_dpad_down_mbtn = "nul"
input_player1_gun_dpad_left = "nul"
input_player1_gun_dpad_left_axis = "nul"
input_player1_gun_dpad_left_btn = "nul"
input_player1_gun_dpad_left_mbtn = "nul"
input_player1_gun_dpad_right = "nul"
input_player1_gun_dpad_right_axis = "nul"
input_player1_gun_dpad_right_btn = "nul"
input_player1_gun_dpad_right_mbtn = "nul"
input_player1_gun_dpad_up = "nul"
input_player1_gun_dpad_up_axis = "nul"
input_player1_gun_dpad_up_btn = "nul"
input_player1_gun_dpad_up_mbtn = "nul"
input_player1_gun_offscreen_shot = "nul"
input_player1_gun_offscreen_shot_axis = "nul"
input_player1_gun_offscreen_shot_btn = "nul"
input_player1_gun_offscreen_shot_mbtn = "nul"
input_player1_gun_select = "nul"
input_player1_gun_select_axis = "nul"
input_player1_gun_select_btn = "nul"
input_player1_gun_select_mbtn = "nul"
input_player1_gun_start = "nul"
input_player1_gun_start_axis = "nul"
input_player1_gun_start_btn = "nul"
input_player1_gun_start_mbtn = "nul"
input_player1_gun_trigger = "nul"
input_player1_gun_trigger_axis = "nul"
input_player1_gun_trigger_btn = "nul"
input_player1_gun_trigger_mbtn = "nul"
input_player1_joypad_index = "0"
input_player1_l = "q"
input_player1_l2 = "nul"
input_player1_l2_axis = "nul"
input_player1_l2_btn = "nul"
input_player1_l2_mbtn = "nul"
input_player1_l3 = "nul"
input_player1_l3_axis = "nul"
input_player1_l3_btn = "nul"
input_player1_l3_mbtn = "nul"
input_player1_l_axis = "nul"
input_player1_l_btn = "nul"
input_player1_l_mbtn = "nul"
input_player1_l_x_minus = "nul"
input_player1_l_x_minus_axis = "nul"
input_player1_l_x_minus_btn = "nul"
input_player1_l_x_minus_mbtn = "nul"
input_player1_l_x_plus = "nul"
input_player1_l_x_plus_axis = "nul"
input_player1_l_x_plus_btn = "nul"
input_player1_l_x_plus_mbtn = "nul"
input_player1_l_y_minus = "nul"
input_player1_l_y_minus_axis = "nul"
input_player1_l_y_minus_btn = "nul"
input_player1_l_y_minus_mbtn = "nul"
input_player1_l_y_plus = "nul"
input_player1_l_y_plus_axis = "nul"
input_player1_l_y_plus_btn = "nul"
input_player1_l_y_plus_mbtn = "nul"
input_player1_left = "left"
input_player1_left_axis = "nul"
input_player1_left_btn = "nul"
input_player1_left_mbtn = "nul"
input_player1_mouse_index = "0"
input_player1_r = "w"
input_player1_r2 = "nul"
input_player1_r2_axis = "nul"
input_player1_r2_btn = "nul"
input_player1_r2_mbtn = "nul"
input_player1_r3 = "nul"
input_player1_r3_axis = "nul"
input_player1_r3_btn = "nul"
input_player1_r3_mbtn = "nul"
input_player1_r_axis = "nul"
input_player1_r_btn = "nul"
input_player1_r_mbtn = "nul"
input_player1_r_x_minus = "nul"
input_player1_r_x_minus_axis = "nul"
input_player1_r_x_minus_btn = "nul"
input_player1_r_x_minus_mbtn = "nul"
input_player1_r_x_plus = "nul"
input_player1_r_x_plus_axis = "nul"
input_player1_r_x_plus_btn = "nul"
input_player1_r_x_plus_mbtn = "nul"
input_player1_r_y_minus = "nul"
input_player1_r_y_minus_axis = "nul"
input_player1_r_y_minus_btn = "nul"
input_player1_r_y_minus_mbtn = "nul"
input_player1_r_y_plus = "nul"
input_player1_r_y_plus_axis = "nul"
input_player1_r_y_plus_btn = "nul"
input_player1_r_y_plus_mbtn = "nul"
input_player1_right = "right"
input_player1_right_axis = "nul"
input_player1_right_btn = "nul"
input_player1_right_mbtn = "nul"
input_player1_select = "rshift"
input_player1_select_axis = "nul"
input_player1_select_btn = "nul"
input_player1_select_mbtn = "nul"
input_player1_start = "enter"
input_player1_start_axis = "nul"
input_player1_start_btn = "nul"
input_player1_start_mbtn = "nul"
input_player1_turbo = "nul"
input_player1_turbo_axis = "nul"
input_player1_turbo_btn = "nul"
input_player1_turbo_mbtn = "nul"
input_player1_up = "up"
input_player1_up_axis = "nul"
input_player1_up_btn = "nul"
input_player1_up_mbtn = "nul"
input_player1_x = "s"
input_player1_x_axis = "nul"
input_player1_x_btn = "nul"
input_player1_x_mbtn = "nul"
input_player1_y = "a"
input_player1_y_axis = "nul"
input_player1_y_btn = "nul"
input_player1_y_mbtn = "nul"
joypad_autoconfig_dir = "~/.config/retroarch/autoconfig"
keyboard_gamepad_enable = "true"
keyboard_gamepad_mapping_type = "1"
kiosk_mode_enable = "false"
kiosk_mode_password = ""
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_allow = "false"
location_driver = "null"
log_dir = "~/.config/retroarch/logs"
log_to_file = "false"
log_to_file_timestamp = "false"
log_verbosity = "true"
materialui_icons_enable = "true"
materialui_menu_color_theme = "0"
memory_show = "false"
menu_battery_level_enable = "true"
menu_core_enable = "true"
menu_driver = "rgui"
menu_dynamic_wallpaper_enable = "false"
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_left_thumbnails = "0"
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_pointer_enable = "false"
menu_rgui_full_width_layout = "true"
menu_rgui_shadows = "false"
menu_shader_pipeline = "2"
menu_show_advanced_settings = "true"
menu_show_configurations = "true"
menu_show_core_updater = "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_online_updater = "true"
menu_show_overlays = "true"
menu_show_quit_retroarch = "true"
menu_show_reboot = "true"
menu_show_rewind = "true"
menu_show_shutdown = "true"
menu_show_sublabels = "false"
menu_swap_ok_cancel_buttons = "false"
menu_throttle_framerate = "true"
menu_thumbnails = "3"
menu_ticker_speed = "1.000000"
menu_ticker_type = "0"
menu_timedate_enable = "true"
menu_timedate_style = "5"
menu_unified_controls = "false"
menu_use_preferred_system_color_theme = "false"
menu_wallpaper = ""
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_input_latency_frames_min = "0"
netplay_input_latency_frames_range = "0"
netplay_ip_address = ""
netplay_ip_port = "55435"
netplay_mitm_server = "nyc"
netplay_nat_traversal = "true"
netplay_nickname = ""
netplay_password = ""
netplay_public_announce = "true"
netplay_request_device_p1 = "false"
netplay_request_device_p10 = "false"
netplay_request_device_p11 = "false"
netplay_request_device_p12 = "false"
netplay_request_device_p13 = "false"
netplay_request_device_p14 = "false"
netplay_request_device_p15 = "false"
netplay_request_device_p16 = "false"
netplay_request_device_p2 = "false"
netplay_request_device_p3 = "false"
netplay_request_device_p4 = "false"
netplay_request_device_p5 = "false"
netplay_request_device_p6 = "false"
netplay_request_device_p7 = "false"
netplay_request_device_p8 = "false"
netplay_request_device_p9 = "false"
netplay_require_slaves = "false"
netplay_share_analog = "1"
netplay_share_digital = "1"
netplay_spectate_password = ""
netplay_start_as_spectator = "false"
netplay_stateless_mode = "false"
netplay_use_mitm_server = "false"
network_cmd_enable = "false"
network_cmd_port = "55355"
network_remote_base_port = "55400"
network_remote_enable = "false"
network_remote_enable_user_p1 = "false"
network_remote_enable_user_p10 = "false"
network_remote_enable_user_p11 = "false"
network_remote_enable_user_p12 = "false"
network_remote_enable_user_p13 = "false"
network_remote_enable_user_p14 = "false"
network_remote_enable_user_p15 = "false"
network_remote_enable_user_p16 = "false"
network_remote_enable_user_p2 = "false"
network_remote_enable_user_p3 = "false"
network_remote_enable_user_p4 = "false"
network_remote_enable_user_p5 = "false"
network_remote_enable_user_p6 = "false"
network_remote_enable_user_p7 = "false"
network_remote_enable_user_p8 = "false"
network_remote_enable_user_p9 = "false"
overlay_directory = "~/.config/retroarch/overlay"
ozone_collapse_sidebar = "false"
ozone_menu_color_theme = "1"
pause_nonactive = "true"
perfcnt_enable = "false"
playlist_cores = ""
playlist_directory = "~/.config/retroarch/playlists"
playlist_entry_remove = "true"
playlist_entry_rename = "true"
playlist_names = ""
playlist_show_inline_core_name = "0"
playlist_show_sublabels = "false"
playlist_sort_alphabetical = "true"
playlist_sublabel_runtime_type = "0"
playlist_use_old_format = "false"
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"
quit_press_twice = "false"
record_driver = "ffmpeg"
recording_config_directory = ""
recording_output_directory = ""
resampler_directory = ""
rewind_buffer_size = "20971520"
rewind_buffer_size_step = "10"
rewind_enable = "false"
rewind_granularity = "1"
rgui_aspect_ratio = "0"
rgui_aspect_ratio_lock = "0"
rgui_background_filler_thickness_enable = "true"
rgui_border_filler_enable = "true"
rgui_border_filler_thickness_enable = "true"
rgui_browser_directory = "~/"
rgui_config_directory = "~/.config/retroarch/config"
rgui_extended_ascii = "false"
rgui_inline_thumbnails = "false"
rgui_internal_upscale_level = "0"
rgui_menu_color_theme = "4"
rgui_menu_theme_preset = ""
rgui_show_start_screen = "false"
rgui_swap_thumbnails = "false"
rgui_thumbnail_delay = "0"
rgui_thumbnail_downscaler = "0"
run_ahead_enabled = "false"
run_ahead_frames = "1"
run_ahead_hide_warnings = "false"
run_ahead_secondary_instance = "false"
runtime_log_directory = "default"
savefile_directory = "default"
savefiles_in_content_dir = "false"
savestate_auto_index = "false"
savestate_auto_load = "false"
savestate_auto_save = "false"
savestate_directory = "default"
savestate_thumbnail_enable = "false"
savestates_in_content_dir = "false"
screen_orientation = "0"
screenshot_directory = "~/.config/retroarch/screenshots"
screenshots_in_content_dir = "false"
show_hidden_files = "false"
slowmotion_ratio = "3.000000"
soft_filter_enable = "false"
soft_filter_index = "0"
sort_savefiles_enable = "false"
sort_savestates_enable = "false"
state_slot = "0"
statistics_show = "false"
stdin_cmd_enable = "false"
streaming_mode = "0"
suspend_screensaver_enable = "true"
sustained_performance_mode = "false"
system_directory = "default"
systemfiles_in_content_dir = "false"
threaded_data_runloop_enable = "true"
thumbnails_directory = "~/.config/retroarch/thumbnails"
ui_companion_enable = "false"
ui_companion_start_on_boot = "true"
ui_companion_toggle = "false"
ui_menubar_enable = "true"
user_language = "0"
vibrate_on_keypress = "false"
video_adaptive_vsync = "false"
video_allow_rotate = "true"
video_aspect_ratio = "-1.000000"
video_aspect_ratio_auto = "false"
video_black_frame_insertion = "false"
video_context_driver = ""
video_crop_overscan = "true"
video_disable_composition = "false"
video_driver = "gl"
video_filter = ""
video_filter_dir = "/usr/lib/x86_64-linux-gnu/retroarch/filters/video/"
video_font_enable = "true"
video_font_path = ""
video_font_size = "32.000000"
video_force_aspect = "true"
video_force_srgb_disable = "false"
video_frame_delay = "0"
video_fullscreen = "true"
video_fullscreen_x = "0"
video_fullscreen_y = "0"
video_gpu_record = "false"
video_gpu_screenshot = "true"
video_hard_sync = "false"
video_hard_sync_frames = "0"
video_max_swapchain_images = "3"
video_message_color = "ffff00"
video_message_pos_x = "0.050000"
video_message_pos_y = "0.050000"
video_monitor_index = "0"
video_msg_bgcolor_blue = "0"
video_msg_bgcolor_enable = "false"
video_msg_bgcolor_green = "0"
video_msg_bgcolor_opacity = "1.000000"
video_msg_bgcolor_red = "0"
video_post_filter_record = "false"
video_record_config = ""
video_record_quality = "4"
video_record_scale_factor = "1"
video_record_threads = "2"
video_refresh_rate = "955.640015"
video_rotation = "0"
video_scale = "3.000000"
video_scale_integer = "false"
video_shader = ""
video_shader_dir = "~/.config/retroarch/shaders"
video_shader_enable = "false"
video_shader_watch_files = "false"
video_shared_context = "false"
video_smooth = "true"
video_stream_config = ""
video_stream_port = "56400"
video_stream_quality = "9"
video_stream_scale_factor = "1"
video_stream_url = ""
video_swap_interval = "1"
video_threaded = "false"
video_vsync = "true"
video_window_opacity = "100"
video_window_save_positions = "false"
video_window_show_decorations = "true"
video_windowed_fullscreen = "true"
video_windowed_position_height = "720"
video_windowed_position_width = "1280"
video_windowed_position_x = "0"
video_windowed_position_y = "0"
vrr_runloop_enable = "false"
wifi_driver = "null"
xmb_alpha_factor = "75"
xmb_font = ""
xmb_layout = "0"
xmb_menu_color_theme = "4"
xmb_scale_factor = "100"
xmb_shadows_enable = "true"
xmb_theme = "0"
xmb_vertical_thumbnails = "false"
youtube_stream_key = ""

Usually to get out of it I have to do xrandr --ouput VGA-1 --auto to get back to native resolution.

Is it certain cores that try to set to those refreshes?

It happens as soon as I turn on Switchres in the menu without a core loaded. It seems like it happens more often if I turn off windowed fullscreen mode. If I leave that on, I will get the menu displayed but at a squished aspect ratio.

Sometimes though, even with windowed fullscreen on, I still get the “out of frequency range” message when I try to choose a super resolution. If I switch to one that goes out of sync and then back to one that just worked, I still get the message.

I have noticed that Game Boy cores (I tried Gambatte) seem particularly prone to this. I get a picture, a black screen, or an “out of range” message, but I’ve not figured out a pattern to it yet. If I do get an image the aspect ratio is wrong, regardless of setting integer scaling.

As an aside, my desktop resolution doesn’t restore most of the time when I exit RetroArch. It stays at the last set resolution.

Unfortunately, while I do have some CRT TVs to test with, I don’t have a signal converter (yet) to try 15kHz mode.

I’ve narrowed it down (slightly). The problem is with video_refresh_rate in retroarch.cfg. Whether or not I have the option to use a custom refresh rate on in the Switchres settings, this number gets multiplied by a lot but I haven’t figured out what triggers it. It happens every time I open a game with Switchres on, close RetroArch, and then open something again. It doesn’t matter which core.

But if I delete the line and restart RetroArch, everything’s fine except restoring my desktop resolution on exit (which stays at 240p).

Some recent examples I’ve gotten after closing a game:

video_refresh_rate = "477.820007"
video_refresh_rate = "239.690979"
video_refresh_rate = "239.764008"

I got this after loading Beetle PSX, closing RetroArch, then reopening RetroArch without a core loaded:

[INFO] Setting refresh rate to: 959.056 Hz.

It displayed the menu but it was squished horizontally.

@Alphanu Do you have any ideas on what would cause this?

I am running un ubuntu 18 with no issue like this. That for both 15 and 31khz.

“[INFO] Setting refresh rate to: 959.056 Hz.” 《 this is not right! At no point should the refresh rate go above 121hz for 31khz. I am not up to the latest source code, I’ve not merged for about 2 months. So, I dont know if something has changed in the video_driver that may be causing this. If it was thought it would also mess with 15khz I would have thought. We would also have a lot more reports of issues.

Maybe its isolated to ubuntu 19?!?

I’ll have to look into it when I have a chance.

@tym are you comfortable compiling from source? If so, could you try using my git https://github.com/alphanu1/MME4CRT

2 Likes

Sure, I can test that out for you. :slightly_smiling_face:

I have been having trouble out of Ubuntu 19 apart from this. Hmm.

Here’s a log for you. I didn’t include the make log because it’s too long for the character limit on the forums but I can Pastebin it or something if you need it.

./configure:

Checking operating system ... Linux (Ubuntu 19.04 19.04)
Checking for suitable working C compiler ... /usr/bin/gcc works
Checking for suitable working C++ compiler ... /usr/bin/g++ works
Checking for pkg-config ... /usr/bin/pkg-config
Checking for availability of switch -std=gnu99 in /usr/bin/gcc ... yes
Checking for availability of switch -Wno-unused-result in /usr/bin/gcc ... yes
Checking for availability of switch -Wno-unused-variable in /usr/bin/gcc ... yes
Checking function sd_get_machine_names in -lsystemd ... no
Checking presence of package bcm_host ... no
Checking function bcm_host_init in -lbcm_host ... no
Checking presence of package egl ... 19.0.2
Checking function ass_library_init in -lass ... no
Checking function pthread_create in -lpthread ... yes
Checking function pthread_key_create in -lpthread ... yes
Checking function dlopen in -ldl ... yes
Checking function socket in -lc ... yes
Checking function getaddrinfo in -lc ... yes
Checking existence of -lminiupnpc ... yes
Checking function fcntl in -lc ... yes
Checking function getopt_long in -lc ... yes
Checking presence of package alsa ... 1.1.8
Checking presence of predefined macro AUDIO_SETINFO in sys/audioio.h ... no
Checking presence of header file sys/soundcard.h ... yes
Checking presence of header file soundcard.h ... no
Checking existence of -lossaudio ... no
Checking function alcOpenDevice in -lopenal ... yes
Checking presence of package rsound >= 1.1 ... no
Checking presence of package libroar ... no
Checking presence of package jack >= 0.120.1 ... 1.9.12
Checking presence of package libpulse ... 12.2
Checking presence of package sdl >= 1.2.10 ... no
Checking presence of package sdl2 >= 2.0.0 ... 2.0.9
Checking presence of package Qt5Core >= 5.2 ... 5.12.2
Checking presence of package Qt5Gui >= 5.2 ... 5.12.2
Checking presence of package Qt5Widgets >= 5.2 ... 5.12.2
Checking presence of package Qt5Concurrent >= 5.2 ... 5.12.2
Checking presence of package Qt5Network >= 5.2 ... 5.12.2
Checking presence of package openssl >= 1.0.0 ... no
Checking presence of package flac ... no
Checking presence of header file mbedtls/entropy.h ... no
Checking existence of -lmbedx509 ... no
Checking existence of -lmbedcrypto ... no
Checking presence of package libusb-1.0 >= 1.0.13 ... 1.0.22
Checking presence of header file GL/gl.h ... yes
Checking existence of -lGL ... yes
Checking function cgCreateContext in -lCg -lCgGL ... yes
Checking presence of package zlib ... 1.2.11
Checking presence of package libavcodec >= 54 ... 58.35.100
Checking presence of package libavformat >= 54 ... 58.20.100
Checking presence of package libavdevice ... 58.5.100
Checking presence of package libswresample ... 3.3.100
Checking presence of package libavresample ... no
Checking presence of package libavutil >= 51 ... 56.22.100
Checking presence of package libswscale >= 2.1 ... 5.3.100
Checking presence of header file libavutil/channel_layout.h ... yes
Checking function dlopen in -ldl ... yes
Checking presence of package gbm >= 9.0 ... 19.0.2
Checking presence of package libdrm ... 2.4.97
Checking presence of package libxml-2.0 ... 2.9.4
Checking presence of package vg ... no
Checking presence of package libv4l2 ... 1.16.3
Checking presence of package freetype2 ... 22.1.16
Checking presence of package x11 ... 1.6.7
Checking presence of package xcb ... 1.13.1
Checking presence of package wayland-egl >= 10.1.0 ... 18.1.0
Checking presence of package wayland-cursor >= 1.12 ... 1.16.0
Checking presence of package wayland-protocols >= 1.15 ... no
Checking presence of package wayland-scanner >= 1.12 ... 1.16.0
Checking presence of package xkbcommon >= 0.3.2 ... 0.8.2
Checking presence of package xext ... 1.3.3
Checking presence of package xxf86vm ... 1.1.4
Notice: Using the bundled wayland-protocols.
Checking existence of -lXrandr ... yes
Checking presence of package xinerama ... 1.1.4
Checking presence of package xv ... 1.0.11
Checking presence of package libudev ... 240
Checking presence of header file linux/parport.h ... yes
Checking presence of header file linux/ppdev.h ... yes
Checking function strcasestr in -lc ... yes
Checking function mmap in -lc ... yes
Checking function vkCreateInstance in -lvulkan ... yes
Checking for moc ... /usr/bin/moc works
Creating make config: config.mk
Creating config header: config.h

I get this error when building:

/usr/bin/ld: obj-unix/release/ui/drivers/qt/ui_qt_window.o: in function `MainWindow::showAbout()':
ui_qt_window.cpp:(.text+0xf1ab): undefined reference to `retroarch_git_version'
collect2: error: ld returned 1 exit status
make: *** [Makefile:196: retroarch] Error 1

But I can get around that just by replacing retroarch_git_version with a random string or deleting it.

Now to test!

I was able to reproduce the “out of range” message once. It tried to load 240Hz. But unfortunately I couldn’t get a log because I couldn’t get the screen to come back from black without rebooting. Maybe I accidentally opened RetroArch twice? I’ll try to reproduce it again.

It seems overall better. Some things I noticed:

  • It seems like the only GB core that works with Switchres for me right now is Gearboy. Sameboy and Gambatte just give me black. I need to test this more to be sure, though. Also, changing the super resolution while the game is running will result in it getting the wrong aspect ratio.
  • My monitor sometimes goes into standby for 10-15 seconds before switching.
  • Closing RetroArch doesn’t restore my desktop resolution. I will either get the last resolution used or it will go into standby.
  • Choosing native resolution without a core loaded will give me a tall and narrow menu.
  • The image is shifted left by about 5 percent or so. The X axis adjustment options don’t seem to affect it. This applies at least to Beetle PSX and Genesis Plus GX. It’s hard to tell on Game Boy because the border is black.

Edit: I also have trouble getting games to work at native resolutions. They either scale tall and thin or show the right aspect ratio but too small, centered in the screen. I’ve noticed this behavior with Genesis Plus GX (Game Gear), MAME, and Vice (Commodore 64), but I’ve not particularly tested others yet. I think this might be a matter of setting my desktop resolution before loading the game.

The Vice core is giving me odd values for the vertical porches. It looks like an integer overflow (underflow?) or something:

************ CRTSwitchRes Debug output ************
                                         
CRT Resolution: 1920x247                     
Refresh Rate: 120.000000                         
Horizontal Porches:                       
- Front: 2000 | Sync: 2144 | Back: 2385         
Vertical Porches:                         
- Front: -2147483533 | Sync: -2147483530 | Back: 0         
                                          
***************************************************

This results in a black screen I can’t get back from without running xrandr --output VGA-1 --auto.

We have noticed this bug recently, It is being looked into. I will ask @Retrorepair if he still has a working patch for it.

What video hardware are you using?

@tym I have made some changes to try and rectify this issue. Could you pull the changes from my git and test them?

i’m on windows with an nvidia card, i don’t know how it is in linux but i created a custom resolution in nvidia control panel, 2560x240 120hz 32bits color, saved it, can you do that on linux?

then i just ignore crt switchres wich is kinda buggy and just set the resolution to 2560x240 in retroarch.cfg, it works just fine (no other resolutions like 2560x224 works, it doesn’t go full screen)

for 640x480 games (naomi and atomiswave) i have a duplicate retroarch folder and in my frontend i link those games to that other retroarch folder

@Alphanu Thank you so much for your hard work. I’m not trying to be demanding, it’s just I know how it is when you can’t get a solid handle on a bug so I want to give you as much information as I can.

I’m using an Intel Q43/Q45 Express on a Pentium E5500. lspci | grep VGA shows it like this:

00:02.0 VGA compatible controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03)

Your patch seems to have worked! The porch values are fine, and I’m getting a picture. I also just did a test build of a local merge of your fork with RetroArch master. It worked once I cleared up a couple conflicts (pretty much moving the Swtichres options somewhere else). I haven’t tried it on my CRT yet, though. I do successfully get CRT debug output in the main branch now.

@vdfritz Yes, I can do that. I need to refresh myself on how to make it last across reboots though. I wonder if I can change color depth the same way. Hmm.

@vdfritz The only problem doing it that way, is that you don’t get the true resolutions.

I have all resolutions working in full screen in windows. maybe something has not been setup right. ATi is the best cards to use for windows with CRTEmudriver. Otherwise you’ll need to install all the resolutions using CRU.

Here is a list of resolutions needed for windows.

https://mme4crt.alphanudesign.co.uk/forum/showthread.php?tid=24

@tym There are a few methods of doing this. one is to add the resolutions to your xorg.conf. However, I prefer creating a .xprofile in my home folder and adding the resolutions using xrandr from there.

i am about to get an hd6750 to replace my faulty 9500gt (only works up to about 400mb of video memory), so i’m good going with ATI? i’ll look into this crt emu driver

my brother tried to play something that isn’t an emulator on it

@Alphanu Thank you! I’ve had trouble configuring xorg.conf. And scratch that success on the last build unfortunately. The switching is faster in master but I wanted to try to integrate your bug fixes. The switching is still slower in my build so I think I built it the wrong way. I want to try it again looking more carefully at the diffs.

@vdfritz Ick. I hope you guys can get that sorted out. :frowning: It does look like a corrupted card. ATI cards are a pretty good bet for this kind of thing. CRT Emudriver worked well on my HD 6570, but I haven’t tinkered much with it lately.

1 Like

@tym unfortunately there have been many new additions to how RetroArch works. However, some of which have slowed down or even broken CRT Switchres. In the past I have been able to keep up with the evolution of RetroArch evolution and work around how the team want things to work. These days it is not something I can do so easily.

For the best CRT experience most people will need to keep with MME4CRT version until I am able correct conflict that will inevitably happen.

Important bug fixes will definitely get merged into mainstream stream RetroArch, if and when they are found. However, again this will be dependent on many aspects.

I hope you can all u understand this :sunglasses:

2 Likes

@Alphanu Of course. It’s no problem. I was just having a play around with it to see what would happen. :slight_smile:

I did get it working mostly except three cores (Genesis, GBA, SNES) are segfaulting. They run super slowly and keep trying to get an X display until X says they’ve hit the limit. It’s like it’s updating the refresh rate every frame, but other cores run fine.

Okay, I think I have figured out my problem. RetroArch (at least with Switchres on I’m assuming) seems to automatically double the refresh rate when you launch it. If you have “Save configuration on exit” turned on, the refresh rate will double what it was when you closed it last.* So eventually, you will go out of sync with your monitor.

My solution is to open retroarch.cfg and set video_refresh_rate to 30, turn off “Save configuration on exit,” and then manually save the current configuration. Now when it starts, it will always set the refresh rate to 60, and not go out of sync on the next launch. Cores will still switch appropriately.

* This might not always be true but I haven’t pinned down specific scenarios.

Good tip, I’ve run into the issue with RA 1.8.4 and Linux Mint 18.3 while switching testing from 15khz to 31 khz using my Notebook. I only noticed that the Notebook (LVDS) display went out of sync sometimes while fiddling with monitor indexes and shuffling outputs around though, Switchres would mostly just not work on the CRT it seems. Gonna do some more testing tomorrow and then finally switch to manual resolution setup if I can’t pin it down.