Argon one script on Raspy OS Trixie installation error

I Try to install the argon script on Raspy OS Trixie but I have an error and the shutdown configuration is not created.

curl https://download.argon40.com/argon1.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*************
 Argon Setup  
*************
100 22328  100 22328    0     0   135k      0 --:--:-- --:--:-- --:--:--  136k
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-libgpiod is already the newest version (2.2.1-2).
The following package was automatically installed and is no longer required:
  libyuv0
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libyuv0
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  i2c-tools libi2c0 read-edid
Suggested packages:
  libi2c-dev
The following NEW packages will be installed:
  i2c-tools libi2c0 python3-smbus read-edid
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 117 kB of archives.
After this operation, 879 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian trixie/main arm64 libi2c0 arm64 4.4-2 [9,736 B]
Get:2 http://deb.debian.org/debian trixie/main arm64 i2c-tools arm64 4.4-2 [78.8 kB]
Get:3 http://deb.debian.org/debian trixie/main arm64 python3-smbus arm64 4.4-2 [12.7 kB]
Get:4 http://deb.debian.org/debian trixie/main arm64 read-edid arm64 3.0.2-1.1+b1 [15.3 kB]
Fetched 117 kB in 0s (956 kB/s)      
Selecting previously unselected package libi2c0:arm64.
(Reading database ... 66412 files and directories currently installed.)
Preparing to unpack .../libi2c0_4.4-2_arm64.deb ...
Unpacking libi2c0:arm64 (4.4-2) ...
Selecting previously unselected package i2c-tools.
Preparing to unpack .../i2c-tools_4.4-2_arm64.deb ...
Unpacking i2c-tools (4.4-2) ...
Selecting previously unselected package python3-smbus:arm64.
Preparing to unpack .../python3-smbus_4.4-2_arm64.deb ...
Unpacking python3-smbus:arm64 (4.4-2) ...
Selecting previously unselected package read-edid.
Preparing to unpack .../read-edid_3.0.2-1.1+b1_arm64.deb ...
Unpacking read-edid (3.0.2-1.1+b1) ...
Setting up libi2c0:arm64 (4.4-2) ...
Setting up read-edid (3.0.2-1.1+b1) ...
Setting up i2c-tools (4.4-2) ...
Setting up python3-smbus:arm64 (4.4-2) ...
Processing triggers for man-db (2.13.1-1) ...
Processing triggers for libc-bin (2.41-12+rpt1) ...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
i2c-tools is already the newest version (4.4-2).
i2c-tools set to manually installed.
The following package was automatically installed and is no longer required:
  libyuv0
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
/lib/systemd/system-shutdown/argon-shutdown.sh: No such file or directory
chmod: cannot access '/lib/systemd/system-shutdown/argon-shutdown.sh': No such file or directory
Created symlink '/etc/systemd/system/multi-user.target.wants/argononed.service' → '/usr/lib/systemd/system/argononed.service'.
Hit:1 http://deb.debian.org/debian trixie InRelease
Get:2 http://deb.debian.org/debian trixie-updates InRelease [47.3 kB]
Get:3 http://deb.debian.org/debian-security trixie-security InRelease [43.4 kB]
Get:4 http://deb.debian.org/debian-security trixie-security/main arm64 Packages [60.3 kB]
Get:5 http://deb.debian.org/debian-security trixie-security/main armhf Packages [57.6 kB]
Get:6 http://deb.debian.org/debian-security trixie-security/main Translation-en [38.0 kB]
Get:7 http://deb.debian.org/debian-security trixie-security/non-free-firmware Translation-en [352 B]
Get:8 http://archive.raspberrypi.com/debian trixie InRelease [54.7 kB]
Get:9 http://archive.raspberrypi.com/debian trixie/main armhf Packages [351 kB]
Get:10 http://archive.raspberrypi.com/debian trixie/main arm64 Packages [352 kB]
Fetched 1,005 kB in 1s (881 kB/s)                         
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  libyuv0
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
BOOTLOADER: up to date
   CURRENT: Wed 27 Aug 18:57:12 UTC 2025 (1756321032)
    LATEST: Thu  8 May 15:21:35 UTC 2025 (1746717695)
   RELEASE: default (/usr/lib/firmware/raspberrypi/bootloader-2711/default)
            Use raspi-config to change the release.

  VL805_FW: Dedicated VL805 EEPROM
     VL805: up to date
   CURRENT: 000138c0
    LATEST: 000138c0
*********************
  Setup Completed 
*********************
Version 2507001

We acknowledge the valuable feedback of the following:
ghalfacree, NHHiker

Feel free to join the discussions at https://forum.argon40.com


Use 'argon-config' to configure device

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
/lib/systemd/system-shutdown/argon-shutdown.sh: No such file or directory
chmod: cannot access '/lib/systemd/system-shutdown/argon-shutdown.sh': No such file or directory

What i can do to resolve this issue?

3 Likes

Hello Picard12,

Maybe try running the commands with sudo, like:

sudo https://download.argon40.com/argon1.sh | bash

At least, this solved installation errors for me.

Update:

I just checked on my system, and there also is no ‘/lib/systemd/system-shutdown/argon-shutdown.sh’, but running with sudo did not result in error messages…. Hmm. maybe this is why my power off is not working properly? I’ll go revisit the logs (if I can find them).

Running Raspberry Pi OS (trixie) on a Raspberry Pi 5 housed in an Argon One V3 NVME (not completely the same set-up as you have, but maybe the common denominator is Raspberry Pi OS (trixie)).

Regards,
Jermus.

After a lot of testing I found the solution by writing two scritpt:

Install this packages: sudo apt update

sudo apt install -y python3 python3-libgpiod gpiod i2c-tools python3-psutil python3-smbus i2c-tools -y

Then write the two files:

  1. sudo nano /usr/bin/argononed_gpiod.py

#!/usr/bin/env python3

import gpiod

import time

import os

import sys

import signal

import logging

# === CONFIGURAZIONE ===

FAN_PIN = 18 # Ventola (BCM)

BUTTON_PIN = 5 # Pulsante power

LED_PIN = 6 # LED rosso

CHIP_NAME = “gpiochip0”

TEMP_PATH = “/sys/class/thermal/thermal_zone0/temp”

# Soglie ventola (°C)

FAN_LOW = 50

FAN_HIGH = 60

LOG_PATH = “/var/log/argononed.log”

# === LOGGING ===

logging.basicConfig(

filename=LOG_PATH,

level=logging.INFO,

format=“%(asctime)s [%(levelname)s] %(message)s”,

)

def log(msg):

print(msg)

logging.info(msg)

# === FUNZIONI ===

def wait_for_chip(chip_name=CHIP_NAME, timeout=20):

elapsed = 0

while elapsed < timeout:

try:

return gpiod.Chip(chip_name)

except FileNotFoundError:

time.sleep(0.5)

elapsed += 0.5

log(f"ERRORE: impossibile aprire {chip_name} dopo {timeout}s.")

sys.exit(1)

def get_temp():

try:

return int(open(TEMP_PATH).read()) / 1000

except Exception:

return 0

def shutdown():

log(“Pulsante premuto: spegnimento sistema…”)

os.system(“systemctl poweroff”)

def cleanup(chip):

chip.close()

log(“Servizio terminato correttamente.”)

# === INIZIALIZZAZIONE ===

chip = wait_for_chip()

fan = chip.get_line(FAN_PIN)

led = chip.get_line(LED_PIN)

button = chip.get_line(BUTTON_PIN)

fan.request(consumer=“argononed”, type=gpiod.LINE_REQ_DIR_OUT, default_vals=[0])

led.request(consumer=“argononed”, type=gpiod.LINE_REQ_DIR_OUT, default_vals=[0])

button.request(consumer=“argononed”, type=gpiod.LINE_REQ_DIR_IN)

log(“ArgonOne GPIOD service avviato correttamente.”)

fan_state = 0

led.set_value(1) # LED acceso costante

# === LOOP PRINCIPALE ===

try:

while True:

temp = get_temp()

# Gestione ventola

if temp >= FAN_HIGH and fan_state == 0:

fan.set_value(1)

fan_state = 1

log(f"Ventola ON - {temp:.1f}°C")

elif temp <= FAN_LOW and fan_state == 1:

fan.set_value(0)

fan_state = 0

log(f"Ventola OFF - {temp:.1f}°C")

# Gestione pulsante

if button.get_value() == 0:

press_time = time.time()

while button.get_value() == 0:

time.sleep(0.1)

if time.time() - press_time > 2: # pressione >2s

shutdown()

time.sleep(2)

except KeyboardInterrupt:

cleanup(chip)

except Exception as e:

log(f"Errore inatteso: {e}")

cleanup(chip)

raise

sudo chmod +x /usr/bin/argononed_gpiod.py

  1. sudo nano /etc/systemd/system/argononed.service

[Unit]

Description=Argon One Fan & Power Button Service (libgpiod)

After=multi-user.target sysinit.target

Wants=multi-user.target

[Service]

Type=simple

ExecStartPre=/bin/bash -c ‘for i in {1..30}; do [ -e /dev/gpiochip0 ] && exit 0; echo “Attendo gpiochip0 ($i)…” && sleep 1; done; echo “gpiochip0 non disponibile dopo 30s”; exit 1’

ExecStart=/usr/bin/python3 /usr/bin/argononed_gpiod.py

Restart=always

RestartSec=5

User=root

[Install]

WantedBy=multi-user.target

sudo systemctl daemon-reload

sudo systemctl enable argononed.service

sudo systemctl start argononed.service

And ceck if its works fine:

sudo systemctl status argononed.service –no-pager

I used chatgpt and the main goal was to modify the argon40 files to fit trixie.

Thanks for sharing the scripts!

Don’t worry if you see an error from the log, the system is ok.

/usr/local/sbin/argonone-shutdown-handler.sh replaces original argon-shutdown.sh, which no longer works, with the same logic

Original file :

#!/bin/bash

pythonbin=/usr/bin/python3
argononefanscript=/etc/argon/argononed.py
argoneonrtcscript=/etc/argon/argoneond.py
argonirconfigscript=/etc/argon/argonone-ir

if [ ! -z "$1" ]
then
	if [ -f "$argononefanscript" ]
	then
		$pythonbin $argononefanscript FANOFF
	fi
	if [ "$1" = "poweroff" ] || [ "$1" = "halt" ]
	then
		if [ -f $argonirconfigscript ]
		then
			if [ -f $argoneonrtcscript ]
			then
				$pythonbin $argoneonrtcscript SHUTDOWN
			fi
			$pythonbin $argononefanscript SHUTDOWN
		fi
	fi
fi

New file :

#!/bin/sh
pythonbin=/usr/bin/python3
argononefanscript=/etc/argon/argononed.py
argoneonrtcscript=/etc/argon/argoneond.py
argonirconfigscript=/etc/argon/argonone-ir

case "$1" in
  FANOFF|fanoff)
    [ -f "$argononefanscript" ] && $pythonbin "$argononefanscript" FANOFF
    ;;
  poweroff|halt|SHUTDOWN|shutdown)
    if [ -f "$argonirconfigscript" ]; then
      [ -f "$argoneonrtcscript" ] && $pythonbin "$argoneonrtcscript" SHUTDOWN
      [ -f "$argononefanscript" ] && $pythonbin "$argononefanscript" SHUTDOWN
    fi
    ;;
  *)
    [ -f "$argononefanscript" ] && $pythonbin "$argononefanscript" FANOFF
    ;;
esac

/lib/systemd/system-shutdown/ has no longer being on Trixie.
Solution I implemented
Instead of the old hook directory I implemented two small systemd unit files plus a handler script.

sudo curl https://download.argon40.com/argon1.sh | bash
sudo tee /usr/local/sbin/argonone-shutdown-handler.sh > /dev/null <<'EOF'
#!/bin/sh
pythonbin=/usr/bin/python3
argononefanscript=/etc/argon/argononed.py
argoneonrtcscript=/etc/argon/argoneond.py
argonirconfigscript=/etc/argon/argonone-ir

case "$1" in
  FANOFF|fanoff)
    [ -f "$argononefanscript" ] && $pythonbin "$argononefanscript" FANOFF
    ;;
  poweroff|halt|SHUTDOWN|shutdown)
    if [ -f "$argonirconfigscript" ]; then
      [ -f "$argoneonrtcscript" ] && $pythonbin "$argoneonrtcscript" SHUTDOWN
      [ -f "$argononefanscript" ] && $pythonbin "$argononefanscript" SHUTDOWN
    fi
    ;;
  *)
    [ -f "$argononefanscript" ] && $pythonbin "$argononefanscript" FANOFF
    ;;
esac
EOF
sudo chmod +x /usr/local/sbin/argonone-shutdown-handler.sh

sudo tee /etc/systemd/system/argonone-fanoff.service > /dev/null <<'EOF'
[Unit]
Description=Argon One: fan off on shutdown/reboot/halt
DefaultDependencies=no
Before=poweroff.target reboot.target halt.target

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/argonone-shutdown-handler.sh FANOFF
TimeoutStartSec=0

[Install]
WantedBy=poweroff.target reboot.target halt.target
EOF
sudo tee /etc/systemd/system/argonone-shutdown.service > /dev/null <<'EOF'
[Unit]
Description=Argon One: shutdown tasks for poweroff/halt
DefaultDependencies=no
Before=poweroff.target halt.target
ConditionPathExists=/etc/argon/argonone-ir

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/argonone-shutdown-handler.sh poweroff
TimeoutStartSec=0

[Install]
WantedBy=poweroff.target halt.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable argonone-fanoff.service argonone-shutdown.service

Why this approach

Predictable timing: DefaultDependencies=no + Before=poweroff.target ensures the unit runs at the intended point in the shutdown sequence.
Robust across installs: It does not rely on distro-specific presence of a system-shutdown folder.
Conditional behavior: ConditionPathExists=/etc/argon/argonone-ir reproduces the original conditional logic (only do SHUTDOWN tasks if IR config is present).

1 Like

I had same issue installing the script on my Argon One V3 NVME with new RPi OS trixie, where error message “/lib/systemd/system-shutdown not found” is shown. As workaround I manually downloaded the shutdown-script from argon and moved it to the relevant folder.

wget https://download.argon40.com/scripts/argon-shutdown.sh
sudo chmod 755 argon-shutdown.sh
sudo mv argon-shutdown.sh /lib/systemd/system-shutdown/

curl https://download.argon40.com/argon-eeprom.sh | bash
curl https://download.argon40.com/argon1.sh | bash

I had this problem too, but simply needed to create the `/lib/systemd/system-shutdown` directory myself as root. Then the install/update script works as intended.

PS Devs: You might want to actually check for the existence of that directory on line 495, notify the user and exit if it doesn’t exist, and only download the shutdown script into it once you’re sure it’s there! :wink:

1 Like

I will be trying that as well. Nice to know this.