Update retroarch.sh to enable KMS/DRM on x11 platform?
-
In projects and themes forum we've had an active discussion thread about 'wrapper' script to install RetroPie on Ubuntu (20.04) LTS on x86 platform in a manner that produces experience similar to RetroPie pre-made images do on rpi. One of the recent additions to the install script has been ability to run Emulationstation and RetroArch cores (and other emulators) in Linux KMS/DRM mode (e.g. without X). However in order to achieve that, install script needs to patch retroarch.sh under RetroPie-Setup to enable running it in KMS/DRM mode. This means adding
--enable-kms
and--enable-egl
configure flags andlibdrm-dev
andlibgbm-dev
dependencies for x11 platform. Please see patch file below.I am hoping/asking if RetroPie could update RetroPie-Setup/scriptmodules/emulators/retroarch.sh to have these changes enabled by default for x11? It appears that RetroArch works with these changes just as well as before when executed under X, but now can also be used without. That said, my testing has been superficial at best.
Having these changes implemented would remove a need to patch RetroPie-Setup scripts during install - something I feel would be nice to avoid.
What are your thoughts? @mitu (tagged you as I saw you as one of contributors to retroarch .sh).
RetroPie-Setup/scriptmodules/emulators/retroarch.sh.patch
23c23 < isPlatform "x11" && depends+=(libx11-xcb-dev libpulse-dev libvulkan-dev) --- > isPlatform "x11" && depends+=(libx11-xcb-dev libpulse-dev libvulkan-dev libdrm-dev libgbm-dev) 66c66 < isPlatform "x11" && params+=(--enable-vulkan) --- > isPlatform "x11" && params+=(--enable-vulkan --enable-kms --enable-egl)
-
I don't think this is the correct solution, since
x11
means this is running under Xorg. If you wish to usekms
as a platform flag, use these settings. -
@mitu Thanks for the pointer! I wish I had asked / noticed that earlier! :) I'll give it a test soon! Thanks again!
-
@mitu Thanks. Setting __has_kms=1 in the install script works nicely. The problem I have is that when I enable it, then __platform_flags does not appear to end up containing x11, and if platform flags don't contain x11, e.g. retroarch won't include vulkan (or pulse audio) support.
So what I'd like to have is both kms and x11 in platform flags to get dependencies and features for both compiled in.
Other than patching files under RetroPie-Setup, is there some way to achieve this that I didn't realize?
-
@etheling said in Update retroarch.sh to enable KMS/DRM on x11 platform?:
Other than patching files under RetroPie-Setup, is there some way to achieve this that I didn't realize?
No, you need to patch the scriptmodule to have both vulkan and KMS support.
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.