mame icon indicating copy to clipboard operation
mame copied to clipboard

Linux volume control overlay causes "-bgfx_backend vulkan" to freeze

Open pmarks-net opened this issue 11 months ago • 8 comments

MAME version

0.273

System information

Reproduced on two different systems running Linux Mint 22 Cinnamon Edition:

  • Ryzen 5800X with NVIDIA RTX3080
    • Edit: I can reproduce this bug with the nouveau driver, but the proprietary nvidia 550 driver seems unaffected.
  • Intel N97 with integrated graphics

INI configuration details

I'm using the flatpak default:

$ find / -iname mame.ini 2>/dev/null /var/lib/flatpak/app/org.mamedev.MAME/x86_64/stable/7579077fa9051c1e16116cbed977ba61bc8636b9f98481cfbd4dd19ffbaa661a/files/share/mame/ini/mame.ini

#
# CORE SEARCH PATH OPTIONS
#
homepath                  $HOME/.mame
rompath                   /app/share/mame/roms
hashpath                  /app/share/mame/hash
samplepath                /app/share/mame/samples
artpath                   /app/share/mame/artwork
ctrlrpath                 /app/share/mame/ctrlr
inipath                   $HOME/.mame;/app/share/mame/ini
fontpath                  /app/bin/
cheatpath                 /app/share/mame/cheat
crosshairpath             /app/share/mame/crosshair
pluginspath               /app/share/mame/plugins
languagepath              /app/share/mame/language
swpath                    /app/share/mame/software

#
# CORE OUTPUT DIRECTORY OPTIONS
#
cfg_directory             $HOME/.mame/cfg
nvram_directory           $HOME/.mame/nvram
input_directory           $HOME/.mame/inp
state_directory           $HOME/.mame/sta
snapshot_directory        $HOME/.mame/snap
diff_directory            $HOME/.mame/diff
comment_directory         $HOME/.mame/comments
share_directory           $HOME/.mame/share

#
# OSD VIDEO OPTIONS
#
video                     opengl

#
# BGFX POST-PROCESSING OPTIONS
#
bgfx_path                 /app/share/mame/bgfx

Emulated system/software

No response

Incorrect behaviour

see below

Expected behaviour

see below

Steps to reproduce

  • Boot Linux Mint 22 Cinnamon Edition (installed or Live USB)
  • Run a recent MAME build: $ flatpak install flathub org.mamedev.MAME $ flatpak run org.mamedev.MAME pong -video bgfx -bgfx_backend vulkan
  • Observe that Pong is running
  • Press volume up/down on your keyboard, or just Alt-Tab
  • When the popup appears, MAME's video output freezes

Additional details

When I switch from "-video vulkan" to "-video opengl", this bug does not occur. Many/all games are affected; I used Pong here because it doesn't require a ROM.

I haven't tested other Linux distros / desktop environments, but Linux Mint is quite popular.

pmarks-net avatar Jan 29 '25 20:01 pmarks-net

This seems more like an issue with the compositor, window server or window manager. MAME doesn’t draw those overlays.

cuavas avatar Jan 29 '25 20:01 cuavas

Disabling Cinnamon's compositor had no effect. I'm aware that MAME doesn't draw the overlay, but it appears that the overlay is interfering with MAME's video updates. When the video freezes, the game continues running with sound.

I was not able to reproduce the bug using vkcube or vkgears, which suggests that this is MAME specific.

pmarks-net avatar Jan 29 '25 20:01 pmarks-net

This needs the actual .ini config details filled: I have no clue what Flatpak version sets up by default.

angelosa avatar Jan 30 '25 11:01 angelosa

Added mame.ini to my original post.

pmarks-net avatar Jan 30 '25 15:01 pmarks-net

Update: on my RTX3080 system, I'm able to reproduce this bug using the nouveau driver, but it goes away when I switch to the proprietary driver.

pmarks-net avatar Jan 30 '25 17:01 pmarks-net

Is this a thing that happens exclusively with MAME, or does it affect other emulators and Steam games and the like?

rb6502 avatar Mar 08 '25 16:03 rb6502

On my N97 system, I just tested PCSX2 in Vulkan mode, and VVVVVV on Steam (which started with a "Processing Vulkan shaders" dialog.)

Both work fine with the volume control overlay. MAME still freezes in Vulkan mode, though I haven't synced my git repo since filing this bug.

pmarks-net avatar Mar 08 '25 17:03 pmarks-net

for reference this is not an issue on my amd/deb12/xfce/X11 system with self-compiled MAME (277) nor the flatpak version (276), nor self built 273

sairuk avatar Apr 30 '25 05:04 sairuk