Power switch problems

There are several topics here about this. I am adding a new one as the symptoms are different.

The environment

  • RPi5 4 GB with RPi OS and KDE installed
  • Argon scripts executed
  • original RPi5 PSU
  • the max USB current line in config.txt is added
  • jumper set to “instant on”

The symptoms

  • RPi starts after power on
  • the switch can swith it off (long press) or reboot (double press)
  • until the red led on RPi is lit, the Pi can not be powered on
  • the red led doesnt go off for a long time or doesn’t go off at all until I press a power button on Argon case
  • long/several pressing of the button causes the LED to go dim
  • if the LED is dim, the power button can (at last) start the RPi
  • to start it faster you need to disconnect the PSU USB C connector and connect it again
  • disconnecting the PSU from the wall socked and connecting it again doesn’t start the RPi

Also it seems that a short pressing the button doesn’t shutdown the system properly, instead, the longer pressing it switch the RPi off immediately. I am not sure - I simply don’t see the system closing messages, al go off immediately.

Desired behavior:

RPi starts after short pressing the power button regardless of the disconnect time, LED status, etc.

What’s wrong?

Can KDE installed do something with this? I tried to use default RPi Wayland/Wayfire - the same.

I consider to disassemble the case and, if it is possible at all, to disconnect the power switch and connect it directly to the RPi using wires… As it is now, it ts annoying.

Most of your problems you have described, look as if the installation of the argon1.sh script was not successful.

Can you please provide additional information?

  • bootloader config
    vcgencmd bootloader_config
  • content of you config.txt
    cat /boot/firmware/config.txt
  • I2C devices
    ì2cdetect -y 1

Please try to post the content of config.txt as preformatted text (settings wheel) to get a better readability.

Continuing the discussion from Power switch problems:

pik33@raspberrypi:~ $ vcgencmd bootloader_config

pik33@raspberrypi:~ $ cat /boot/firmware/config.txt
# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details

# Uncomment some or all of these to enable the optional hardware interfaces

# Enable audio (loads snd_bcm2835)

# Additional overlays and parameters are documented
# /boot/firmware/overlays/README

# Automatically load overlays for detected cameras

# Automatically load overlays for detected DSI displays

# Automatically load initramfs files, if found

# Enable DRM VC4 V3D driver

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.

# Run in 64-bit mode

# Disable compensation for displays with overscan

# Run as fast as firmware / board allows

# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.






ì2cdetect -y 1
i2cdetect: command not found

Got i2cdetect running.

pik33@raspberrypi:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --  

Please remove/comment out these overclocking lines until the issue with the shutdown behavior is clarified. It‘s not only because a risk that the RPi5 could be general unstable, there also the I2C bus clock can be affected directly. This bus must be working stable for the communication between RPi5 and MCU inside the case to get the fan control and shutdown process working right.

Can you please check the status of the fan control/power button service „argononed“ and afterwards stop the service temporary to check the I2C communication?
The fan noise should observed during this procedure:

  • get current service status
    sudo systemctl status argononed
  • stop fan control / power button detection service
    sudo systemctl stop argononed
  • set fan to 100 %
    sudo i2cset -y 1 0x1a 0x80 0x64
  • disable the fan
    sudo i2cset -y 1 0x1a 0x80 0x00
  • set the fan to 100% again
    sudo i2cset -y 1 0x1a 0x80 0x64
  • start the argononed service again
    sudo systemctl start argononed
  • check the argononed service again
    sudo systemctl status argononed
pik33@raspberrypi:~ $ sudo systemctl status argononed
● argononed.service - Argon One Fan and Button Service
     Loaded: loaded (/lib/systemd/system/argononed.service; enabled; preset: enabled)
     Active: active (running) since Fri 2024-04-26 13:58:46 CEST; 51s ago
   Main PID: 1610 (python3)
      Tasks: 4 (limit: 4375)
        CPU: 109ms
     CGroup: /system.slice/argononed.service
             └─1610 /usr/bin/python3 /etc/argon/argononed.py SERVICE

kwi 26 13:58:46 raspberrypi systemd[1]: Started argononed.service - Argon One Fan and Button Service.

Removed overclocking,

Fan test works. Fan control worked OK before.

Short pressing the power while RPi on still does nothing while double press reboots, as it was before.

I will test this RPi more without OC

Okay, next step.

The power off command relies on the UART 0 (pin GPIO 14).
If you are brave, you can initiate the shutdown of the case manually. But I don‘t know if Argon ONE V3 reacts the same like V2.

  • check if pinctrl command is available and look for the current settings
    sudo pinctrl -p get GPIO14
  • close all open documents and stop argononed service
    sudo systemctl stop argononed
  • initiate shutdown (maybe after that command you have only 10 seconds until the power will cut automatically)
    sudo i2cset -y 1 0x1a 0x86 0x01
  • at V2, the MCU disconnects from I2C bus → 0x1a is not populated (—)
    sudo i2cdetect -y 1
  • if the power remains on after 10 seconds, force GPIO 14 to low
    sudo pinctrl -p set GPIO14 op dl
  • the power should be cut off to the RPI5
  • If that works, please check the current LED condition (on/off/flashing …)
    At a normal ordered shutdown it should be identical.

Regarding the power button press. To the normal shutdown needs to press the button for more than 3 seconds but shorter than 5 seconds ! Pressing longer than 5 seconds will cuts the power immediately without to wait for the GPIO14 pin.

Explanation: If the shutdown at MCU is initiated (via remote control, power button press >=3 seconds or the i2c command from above) the MCU waits until GPIO14 pin is going to low level. If that not happens, the power remains on the RPi5 and the RPi5 doesn‘t reacts on the power-on button press at the case, because the internal power cycle is missing.
To workaround that, you can do one of these steps:

  • press the remote control power button once again and wait >10 seconds
  • press the power button for >5 seconds
  • cut the power hard from the case (remove the power supply from the socket for some seconds).

After that a short press at the power button should work like expected.
Because you have set the jumper to always-on position, the RPi should starts immediately as soon you insert the power supply again, if you decide to use the last step.

It seems one has to learn how to press the power button.

Long enough, but too short pressed button while RPi was on causes the bad behavior - the Pi shuts down immediately and left the red led on. In this state it can not be switched on again.

I have to keep the button pressed a little longer until the screen goes black and the proper shutdown sequence starts. Then all is OK, LED go dim, I can start the RPi again.All works OK now.

The real issue that left is:

when the power button is pressed for about 2 seconds when RPi is on, it is too short to initiate a proper power down.. Instead, the RPi switches itself off and left the power on GPIO. That prevents the Argon case to wwitch it on again.

The solution/workaround is:

Keep the button pressed until the desktop disappears, then release it and the RPi is then proper shut down and can be started again.

There is no third signaling option documented. Button press shorter than 3 seconds should do nothing. It looks currently more that you triggered the normal shutdown process (>= 3 seconds) and that ends with unordered state. This can be if the shutdown script is not in place, not executed, stucks or something like that.

Do you have made the manually shutdown test like I described above?

Additional you should check what happens during shutdown if you press the power button until the desktop is going black (like you has described). I’m afraid, that it cuts the power at this moment and don’t do a graceful shutdown.
Open a SSH console before you press the button and start sudo journalctl -f to see what happens during shutdown process.

What is currently happen if you shutdown the system via KDE or poweroff command without using the power button? If the shutdown script is working right, than it should shutdown the system ordered and the LED should goes off after round about 10 seconds after the last service was stopped.

Yes, I did, it works.
Several (much less than 10) seconds after this sudo i2cset -y 1 0x1a 0x86 0x01 the system shuts down

No, it does the proper shutdown, displaying proper messages on the screen.

It does improper shutdown when the press is too short. When I release the switch while the desktop is still on, the Pi switches off abruptly, no messages, black screen, the LED goes immediately from green to red and stays red forever.

1 - very short press - nothing
2 - longer press - abrupt switch and no more start until power off
3 - long enough press - the desktop goes off, the screen displays a message that it is going to shutdown, the Pi shuts down, the LED goes off, the Pi can be switched on again
4 - very long press - power go off. It can switch off the pi from the bad state (2) if pressed long enough.

At least I have no more problems as I now know how to use the switch.

However, it seems there is an undefined state between “too short-nothing” and “long enough - shutdown”

I have this Pi disconnected and packed now, but as far as I can remember, it does exactly that (shutdown and led off after several seconds),

The behavior #2 is really new to me, but it’s not impossible. Perhaps this a firmware bug or a hidden feature to simulate a sleep of the RPi5 or something like that. If you want to update the firmware of the case, the process is decribed at the last page of PDF version of the case manual.