RetroArch with CRTSwitchRes on Raspberry Pi



So here I have A Raspberry PI booting straight into RetroaArch with full CRTSwitchRes support.

The main prerequisite is X11 full KMS mode. This is a big leap in 15hz switching when it comes to the RPi.

My question is. What is the possibility of making this available within lakka. Or creating a separate OS lakka-15khz?

Is this something anyone is interested in doing or helping out with?


Wow, that’s beautiful! Great work! If it works with KMS, then I don’t see any reason why it wouldn’t be included in Lakka as soon as it’s merged into RetroArch. I wouldn’t really think it needs an entirely different Lakka release if it can be an option. Is there any reason not to have it work from the same CRT SwitchRes option in the video settings?


It isn’t using KMS mode setting. So it is still reliant in X11. For KMS mode setting you need to patch the Linux kernal to allow 15khz.

Code wise there is not much change. Add HDMI output and adjusting the porches and horizontal resolution to be comparable.

The full KMS mode is the go video driver used instead of fdturbo. It allows for full X11 capability, including xrandr.

I’m still working on porting to the randr library. But this would still need the fake KMS gl video driver.


Oh, gotcha.

I think Lakka has an X11-enabled build already for people that need to use the proprietary Nvidia driver…? If that’s the case, they may be able to extend that to include an RPi build, as well.


I have downloaded the Lakka source. It took 7 hours and 45gb of space to compile. However, the OS is locked down. I can not make changes like adding new RetroArch files among other things.

I did compile with the argument “X11SERVER=yes” but I’m not sure if this was the correct way of doing it. Also because the is no access to the files system I can not check or see if there may be any changes need.

Building a Linux OS is a bit above my knowledge so any help would be appropriated.


heh, yeah, it takes forever to compile it :stuck_out_tongue:

I believe you would have to add any changes prior to compiling, which makes it difficult to test. Perhaps @gouchi can provide some insight.



Please specify exactly what is needed so that we can try to include in Lakka and open an issue so that we don’t forget about it :wink:

After that we can provide testing build.

Thank you.


Hey @gouchi

The only thing required is x11. I know you have moved away from this for good reason. However, with the new CRTSwitching that is included into RetroArch it would be nice being able to use it in with Lakka.

It works perfectly when you use it on top of a desktop envirement like lxde or even gnome. Oviously we dont want the extra over head of the DE aswell. I’ve attempted setting up xorg without a DE but CRTSwitching does not seem to work well. I would assume this is due to not setting up some of the required x11 option/config. I have it running on Arch and Ubuntu ATM.

This is also running on Raspberry PI quite well to but again I’m having to use it on top of DE. This is using the same case as Linux but enabling full kms gl video driver in raspi-config and using SDL2 for the Retroarch video driver.

This video is the Raspberry PI running RetroArch in CRTSwithing mode.

Maybe it would be possible to add x11 but a boot flag so x11 can be enabled or disabled as required?

I’ll add an issue later outlining what I’ve posted here. If you think you might need more information let me know.


Thank you for the information.

Do we need also this issue to be fixed ?

We will have to check for the RPi project as we don’t use X11.


The issue is just for menu improvements, everything will work fine without the addition of these but it will be worth having them once available. Are you able to edit the retroarch.cfg within lakka terminal?

So does Lakka OS PC version currently include x11?



Yes you can edit retroarch.cfg within lakka terminal.

Lakka is based on LibreElec which include x11 but it is not enabled on Lakka.


Is it simple to enable? I did try to build generic Lakka with X11SERVER=yes. However, this did not work. Is there an option to enable x11 now? is it a simple compile argument? or is it something we’ll have to wait for?

If it is a compile argument for PC. I could host the CRT switchres Lakka for download if its simpler?

If you need more info or help if you get around to enabling x11 for RPi give me a shout.



You should at least enable X11 for RPi/RPi2 projects then remove --disable-x11 parameter and add --enable-x11 to make a test.


–disable-x11 parameter and add --enable-x11

I assume this will be within your build scripts for lakka? Could you point me in the right direction. Or are you just talking general Retroarch compiles?


Yes the change has to be made to the l.54 from RetroArch package.


OK, cool. I will give this a try.

Will this also work for Generic PC? Or are there any other parameters for compiling x11server?

Cheers man, hopefully I’ll have some good test builds soon.


@gouchi I have not tried RPi yet. However, I did try generic PC. When disabling KMS and enabling x11, lakka just hangs at the logo screen. My guess is that it’s conually trying to load Retroarch but keeps failing because x11 is not enabled within the OS?

What is needed to load x11 with the lakka OS for generic PC?


You adapted the configuration for the Generic platform ? Enable X11 and RetroArch ?

If needed there is a documentation about accessing Lakka command line interface.


I edited the Retroarch I didn’t know about the changes for x11. I will try them now.

Cheers again


Hey @gouchi

I’m have quite a few compile errors, many I’ve been able to get around. However, I keep getting errors.

What is the best compile OS/environment to get this compiled on?

I did have a compile a while back but I removed it. To the fresh new source, oopps!