What utilities/packages/tools are used in your system to do suspend/resume?
The service by itself it really simple to translate, but i don't have any idea how systemd deal with the suspend process. I never used this kind of feature. Thus, the answer to @ chroot's question may help to find the way forward for the research.
Put this one at /etc/66/service/zero_clock_mod
[main]
@ type = oneshot
@ description = "Flushes the cpu clock modulation MSR to relase cpu lock caused by BIOS bug"
@ version = 0.0.1
@ user = ( root )

[start]
@ execute = ( wrmsr -a 0x19a 0x0 )
I use consolekit, any way you know how to deal with it thru consolekit?
I guess it's no big deal to reload a oneshot service with that wrsmr command every time I come out from suspend. It's the price one has to pay for full control of what starts and what doesn't, I think.

I can just run:

# 66-start -r wrmsr cpupower

One of those services is to unlock the cpu freq. and the other is to change governor
I reqest help to change the following service file written by someone on the artix team:
[main]
@ type = oneshot
@ version = 0.0.1
@ description = "cpupower service"
@ user = ( root )

[start]
@ execute =
(
    envfile /etc/default/cpupower
    importas -D "" governor governor
    importas -D "" min_freq min_freq
    importas -D "" max_freq max_freq
    importas -D "" freq freq
    importas -D "" mc_scheduler mc_scheduler
    importas -D "" smp_scheduler smp_scheduler
    importas -D "" perf_bias perf_bias

    # frequency options
    if -t { test ${governor} } cpupower frequency-set ${governor}
    if -t { test ${min_freq} } cpupower frequency-set ${min_freq}
    if -t { test ${max_freq} } cpupower frequency-set ${max_freq}
    if -t { test ${freq} } cpupower frequency-set ${freq}

    # cpu options
    if -t { test ${mc_scheduler} } cpupower set ${mc_scheduler}
    if -t { test ${smp_scheduler} } cpupower set ${smp_scheduler}
    if -t { test ${perf_bias} } cpupower set ${perf_bias}
)
It errors on my system with the output: invalid or unknown argument.
I assume this is because Artix defaults to bash and Obarun defaults to zsh.

I need to change frewuency&governor at the same time with one service file because these are changed after suspend also.
4 days later
This will depends of each files set at /etc/default/cpupower. I means what the content of the file e.g. /etc/default/cpupower/governor?
If you know that you can do:
[main]
@ type = oneshot
@ version = 0.0.1
@ description = "cpupower service"
@ user = ( root )

[start]
@ execute = (
   
        execl-cmdline -s { cpupower frequency-set ${governor} ${min_freq} ${max_freq} ${freq} ${mc_scheduler} ${smp_scheduler} ${perf_bias} }
)

[environment]
governor=<replace by the value found at /etc/default/governor file>
min_freq=<replace by the value found at /etc/default/min_freq file>
max_freq=<replace by the value found at /etc/default/max_freq file>
freq=<replace by the value found at /etc/default/freq file>
mc_scheduler=<replace by the value found at /etc/default/mc_scheduler file>
smp_scheduler=<replace by the value found at /etc/default/smp_scheduler file>
perf_bias=<replace by the value found at /etc/default/perf_bias file>
Thanks much Eric, I will customise your example for my use case.

Powered by Obarun