Le Potato running Batocera V36 and Retroflag SuperPi case power on/off/reset scripts?

Not sure if this is the right place to ask, but here we go anyways.

I’m running Batocera V36 on the Le Potato and it runs beautifully. I bought a Retroflag SuperPi case that has the power & reset switches. I’m trying to figure out how to get the GPIO pins set up properly to work with the case. I’ve gone through setting up Batocera for the case according to their wiki but it does not work as intended with the Le Potato.

Anyone have some pointers on how to add whatever needed software and setup to get it functioning as intended?

Are you at least able to shut down the board properly?

Mine continues to reboot and after a month I am still waiting to someone replied to my help question.

1 Like

I don’t think it’s going to work as intended with the s905x-cc.

You can make a button halt the machine, but not turn it completely off, or back on. This requires a Device Tree Overlay. I haven’t done so, but I have read that it is possible.

Also, If set to input, and pulled low pin 15 will reset the board while it’s running, but not from a halted state. Once halted, only power-cycling the board will boot it again.

I have no idea whatsoever as to how to accomplish this on Batocera, by the way. I have I’ve messed around a little using SSH, but haven’t got far yet. I really hate pacman. It’s a shame they took obvious good name for a package manager.

See here for answers from more knowledgeable people than I:

EDIT
@freezr: That’s normal behavior. See the second link above. Again, I don’t know how to do it on Batocera directly, and I run that os on a different board anyhow. I can tell you that you log into Batocera as root, so you should skip the sudo in the above command. I really wish these kodi/retroarch type os’s would give us a CLI that we don’t have to access remotely.

SSH into Batocera to shutdown the board doesn’t work either… The board just reboots, I simply unplug it when the ethernet LED is inactive, not a great solution but do not have any other mean, do I?

Thanks,

F.

I don’t know. sudo shutdown -H now halts my machine on Ubuntu(case sensitive).

Where is the image from? I’ll try to test it.

I run Batocera on an Odroid n2+ which behaves differently.

You can write overlays that bind a gpio to a button. You can then setup button actions in whatever software you use. To shutdown, bind that button to what @angus wrote. Binding buttons to actions is software dependent.

So no one can help with the original question? I have no issues with shutting down via the Batocera menu or via SSH. I’m just clueless when it comes to GPIO. I’d love to have it explained to me like I’m a child lol

here’s the install script (retroflag-picase/batocera_install.sh at master · RetroFlag/retroflag-picase · GitHub)

here’s the safe shutdown script (retroflag-picase/batocera_SafeShutdown.py at master · RetroFlag/retroflag-picase · GitHub)

don’t know what else I would need to show or do to make it work with Le Potato.

Sorry I couldn’t help you but perhaps you can help me instead; I can’t shutdown the board whether is the GUI or SSH; please could you share the link where you got Batocera,?

Maybe the version I downloaded has issue, thanks… :pray::pray::pray:

Power Button: You’ll need to write a device tree overlay, which is not a skill you’re not going to learn from a single forum post. The main point of my previous post was that even if you do, it’s still not going to work like the power button on your desktop. It will only halt the machine, not shut it down fully or power it back up. You need to use a power supply with a switch, or physically unplug and replug it in to boot from a halted state.

Reset Button: If you set pin 15 to input and pull it to ground it will reset the machine, but only while it is running, not from a halted state.

https://mirrors.o2switch.fr/batocera/lepotato/stable/last/batocera-s905-lepotato-36-20230304.img.gz

this is the one i used. it always give me an error when flashing to the sd card with Baleena right at the end of the process, but it boots and works fine for me.

1 Like

Thank you very much, I appreciated it a lot. :+1:

Nothing to do… My board continues to restart itself, there is no way that I can shutdown it… I am thinking to sell it if I find another dumb willing to buy it…

The device uses 1W at idle which is about the same as the Raspberry Pi powered off. If shutdown -H now is not sufficient (0.8W), then you should fine a board with a PMIC.

I want to be constructive, do you believe this switch will be of any help?

https://a.co/d/bCEfoC1


To turn off manually the board when all the LED are off?

Thanks

1 Like

Yes, this should work fine. Boards will still draw power (sometimes significant) even in the “off” state. Physical power switch is the way to go.

1 Like

The switch made its dirty work, when the TV loses the signal now I can safely powering off the board manually.

Sorry to drag up an old post. I’ve got this exact setup as the original post. A le potato with a retroflag case planning on installing Batocera (but I’m willing to use any emulation distro). Only thing I’ve been able to find online is this thread so I made an account to post here. Has anyone been able to figure out a way to get the power and reset buttons from the retroflag case working?

We have this fixed in our newest bootloaders on boot.libre.computer/ci but we have no push it to batocera yet. You can try overwriting the batocera bootloader via libretech-flash-tool and report the results. If it doesn’t work, we’ll take a look at it.