Hello
In Ubuntu 25.04 i had the same issue. Took me a long time to manage to fix like as mentioned because i suspected the sdl2 module first. Thanks to you for helping. Just to summarize:
Change the line is es_systems.cfg to:
<command>sudo /home/xxx/RetroPie-Setup/retropie_packages.sh retropiemenu launch %ROM%</command>
And in /home/xxx/RetroPie-Setup/scriptmodules/supplementary/retropiemenu.sh following line to:
setESSystem "RetroPie" "retropie" "$rpdir" ".rp .sh" "sudo $scriptdir/retropie_packages.sh retropiemenu launch %ROM% " "" "retropie"
Can someone explain why this is not fixed? Or do i missing something?