OS: Nobara Linux 41 (up to date)
I have scoured the forums for possible solutions to this issue, however I still cannot seem to make it work.
I have a user created service that I am attempting to run on startup, however it is not executing on boot. The service runs fine when ran manually.
This is the service:
[Unit]
Description=CPU Performance Mode
[Service]
Type=oneshot
ExecStart=bash -c 'cpupower -c all frequency-set -g performance'
Restart=on-failure
[Install]
WantedBy=default.target
The goal of this service is to set my CPU cores to performance mode with cpupower.
When running
systemctl status cpuperformance.service (the name of the service), I get:
Loaded: loaded (/etc/systemd/system/cpuperformance.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf, 50-keep-warm.conf
Active: inactive (dead) since Sun 2025-03-09 22:38:28 CDT; 12min ago
Invocation: 7c187bdfd07c49c48fd6e94ccc34a0e3
Main PID: 1442 (code=exited, status=0/SUCCESS)
Mem peak: 1.3M
CPU: 6ms
Mar 09 22:38:28 HynixPC bash[1442]: Setting cpu: 16
Mar 09 22:38:28 HynixPC bash[1442]: Setting cpu: 17
Mar 09 22:38:28 HynixPC bash[1442]: Setting cpu: 18
Mar 09 22:38:28 HynixPC bash[1442]: Setting cpu: 19
Mar 09 22:38:28 HynixPC bash[1442]: Setting cpu: 20
Mar 09 22:38:28 HynixPC bash[1442]: Setting cpu: 21
Mar 09 22:38:28 HynixPC bash[1442]: Setting cpu: 22
Mar 09 22:38:28 HynixPC bash[1442]: Setting cpu: 23
Mar 09 22:38:28 HynixPC systemd[1]: cpuperformance.service: Deactivated successfully.
Mar 09 22:38:28 HynixPC systemd[1]: Finished cpuperformance.service - CPU Performance Mode.
This looks like it ran the service successfully on boot-up, however if I
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor, I get:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
This shows that the CPU cores are using the powersave governor and not the performance governor like they should be after boot-up with this service.
I have tested different "WantedBy" targets, including basic.target and multi-user.target. Both of these have the same issue. Everytime I make a change to the service, I run sudo systemctl disable cpuperformance.service -> sudo systemctl daemon-reload -> sudo systemctl enable cpuperformance.service.
The output of enabling the service is Created symlink '/etc/systemd/system/default.target.wants/cpuperformance.service' → '/etc/systemd/system/cpuperformance.service'. After this, the service still fails to start on boot.
I found one clue that may show why this is not working. Running systemctl --user list-dependencies default.target, I get the following output:
default.target
○ ├─drkonqi-coredump-cleanup.service
● ├─drkonqi-sentry-postman.path
● ├─unity-gtk-module.service
● └─basic.target
● ├─systemd-tmpfiles-setup.service
● ├─paths.target
● ├─sockets.target
● │ ├─dbus.socket
● │ ├─drkonqi-coredump-launcher.socket
● │ ├─pipewire-pulse.socket
● │ └─pipewire.socket
● └─timers.target
○ ├─drkonqi-coredump-cleanup.timer
○ ├─drkonqi-sentry-postman.timer
● ├─grub-boot-success.timer
● └─systemd-tmpfiles-clean.timer
This shows that my custom cpuperformance.service is not wanted by default.target, which I don't understand since my service specifically has that listed.
Anyone have any ideas on this? I have been racking my brain on this for hours. Any help is appreciated!