# Dietpi-autostart does not run commands

**URL:** <https://dietpi.com/forum/t/dietpi-autostart-does-not-run-commands/24981>\
**Category:** Troubleshooting\
**Created:** [16 February 2026 18:34 UTC](https://dietpi.com/forum/t/dietpi-autostart-does-not-run-commands/24981 "2026-02-16T18:34:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cellblock1138](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/c/d07c76/32.png) [@cellblock1138](https://dietpi.com/forum/u/cellblock1138)\
**Post date:** [16 February 2026 18:34 UTC](https://dietpi.com/forum/t/dietpi-autostart-does-not-run-commands/24981/1 "2026-02-16T18:34:38Z")

</div>

### Creating a bug report/issue

I have searched the existing open and closed issues

#### Required Information

- DietPi version | G\_DIETPI\_VERSION\_CORE=9  
G\_DIETPI\_VERSION\_SUB=17  
G\_DIETPI\_VERSION\_RC=2  
G\_GITBRANCH=‘master’  
G\_GITOWNER=‘MichaIng’  
G\_LIVE\_PATCH\_STATUS[0]=‘not applicable’
- Distro version | bookwom
- Kernel version | Linux DietPi 6.12.43+deb12-amd64 #1 SMP PREEMPT\_DYNAMIC Debian 6.12.43-1~bpo12+1 (2025-09-06) x86\_64 GNU/Linux
- Architecture | `amd64`
- SBC model | `ASRock N100M`
- Power supply used | PicoPSU 180 watt
- SD card used | none

#### Additional Information (if applicable)

#### Steps to reproduce

Have 4 commands to run in dietpi-autostart/custom.sh

1. commands clearly do not run because if I run them in SSH, I can see they work
2. Even running sh custom.sh works, but not with dietpi-autostart after boot.

#### Expected behaviour

four commands will run:  
python3 AutoASPM/pkgs/autoaspm.py  
powertop --auto-tune  
setpci -s 01:00.0 0x80.B=0x42  
setpci -s 02:00.0 0x80.B=0x42

- …

#### Actual behaviour

no evidence these c…

#### Extra details

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [16 February 2026 18:47 UTC](https://dietpi.com/forum/t/dietpi-autostart-does-not-run-commands/24981/2 "2026-02-16T18:47:27Z")

</div>

you would need to use the full path for the command, not just the command itself.

---

<div class="post-metadata">

**Author:** ![cellblock1138](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/c/d07c76/32.png) [@cellblock1138](https://dietpi.com/forum/u/cellblock1138)\
**Post date:** [16 February 2026 19:06 UTC](https://dietpi.com/forum/t/dietpi-autostart-does-not-run-commands/24981/3 "2026-02-16T19:06:22Z")

</div>

Here is my custum.sh which runs just fine with

> sh /var/lib/dietpi/dietpi-autostart/custom.sh

```auto
           #!/bin/bash
# DietPi-AutoStart custom script
# Location: /var/lib/dietpi/dietpi-autostart/custom.sh

python3 AutoASPM/pkgs/autoaspm.py

powertop --auto-tune

setpci -s 01:00.0 0x80.B=0x42

setpci -s 02:00.0 0x80.B=0x42

exit 0

```

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [16 February 2026 19:18 UTC](https://dietpi.com/forum/t/dietpi-autostart-does-not-run-commands/24981/4 "2026-02-16T19:18:35Z")

</div>

my answer ist still the same

> [@Joulinar](#):
>
> you would need to use the full path for the command, not just the command itself

---

<div class="post-metadata">

**Author:** ![cellblock1138](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/c/d07c76/32.png) [@cellblock1138](https://dietpi.com/forum/u/cellblock1138)\
**Post date:** [17 February 2026 17:23 UTC](https://dietpi.com/forum/t/dietpi-autostart-does-not-run-commands/24981/5 "2026-02-17T17:23:45Z")

</div>

Resolved, thanks.

```auto
#!/bin/bash
# DietPi-AutoStart custom script
# Location: /var/lib/dietpi/dietpi-autostart/custom.sh

/usr/bin/python3 /root/AutoASPM/pkgs/autoaspm.py

/usr/local/sbin/powertop --auto-tune

/usr/bin/setpci -s 01:00.0 0x80.B=0x42

/usr/bin/setpci -s 02:00.0 0x80.B=0x42

exit 0

```

---

<div class="post-metadata">

**Author:** ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)\
**Post date:** [18 May 2026 17:23 UTC](https://dietpi.com/forum/t/dietpi-autostart-does-not-run-commands/24981/6 "2026-05-18T17:23:49Z")

</div>

Closed on 18 May 2026 17:23 UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
