Any way to get the Geekworm/SupTronics X-C1 addon power board safe shutdown to work in LibreElec, on an RPI 4?

  • From what I can gather it seems to be a simple GPIO interface - they have instructions for specific OS's here but mention that it's "unsupported due to the inability to modify the system in LibreElec".

    That... doesn't sound right to me, and I get the feeling it was more that they didn't want to bother figuring out how to do it themselves.

    So has anybody else used this or something similar and figured it out? I've done quite a bit of googling and can't really find anything specific to this board.

    Thanks in advance.

  • Not impossible, but as they observe, there is no apt-get so you need to build dependencies into the image. Easiest would be a custom image that adds pigpiod and other bits to the image and IIRC WiringPi is one of the Pi add-ons in our repo. Once you've gotten to that stage it's not a huge leap to then repackage things as a binary add-on that can be submitted-to and then installed-from our add-on repo. The demand is likely not that high though, so I'd build it for yourself and push the sources to a GitHub account so that anyone else seeking the same can repeat the process.

  • Not impossible, but as they observe, there is no apt-get so you need to build dependencies into the image. Easiest would be a custom image that adds pigpiod and other bits to the image and IIRC WiringPi is one of the Pi add-ons in our repo. Once you've gotten to that stage it's not a huge leap to then repackage things as a binary add-on that can be submitted-to and then installed-from our add-on repo. The demand is likely not that high though, so I'd build it for yourself and push the sources to a GitHub account so that anyone else seeking the same can repeat the process.

    Thank you for the response, but good LORD does that sound involved/like it would take a bit of doing. My level of expertise with Pi doesn't stretch much further than "put img on sd, put sd in pi, ok go". I can do some basic editing of configs and stuff, but when it comes to rebuilding a custom solution? Yeah I wouldn't know where to start lol.

    Still, good reply, thank you. If nothing else it gives me something to investigate.

    It's also possible to copy APT package content from RPi OS 64 bit to LE. Maybe creating LE add-ons from there is most elegant.

    Is that so? Hmm... might also have to look into that.

  • from a very quick look its basically the same stuff that was already done for the other RPi cases with a fan

    its basically creates 2 batch scripts and calls a fan.py to make it work.

    It looks very hacky overall, likely could be done easily using default linux commands etc.

    Oh I'm not terribly interested in the fan. I'd have no problem just hooking it up to constant power and scrapping the PWM entirely.

    What I'm more interested in is the power button functionality. I want to build a tiny HTPC with a 2tb 2.5" hdd in it, so the ability to actually shut the Pi off (or put it in a halt/suspend/whatever it's called state) would be very advantageous. Don't wanna have the HDD spinning constantly.

    If push comes to shove I'll just use a different add-on board with a simple push-button and use the standard gpio-shutdown commands. I just like the all-in-one solution that kit presents.

  • it just uses x-c1/install-ubuntu.sh at main · geekworm-com/x-c1 · GitHub

    there you have 2 scripts and a systemd service, thats it basically

    the only thing that looks missing is pigpiod

    this is likely not needed at all but needed for the script

    its tricky to "help" in such cases without having the hardware

    What does pigpiod even do? You say it's not needed, but wouldn't the script then need to be modified to account for that? Since why put it there in the first place if there's no true dependency.

    And yeah I find myself thinking it'd be easier if I just had the thing, but I don't want to spend a bunch of money on something that might not do what I want it to. Sure, I could run Raspbian (or... raspberry pi os since they wanted to rename it something boring) and then slap Kodi on it and make it autolaunch, but I'd rather use LibreElec since it's purpose-built for home theater stuff.

    Also again I'm not a programmer, just an average dude looking to build a thing. I understand that's working against me here though since the Pi is a development tool first and a computing solution second, but yeah. That said I did set up a resin 3D printer with a nanoDLP install which was no mean feat for the specific hardware i was using, so i'm sure i can do it eventually. Just dunno which end of the buffalo to start at.

  • Hi guys,

    Out of nowhere, first post here, great reads, thanks!

    About this subject, a small 'up' to bump this thread up, as I share the same interest for this solution,

    Any update?

    Cheers