

3·
24 hours agoUse triple backticks for blocks of code-type stuff
```
like so
```
example, wrapped in a spoiler tag.
upp -p /sys/class/drm/card1/device/pp_table dump
header:
structuresize: 2470
format_revision: 15
content_revision: 0
table_revision: 2
table_size: 802
golden_pp_id: 2466
golden_revision: 16307
format_id: 128
platform_caps: 24
thermal_controller_type: 28
small_power_limit1: 0
small_power_limit2: 0
boost_power_limit: 0
software_shutdown_temp: 118
reserve:
reserve 0: 0
reserve 1: 0
reserve 2: 0
reserve 3: 0
reserve 4: 0
reserve 5: 0
reserve 6: 1
reserve 7: 0
power_saving_clock:
revision: 1
reserve:
... and so on ...
I’m not familiar with Radeon PowerPlay, so I don’t know if there is a proper way to solve this, but you should be able to make a systemd system service to run the
upp
command on boot.To do so, I think you can use the following:
[Unit] Description=Run my_user_script After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target [Service] Type=oneshot ExecStart=upp -p /sys/class/drm/card1/device/pp_table set --write smc_pptable/SocketPowerLimitAc/0=312 smc_pptable/SocketPowerLimitDc/0=293 smc_pptable/TdcLimit/0=300 smc_pptable/FreqTableSocclk/1=1350 smc_pptable/FreqTableFclk/1=2000 smc_pptable/FclkBoostFreq=2000 [Install] WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
To configure this service:
.service
file in/etc/systemd/service
. (e.g./etc/systemd/system/my_update_pp.service
)sudo systemctl daemon-reload
to tell systemd to re-read the service filessudo systemctl restart my_update_pp.service
to manually run the servicesudo systemctl enable my_update_pp.service
to tell systemd to run your service automatically on boot/wake (WantedBy
tells systemd when it should include the unit/service,After
,Wants
,Requires
, andBefore
help systemd decide the order to run all the units/services)Notes
After
and setWantedBy
to justWantedBy=multi-user.target
, but if you also need to runupp
after sleep or hibernate, then you probably need something more complex. I copied theAfter
andWantedBy
from a stackexchange answer, but I haven’t tried using those targets before. You might have to addmulti-user.target
to theWantedBy
list.upp
after sleep/hibernate. Running on boot might be sufficient.chmod
if you runupp
as sudo/root. Systemd system services run as root by default.References: