Problem with autostart.sh on RPI-4 Libreelec 11.95.1 Omega
-
Kokemon -
April 7, 2024 at 6:35 PM -
Thread is Resolved
-
-
To make it complete, please check every listed chip:
The correct one has 58 on the RPi4 (but the pin count could be split/vary on RPi5) as the return value for ngpio and I'm assuming the label is "pinctrl-bcm2712" or something similar.
for ngpio i have 32 as result and gpio-brcmstb@107d508500 for the label
-
The original intention was, that you repeat this for every gpiochip.
gpiochip512
gpiochip544
gpiochip548
gpiochip565
gpiochip571
But I think, that I know the answer. You can check the gpiochip571 and you should get "54" for ngpio and "pinctrl-rp1" for label as the return values.
QuoteI have to do more tests when I get home, but it seems to be ok
Thanks a lotHave you had time to test more? Are there any problems or is it working?
I was afraid that the pin number was to generic and could be used at the wrong pin. So I have changed the pinctrl script version some minutes ago. Please check the new version. -
Quote
But I think, that I know the answer. You can check the gpiochip571 and you should get "54" for ngpio and "pintctrl-rp1" for label as the return values.
That’s it
Have you had time to test more? Are there any problems or is it working?
I don’t know if it’s due to the board but when I connect the power to the board the pi5 shutdown just after start
I’m not at home right now so it’s a little bit complicated to make test remotely.
-
Quote
I don’t know if it’s due to the board but when I connect the power to the board the pi5 shutdown just after start
Do you have this strange behavior only since you tried the pinctrl version? Have you updated to the current version?
The GPIO15 seems to me to be the more important signal for shutting down. It may be triggered the MCU on the RemotePi pcb before the irwitch.sh script was started. These 2 pins (GPIO14/15) are part of UART0. Depending on your bootloader/EEPROM settings and config.txt, conflicts can occur. But this conflict should also exist if you have not installed the script. Can you check without the scripts, if the shutdown also is initiated automatically?
This information would be important for me to know.
-
Do you have this strange behavior only since you tried the pinctrl version? Have you updated to the current version?
Hello, yes, without the scripts I don’t have shutdown. I didn’t notice this with the first version you made. I just update to the last nightly version… I will retry later when I ´m come back home to see…
-
Do we talk about the same thing? I meant, that I have updated the scripts inside of the 2 codeblocks in Post #17
-
Do we talk about the same thing? I meant, that I have updated the scripts inside of the 2 codeblocks in Post #17
Yes I updated the 2 scripts this morning like in your post.
And I have a shutdown at startup...After that I updated to latest nightly version 12.0 (20240416-8b61557) and uncommented the scripts and now it seems to work (and start fine)
I don't know if there is a connection... but it seems to work currently with your scripts...
-
It’s not impossible, but I currently doesn‘t know about changes in the images, which are related to these scripts.
If it‘s working now, I‘m happy and will not touch the scripts. Perhaps only to add some version comments and replacing the deprecated usleep command, no functional change.
For documentation purposes, please can you provide the following informations?- config.txt
cat /flash/config.txt - kernel log
dmesg | grep -i uart - ls -la /dev/ttyAMA*
- pinctrl -p get
- Do you know which version of the RemotePi do you have? I read about, that the pcb has a current limiter to prevent damages at RPi pcb. But this can also restrict the current to much for your RPi5 and you are get in trouble, because not enough power.
- config.txt
-
Perhaps only to add some version comments and replacing the deprecated usleep command, no functional change.
yes It will be cool...
Quote from HarryHcat /flash/config.txt
Code
Display More# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2009-2014 Stephan Raue ([email protected]) # Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv) ################################################################################ # Bootloader configuration # config.txt version v1 (do not remove or change this line!) ################################################################################ # For more options and information see # http://rpf.io/configtxt ################################################################################ # Don't send initial active source message. # Avoids bringing CEC (enabled TV) out of standby and channel switch when # rebooting. hdmi_ignore_cec_init=1 [all] ################################################################################ # Use distroconfig-composite.txt instead of distroconfig.txt to enable # composite video output. # The composite video mode needs to be configured in cmdline.txt: # For PAL add: video=Composite-1:720x576@50ie # For NTSC add: video=Composite-1:720x480@60ie ################################################################################ include distroconfig.txt #include distroconfig-composite.txt # uncomment to enable infrared remote receiver connected to GPIO 18 #dtoverlay=gpio-ir,gpio_pin=18
Quote from HarryHdmesg | grep -i uart
Code[ 0.000000] Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 smsc95xx.macaddr=D8:3A:DD:CF:C9:00 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000 boot=UUID=0604-1456 disk=UUID=e37f87e7-658e-4610-abc3-cd9177b85998 quiet console=ttyAMA10,115200 console=tty0 [ 0.010450] Serial: AMBA PL011 UART driver [ 0.348037] 107d50c000.serial: ttyS0 at MMIO 0x107d50c000 (irq = 35, base_baud = 6000000) is a Broadcom BCM7271 UART [ 2.515145] Bluetooth: HCI UART driver ver 2.3 [ 2.515151] Bluetooth: HCI UART protocol H4 registered [ 2.515172] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 2.515306] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator [ 2.515356] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator [ 2.515375] Bluetooth: HCI UART protocol Broadcom registered
Quote from HarryHls -la /dev/ttyAMA*
Quote from HarryHpinctrl -p get
Code
Display More1: 3v3 2: 5v 3: no pu | -- // GPIO2 = none 4: 5v 5: no pu | -- // GPIO3 = none 6: gnd 7: no pu | -- // GPIO4 = none 8: ip pd | lo // GPIO14 = input 9: gnd 10: no pd | -- // GPIO15 = none 11: no pd | -- // GPIO17 = none 12: no pd | -- // GPIO18 = none 13: no pd | -- // GPIO27 = none 14: gnd 15: no pd | -- // GPIO22 = none 16: no pd | -- // GPIO23 = none 17: 3v3 18: no pd | -- // GPIO24 = none 19: no pd | -- // GPIO10 = none 20: gnd 21: no pd | -- // GPIO9 = none 22: no pd | -- // GPIO25 = none 23: no pd | -- // GPIO11 = none 24: no pu | -- // GPIO8 = none 25: gnd 26: no pu | -- // GPIO7 = none 27: ip pu | hi // GPIO0 = input 28: ip pu | hi // GPIO1 = input 29: no pu | -- // GPIO5 = none 30: gnd 31: no pu | -- // GPIO6 = none 32: no pd | -- // GPIO12 = none 33: no pd | -- // GPIO13 = none 34: gnd 35: no pd | -- // GPIO19 = none 36: no pd | -- // GPIO16 = none 37: no pd | -- // GPIO26 = none 38: no pd | -- // GPIO20 = none 39: gnd 40: no pd | -- // GPIO21 = none
Quote from HarryHDo you know which version of the RemotePi do you have? I read about, that the pcb has a current limiter to prevent damages at RPi pcb. But this can also restrict the current to much for your RPi5 and you are get in trouble, because not enough power.
It's the RemotePi Board for Pi 4.
Yes maybe shutdown on startup can be due to a sporadic power issue... If it happens again I will maybe try to power directly the board with direct power supply. -
Thank you for that useful information.
I have added the version comments to better show, if something has been changed.
-
Thanks for your wonderfull help
-