Try a smaller card, 8 or 16GB.
I'm using a 128GB SD card on a RPi4 without issue.
Try a smaller card, 8 or 16GB.
I'm using a 128GB SD card on a RPi4 without issue.
After a lot of search, it is finally working properly. My issue was that I thought there was a typo in the instructions while it was totally correct.
I had to had to the end of /flash/config.txt :
dtoverlay=gpio-poweroff,gpiopin=18,active_low=0
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up
As I said, I thought I had to replace "gpiopin=18" by "gpio_pin=18" to make it consistent with the next line (and according to my rapid search on the web) but I was wrong.
Thank you for your great help (without our exchanges, I think I would already have bought another case ) !
Hello,
I tried your method and the fist result was that the system was stuck at boot time with a message (I guess that it comes from systemd) saying that "A start job is running for kodi user autostart script..." with a counter like [22s/no limit].
I adapted autostart.sh to execute it in a non-blocking mode. I tried:
and
according to example given here.
And for both attempts, it was not able to see a difference in the shutdown process.
Should I try in a different way ?
Thank you !
Here is the current situation:
If I rely on the power push-button to switch the RPI off :
+--------------+
| Light is red |
| RPi is off |
+--+-----------+
|
| Push on the power button
v
+--+--------------+
| Light is green |
| RPi is on |
+--+--------------+
|
| Push on the power button
v
+--+---------------------+
| Light blinks red/green |
| Rpi goes off |
+------------------------+
Display More
I expect the light to go red after some time but it never happen. The solution for now is to keep the power button for 10s (forced shutdown), so that the light goes back to red.
If I take the power menu in Kodi, this is the scenario:
[Light is red, RPi is off] -- Push on the power button --> [Light is green, RPi is on] -- Select "Power off system" --> [RPi goes off, but light remains green]
For both scenario, I guess that the power hat is not notified about that the RPi is actually off.
As said, there is a MCU on the power hat. I don't think that the LED are controlled directly by the RPi. I think that it is the power hat MCU that drives them.
Thank you once more for your support !
You can see a picture of the power hat here, it's not obvious how things are wired and I event think that the LEDs are managed by a MCU (the STM8S001J3).
If we consider that the case instructions are correct, and that we need to reproduce the behavior made by the line:
How can this be done?
Thank you!
Hi,
I tried the first step : Power Button Scripting Part. It worked great, thank you !
I did the following steps, just changing the led_gpio_number from 13 to 18 like this :
#!/usr/bin/python
import sys
sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib')
import RPi.GPIO as GPIO
# Replace YOUR_CHOSEN_GPIO_NUMBER_HERE with the GPIO pin number you wish to use.
# Make sure you know which rapsberry pi revision you are using first.
# The line should look something like this e.g. "gpio_number = 7".
led_gpio_number = 18
# Use BCM pin numbering (i.e. the GPIO number, not pin number).
# WARNING: this will change between Pi versions.
# Check yours first and adjust accordingly.
GPIO.setmode(GPIO.BCM)
# Switch LED on.
# LED will switch off automatically at shutdown by using normal GPIO state.
GPIO.setup(led_gpio_number, GPIO.OUT)
GPIO.output(led_gpio_number, True)
Display More
And now, when I start it up, it switch itself down directly. So the operation definitely did something but maybe the polarity is inverted (or something else is wrong in the script). I was able to go back to a manageable situation by removing the Hat and renaming autostart.sh.
So, what do I need to do to make it work ?
Thank you !
Hello,
I have LE 9.2.1 (RPi4.arm) running on a RPi4. I put it in a case with a power button (this one). I can start it with the push on the button and the "forced shutdown" is also working (press the button > 10s). What I cannot have is a graceful shutdown. Following the instructions with the case, I appended to /flash/config.txt :
dtoverlay=gpio-poweroff,gpio_pin=18,active_low=0
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up
Now, if I do a short press on the power button, the power options dialog is blinking on the screen.
According to this thread, I tried :
LibreELEC:~ # cat /storage/.kodi/userdata/keymaps/keyboard.xml
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
<global>
<keyboard>
<key id="61662">Shutdown</key>
</keyboard>
</global>
But it doesn't work. I can still see
2020-05-11 22:51:50.944 T:3011641360 DEBUG: HandleKey: power (0xf0de) pressed, action is ActivateWindow(ShutdownMenu)
in the log.
How can I shut it down gracefully ? I also want to add that if I switch it off in Kodi, the power led on the case remains green (I still have to do a force shutdown to be able to boot it again).
Thanks !