Ubuntu and Mint can't run RetroArch

I have tried RetroArch on both Ubuntu 20.04 and Mint 20.
The RetroArch app launches correctly but whatever core I use I have the same issue:

ALSA lib conf.c:3916:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default
X Error:  BadMatch
  Request Major code 151 (GLX)
  Request Minor code 26 ()
  Error Serial #74
  Current Serial #74
malloc_consolidate(): invalid chunk size
Annullato (core dump creato)

This happens on both distro.
Any suggestion?
Thank you.

Update: The same problem is on Fedora 32. Is there any distro on which RetroArch in working well? Thank you

It seems to work for me on Ubuntu 20.04, what is the output of snap connections retroarch on your machine?

This is the output of

$ snap connections retroarch

Interface Plug Slot Notes
alsa retroarch:alsa - -
audio-playback retroarch:audio-playback :audio-playback -
bluez retroarch:bluez - -
desktop retroarch:desktop :desktop -
home retroarch:home :home -
joystick retroarch:joystick :joystick -
network retroarch:network :network -
network-bind retroarch:network-bind :network-bind -
opengl retroarch:opengl :opengl -
raw-usb retroarch:raw-usb - -
removable-media retroarch:removable-media - -
screen-inhibit-control retroarch:screen-inhibit-control :screen-inhibit-control -
unity7 retroarch:unity7 :unity7 -
wayland retroarch:wayland :wayland -
x11 retroarch:x11 :x11 -

Thank you

Hmm, it could be related to the gl video driver, maybe you could try to change the video driver to vulkan or sdl2 to see if you can get better results? You can run retroarch with --verbose to get more information.

Update: I just realized that Vulkan is not officially supported so it may work or not, but you can still test with SDL2.

Update2: I did some tests here and while I can’t reproduce that error message, the cores I tested didn’t work and gave me just a black window (on Ubuntu 20.04 and integrated Intel graphics).

Thank you for your suggestions

I have tried it with --verbose and vulkan and this is the output
.
(many INFO at start)
[libretro ERROR] 06:55:877 VideoBackends/Vulkan/VulkanLoader.cpp:331 E[Video]: (EnumerateGPUs) vkEnumeratePhysicalDevices failed: (-3: VK_ERROR_INITIALIZATION_FAILED)
[libretro ERROR] 06:55:877 DolphinLibretro/Video.cpp:186 E[Video]: No Vulkan physical devices available.
[WARN] [Vulkan]: Failed to create device with negotiation interface. Falling back to default path.
[ERROR] [Vulkan]: Failed to enumerate physical devices.
[ERROR] [Vulkan]: Failed to set video mode.
[ERROR] [Video]: Cannot open video driver … Exiting …
[ERROR] Errore irreversibile ricevuto in: “init_video()”
[ERROR] Impossibile avviare il driver audio. Il contenuto continuerà senza audio.
[libretro INFO] 06:55:879 Common/FileUtil.cpp:399 I[COMMON]: ScanDirectoryTree: directory /home/stefano/snap/retroarch/423/.config/retroarch/saves/User/GC/USA/Card A/
[libretro ERROR] 06:55:880 Common/MemArena.cpp:75 E[MI]: shm_open failed: Permission denied
[libretro INFO] 06:55:880 Common/MemArena.cpp:104 N[MI]: mmap failed
[libretro INFO] 06:55:881 Common/FileUtil.cpp:268 I[COMMON]: Rename: �r� --> �r�
[libretro INFO] 06:55:926 Common/FileUtil.cpp:268 I[COMMON]: Rename: �gU�U --> �gU�U
[libretro INFO] 06:55:943 Common/FileUtil.cpp:268 I[COMMON]: Rename: 0�]�� --> 0�]��
[libretro INFO] 06:55:960 Common/FileUtil.cpp:268 I[COMMON]: Rename: �-�U --> �-�U
[libretro INFO] 06:55:977 Common/FileUtil.cpp:268 I[COMMON]: Rename: SO --> SO
[libretro INFO] 06:55:010 Common/FileUtil.cpp:268 I[COMMON]: Rename: @�]�� --> @�]��
[libretro INFO] 06:55:027 Common/FileUtil.cpp:268 I[COMMON]: Rename: nZ --> nZ
.

than with sdl2
(after many INFO)
[WARN] Could not suspend screen saver.
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[INFO] [Joypad]: Found joypad driver: “udev”.
[INFO] [Video]: Found display server: x11
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Display]: Found display driver: “null”.
[WARN] [OZONE] Assets missing
ALSA lib conf.c:3916:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default
[ERROR] [MIDI]: snd_seq_open failed with error -2.
[ERROR] [MIDI]: Initialization failed (list of input devices unavailable).
[libretro INFO] 09:08:790 Common/FileUtil.cpp:268 I[COMMON]: Rename: /home/stefano/snap/retroarch/423/.config/retroarch/saves/User/Config/GCPadNew.ini.xxx --> /home/stefano/snap/retroarch/423/.config/retroarch/saves/User/Config/GCPadNew.ini
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[libretro INFO] 09:08:809 Common/FileUtil.cpp:268 I[COMMON]: Rename: /home/stefano/snap/retroarch/423/.config/retroarch/saves/User/Config/GCPadNew.ini.xxx --> /home/stefano/snap/retroarch/423/.config/retroarch/saves/User/Config/GCPadNew.ini
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[libretro INFO] 09:08:835 Common/FileUtil.cpp:268 I[COMMON]: Rename: /home/stefano/snap/retroarch/423/.config/retroarch/saves/User/Config/GCPadNew.ini.xxx --> /home/stefano/snap/retroarch/423/.config/retroarch/saves/User/Config/GCPadNew.ini
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[libretro INFO] 09:08:860 Common/FileUtil.cpp:268 I[COMMON]: Rename: /home/stefano/snap/retroarch/423/.config/retroarch/saves/User/Config/GCPadNew.ini.xxx --> /home/stefano/snap/retroarch/423/.config/retroarch/saves/User/Config/GCPadNew.ini
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO] Scollegamento del dispositivo dalla porta 6.
[INFO] Scollegamento del dispositivo dalla porta 7.
[INFO] Scollegamento del dispositivo dalla porta 8.
[INFO] Scollegamento del dispositivo dalla porta 9.
[INFO] Scollegamento del dispositivo dalla porta 10.
[INFO] Scollegamento del dispositivo dalla porta 11.
[INFO] Scollegamento del dispositivo dalla porta 12.
[INFO] Scollegamento del dispositivo dalla porta 13.
[INFO] Scollegamento del dispositivo dalla porta 14.
[INFO] Scollegamento del dispositivo dalla porta 15.
[INFO] Scollegamento del dispositivo dalla porta 16.
[INFO] [Playlist]: Written to playlist file: /home/stefano/snap/retroarch/423/.config/retroarch/content_history.lpl
[INFO] [Playlist]: Written to playlist file: /home/stefano/snap/retroarch/423/.config/retroarch/content_music_history.lpl
[INFO] [Playlist]: Written to playlist file: /home/stefano/snap/retroarch/423/.config/retroarch/content_video_history.lpl
[INFO] [Playlist]: Written to playlist file: /home/stefano/snap/retroarch/423/.config/retroarch/content_image_history.lpl
[INFO] [Playlist]: Caricamento dei file della cronologia: [/home/stefano/snap/retroarch/423/.config/retroarch/content_history.lpl].
[INFO] [Playlist]: Caricamento dei file della cronologia: [/home/stefano/snap/retroarch/423/.config/retroarch/content_music_history.lpl].
[INFO] [Playlist]: Caricamento dei file della cronologia: [/home/stefano/snap/retroarch/423/.config/retroarch/content_video_history.lpl].
[INFO] [Playlist]: Caricamento dei file della cronologia: [/home/stefano/snap/retroarch/423/.config/retroarch/content_image_history.lpl].
[INFO] [Playlist]: Caricamento file preferiti: [/home/stefano/snap/retroarch/423/.config/retroarch/content_favorites.lpl].
[INFO] [Playlist]: Written to playlist file: /home/stefano/snap/retroarch/423/.config/retroarch/content_history.lpl
[libretro INFO] 09:08:895 Common/FileUtil.cpp:399 I[COMMON]: ScanDirectoryTree: directory /home/stefano/snap/retroarch/423/.config/retroarch/saves/User/GC/USA/Card A/
[libretro ERROR] 09:08:896 Common/MemArena.cpp:75 E[MI]: shm_open failed: Permission denied
[libretro INFO] 09:08:896 Common/MemArena.cpp:104 N[MI]: mmap failed
[libretro INFO] 09:08:897 Common/FileUtil.cpp:268 I[COMMON]: Rename: )Z�U --> )Z�U
[libretro INFO] 09:08:943 Common/FileUtil.cpp:268 I[COMMON]: Rename: �kZ�U --> �kZ�U
[libretro INFO] 09:08:960 Common/FileUtil.cpp:268 I[COMMON]: Rename: ��’Z�U --> ��’Z�U
[libretro INFO] 09:08:977 Common/FileUtil.cpp:268 I[COMMON]: Rename: 0�#�� --> 0�#��
[libretro INFO] 09:08:994 Common/FileUtil.cpp:268 I[COMMON]: Rename: 8�[�U --> 8�[�U
[libretro INFO] 09:08:028 Common/FileUtil.cpp:268 I[COMMON]: Rename: �~Z�U --> �~Z�U
[libretro INFO] 09:08:045 Common/FileUtil.cpp:268 I[COMMON]: Rename: �^�U --> �^�U

and with x11 video driver

[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
ALSA lib conf.c:3916:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default
ALSA lib conf.c:3916:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ default

have you any idea? I can’t find any solution. It seems to me that this snap is just not good as it doesn’t work on all the distro I have tried
Thank you