Script for Lakka


I have the 10inch Picade with PI4.
Currently only Lakka support PI4 so I have installed it but I have problems with picadehat script for setup audio and buttons.

With SSH i tried the command “curl https://… | bash” for install but curl is not supported.
So, I have downloaded the script manually and copied to folder via SCP command but the script doesn’t works for error that say that found an unexpected “(“ characters (seems that array is unrecognized).
Also I have noticed that apt-get command is disable on Lakka so will be not possible to execute the commands inside the script.

Have you any solution for that?

Thank you


I had the same issue and this is the solution what found a guy on Reddit.

I tried today, and I blocked when i tried to write with the SSH.

Would be wonderful if you can record your screen during the process.

This is the solution :

You need to install the GPIO driver that Pimoroni provides. Download this file and extract it somewhere. Copy picade.dts and etc/udev/rules.d/10-picade.rules to Lakka (doesn’t matter where, /storage is fine) and SSH to it.

From there run the following:

mv 10-picade.rules /etc/udev/rules.d/10-picade.rules


dtc -I dts -O dtb -o picade.dtbo picade.dts

Then you need to copy the resulting file to the appropriate boot section.

mount -o remount,rw /flash


cp picade.dtbo /flash/overlays/

edit config.txt so the end looks like this:

include distroconfig.txt

And comment out the last line of distroconfig.txt: #dtparam=audio=on

Then remount the boot folder as read-only mount -o remount,ro /flash

Then reboot. Your joystick and buttons should now be recognized. Now go to RetroArch and in Settings / Audio go to Device and choose sysdefault:CARD=sndrpihifiberry.

Now here’s where it becomes a bit touchy: you need to add etc/asound.conf to /etc and the only way to do this is to edit the SquashFS filesystem. At this point if you really don’t know what you are doing you can break your whole Lakka install. You need to unsquashfs SYSTEM, add asound.conf from in its /etc and then recreate the squashfs. Finally replace the resulting SYSTEM file. I don’t even know if you can do this from Windows as I use Linux on my desktop computer. Here’s a quick tutorial on how to do it on Linux
EDIT: updated post as I got the sound to work.

EDIT2: added link to unsquashfs tutorial.

Thank you Benodino! Finally it works :)
I don’t know how to recorder screen, but I can help you if you want (I can write a step by step guide or share with you my Lakka Pi4 image with picade)

I have only an issue. After squashfs process, the “root” password is unrecognized but I have transferred ROM with samba.

How can I help you?


Glad to hear that. If you can share your image, that d be wonderful. Like that I just to push on my SD card.

As you want, you can write too ;). My mail address :

My guide:

  1. Install LAKKA on your SD card (currently you can download the Pi4 version that is stable)

  2. Open your SD on your PC/Mac and edit config.txt. Remove “#” on “hdmi_force_hotplug=1” to enable hotplug for HDMI to work with Picade

  3. Open terminal on your PC (I’m using Mac). Connect to Picade using SSH with the command: ssh root@<put_picade_ip_here>, like ssh root@

    The password is root

  4. create a folder (currently you will be in /storage directory). Use command mkdir picadehat

  5. exit from SSH using exit command e return to your PC/Mac.

  6. Download this file and extract it somewhere

  7. Move in this folder using cd command

  8. Copy the files etc/udev/rules.d/10-picade.rules and picade.dts in the picadehat folder with the following command (if require password, use always root):

    • scp picade.dts root@<put_picade_ip_here>:/storage/picadehat

    • scp etc/udev/rules.d/10-picade.rules root@<put_picade_ip_here>:/storage/picadehat

  9. Connect to Picade using SSH with the command: ssh root@<put_picade_ip_here>

  10. cd picadehat to move inside the folder. You can use ls command to see if the files are copied inside

  11. type: mv 10-picade.rules /etc/udev/rules.d/10-picade.rules

  12. then: dtc -I dts -O dtb -o picade.dtbo picade.dts

  13. then: mount -o remount,rw /flash

  14. then: cp picade.dtbo /flash/overlays/

  15. then: cd /flash

  16. edit the file config.txt (I use nano config.txt) and the end of file must look like this:

    include distroconfig.txt
  17. edit the file distroconfig.txt and add comment (the # character) before this line dtparam=audio=on so it looks like #dtparam=audio=on

  18. remount as read only with this command mount -o remount,ro /flash

  19. reboot with command reboot

  20. In the menu go to Settings/Audio/Device, replace (using keyboard) with this line sysdefault:CARD=sndrpihifiberry

  21. The last part. Shutdown and remove the SD card. Put in your PC (I’m using mac, I don’t know in windows)

  22. Install with brew install squashfs (in Mac).

  23. Copy the file SYSTEM inside the SD card in a folder of your PC, move inside this folder with terminal and run the command:

    unsquashfs SYSTEM

  24. Enter in the folder extracted and copy inside /etc the file asound.conf that you found in the initial ZIP downloaded

  25. recreate the file SYSTEM with the command (you must be in the folder where you have extracted squashfs-root with previous command):

    mksquashfs squashfs-root/ SYSTEM -noappend -always-use-fragments

  26. Replace the SYSTEM file recreated in the SD card

  27. Put SD card in Picade and turn on

  28. Enjoy :)

So basically if I’m a Windows user then I’m stuck with no sound … and a backwards screen that when inverted in config.txt doesn’t invert the mouse along with it so desktop applications and C=64 and Amiga emulators are out of the question

Yes :(

You can try using a live Linux distribution like Ubuntu so you can configure your sd without install Linux

Doesn’t matter anyway, I’m going to have to come up with an alternative sound solution because the Fan Shim I bought to cool the Pi 4 is not compatible with Arcade X I2S DAC so sound is not going to work for me anyway … Not a real big deal anyway since I have a PAM8403 module with a switched pot attached that I can wire to the analog outputs … Since I’m using a riser I’ll just snip the BCM18 pin so the signal doesn’t even reach the Arcade X hat and cause a problem

Oh well, I kinda wanted to make this stereo anyway so I would probably be doing this eventually … Best laid plans of mice and men and all that I guess … Maybe 3D print some front firing speakers I can attach to the sides of the cabinet that can double as some 80’s style bling …