I actually ended up fixing it but I'll try to explain everything a little bit more clearly.
1. (Command file is located at /home/apple/)
I followed this guide exactly:(
https://www.reddit.com/r/EtherMining/co ... smi_power/) and pointed the local.rc file to my script as below
local.rc file
Code: Select all
#!/bin/bash
/home/apple/gpupowerlimit.sh 15 &
/home/apple/gpupowerlimit.sh > /home/apple/gpupowerlimitsh.log
exit 0
This did NOT trigger the powerlimit OR generate a log file (to show that the rc.local script worked)
Code: Select all
sudo systemctl status rc-local.service
Can't read /home/apple/gpupowerlimit.sh: No such file or directory
2. I learned elsewhere that running a file through rc.local does so as ROOT
See: (
https://stackoverflow.com/questions/239 ... spberry-pi) so I ended up bypassing anything involving "Home" to avoid any ambiguity and placed the "gpupowerlimit.sh" script in /etc/
Here's the updated local.rc file:
Code: Select all
#!/bin/bash
/etc/gpupowerlimit.sh 15 &
gpupowerlimit.sh > /etc/gpupowerlimitsh.log
exit 0
Did NOT trigger the powerlimit command but successfully made the log file (I don't actually understand how that works)
Code: Select all
sudo systemctl status rc-local.service
Can't read /etc/gpupowerlimit.sh: No such file or directory
3. I added the bash command shell to startup + added permission to execute as recommended by (
viewtopic.php?p=2630631#p2630631)
No error codes/no trigger
4. I ended up trying 2 again and it miraculously worked. I don't know...
Code: Select all
sudo systemctl status rc-local.service
rc-local.service - /etc/rc.local Compatibility
Loaded: loaded (/usr/lib/systemd/system/rc-local.service; enabled-runtime; preset: enabled)
Drop-In: /usr/lib/systemd/system/rc-local.service.d
└─debian.conf
Active: active (exited) since Wed 2026-02-11 23:11:52 EST; 1min 17s ago
Docs: man:systemd-rc-local-generator(8)
Process: 2008 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
CPU: 39ms
Feb 11 23:11:52 apple-MS-7E70 rc.local[2020]: All done.
Feb 11 23:11:52 apple-MS-7E70 sudo[2011]: pam_unix(sudo:session): session closed for user root
Feb 11 23:11:52 apple-MS-7E70 sudo[2032]: root : PWD=/ ; USER=root ; COMMAND=/usr/bin/nvidia-smi -i 1,2 -pl 250
Feb 11 23:11:52 apple-MS-7E70 sudo[2032]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Feb 11 23:11:52 apple-MS-7E70 rc.local[2033]: Power limit for GPU 00000000:0C:00.0 was set to 250.00 W from 420.00 W.
Feb 11 23:11:52 apple-MS-7E70 rc.local[2033]: Warning: persistence mode is disabled on device 00000000:0C:00.0. See the Known Issues section of the nvidia-smi(1) man page for more information. Run with [--help | -h] switch to get more information on how to enable persistence mode.
Feb 11 23:11:52 apple-MS-7E70 rc.local[2033]: Power limit for GPU 00000000:11:00.0 was set to 250.00 W from 350.00 W.
Feb 11 23:11:52 apple-MS-7E70 rc.local[2033]: Warning: persistence mode is disabled on device 00000000:11:00.0. See the Known Issues section of the nvidia-smi(1) man page for more information. Run with [--help | -h] switch to get more information on how to enable persistence mode.
Feb 11 23:11:52 apple-MS-7E70 rc.local[2033]: All done.
Feb 11 23:11:52 apple-MS-7E70 sudo[2032]: pam_unix(sudo:session): session closed for user root
All I can say is that computers are magic sometimes, sorry for all the trouble and thank you for taking the time to wade through my attempts at documenting all this.