Can you shut down Raspberry Pi running LibreELEC?

  • You can use halt target instead of poweroff target:

    Code
    ln -s /usr/lib/systemd/system/halt.target /storage/.config/system.d/poweroff.target
    systemctl daemon-reload

    Okay, thanks mglae, I'll have to look into what is the difference between halt and poweroff. If halt is the equivalent of manually removing power, that won't be an improvement to just switching the power off.

    Meanwhile, I did get a log doing the menu item Power System Off while running the default skin Estuary. The error looks just the same, starting with the button press about 1112:

    hastebin

  • Well I read a bunch of pages on shutdown/poweroff/halt, and they're all as clear as mud.

    So I just went ahead and tried @mglae's suggestion. It works. Now when I click on Power System Off, the LEDs go off and stay off. The TV still goes off, which is good. I'm still wondering why that change was needed for me when it wasn't for others. Perhaps it's my CEC environment.

    Anyway, thanks very much mglae. And thanks to Da Flex for all the troubleshooting.

    Only thing is, the case fan stays on, which I guess is expected because apparently the power to GPIO pins remains on as long as there is power connected to the Pi.

  • Good to hear. In my link at post #2 I gave instructions, how to power on / off a status LED. That's usable for your fan problem, too.

    Sorry, I couldn't really understand that post, or know what parts of it would apply to the fan.

    I read some posts that say editing the eeprom-config as follows would turn off the 3.3V pins when the Pi is off, but it didn't work for me.

    Code
    LibreELEC:~ # rpi-eeprom-config --edit
        [edited in nano]
    LibreELEC:~ # reboot
    LibreELEC:~ # rpi-eeprom-config
    [all]
    BOOT_UART=0
    WAKE_ON_GPIO=0
    POWER_OFF_ON_HALT=1
  • If your fan has an on / off mode (only two contacts in use), then you can apply the same wiring and software, like for the status LED. Switch it on by the auto-start script, and after shutdown the pin goes (hopefully, in your case) back to default state, which means off for the fan.

  • I'm still wondering why that change was needed for me when it wasn't for others.

    You did not mention before you are using a case with fan and likely did install some software intercepting the power off path.

    Only thing is, the case fan stays on, which I guess is expected because apparently the power to GPIO pins remains on as long as there is power connected to the Pi.

    That is to be expected. The halt target only stops the CPU and nothing from the chip set.

  • You did not mention before you are using a case with fan and likely did install some software intercepting the power off path.

    I didn't install any software or make any configuration changes associated with the fan. Also, one of the troubleshooting steps was booting a fresh, untouched install of LE 10.0.4, and behavior was the same.

    That is to be expected. The halt target only stops the CPU and nothing from the chip set.

    Perhaps you can help me understand further. I've read in several posts that making the changes below with rpi-eeprom-config --edit will result in turning off the 3.3-volt pins (which I'm using) when the system is halted. Seems people have successfully used this to turn off fans when shutting down, but it hasn't worked for me.

    Code
    WAKE_ON_GPIO=0
    POWER_OFF_ON_HALT=1
  • There is a chance that you've connected your fan wrongly, and that has caused your reboot issue. The fan eventually generates some voltage on a pin, which triggers a reboot.

    So whatever fan you have, RTFM, and connect it wisely.

  • There is a chance that you've connected your fan wrongly, and that has caused your reboot issue. The fan eventually generates some voltage on a pin, which triggers a reboot.

    So whatever fan you have, RTFM, and connect it wisely.

    Thanks, yes that's an excellent thought, so I triple-checked that. For low speed (3.3V), instructions show the red/positive wire going to pin 1 (3.3V) and black/negative to pin 6 (ground). That's the way it is. I would try reversing them just to be sure the fan isn't wired wrong, but the instructions also say if you don't connect it correctly you will damage the fan. It's a tiny 30 mm 2-wire fan.

  • I would disconnect the fan for testing, and see whether you still need the workaround to avoid a reboot. If no workaround is needed after this, then something is fishy with the fan.

  • Another great idea! Unfortunately no joy. I disconnected the fan, booted, then did Power System Off menu. Pi turned off (no lights).

    Then I renamed that link that mglae had me make, to temporarily disable it, then rebooted. This time, Power System Off caused it to do the pseudo reboot as before: lights off then back on, access light blinks a bit, and it doesn't work.

    You gave me the idea that maybe the HDMI cable was not working right, so I used a different one. Behaved exactly the same.


    That pretty much leaves the Pi itself. Maybe this revision behaves differently, or some little hardware glitsch?

    Code
    LibreELEC:~ # uname -a
    Linux LibreELEC 5.10.110 #1 SMP Sat Jan 7 12:15:32 UTC 2023 aarch64 GNU/Linux
    
    LibreELEC:~ # cat /proc/cpuinfo 
    . . .
    Hardware    : BCM2835
    Revision    : c03115
    Serial        : 100000007bffed02
    Model        : Raspberry Pi 4 Model B Rev 1.5

    This Rev 1.5 apparently has a different PMIC than before. I think that's Power Management something? Hmmm . . .


    Hardware changes in Pi 4 Model B Rev 1.5 ? - Raspberry Pi Forums

    Edited 4 times, last by Glorious1: Merged a post created by Glorious1 into this post. (February 22, 2023 at 6:44 PM).