Ryzen-5800x3d-linux-undervolting
Ryzen-5800x3d-linux-undervolting copied to clipboard
Question regarding automating the undervolting. [SOLVED]
EDIT: I resolved it myself by delaying the execution of the command after resume for 2 seconds, don't know why, but it now applies correctly.
Hi,
I'm trying to automate applying the undervolt on system boot and system resume from sleep but am getting some confusing results. I've made a service that gets triggered at boot and resume:
`[Unit] Description=Run script at boot and on resume from hibernate After=sleep.target multi-user.target
[Service] ExecStart=/usr/bin/bash /home/kenneth/uv.sh
[Install] WantedBy=sleep.target multi-user.target`
This calls the uv.sh script that contains:
python3 /mnt/5TB/Projects/R7_5800X3D/Ryzen-5800x3d-linux-undervolting/ruv.py -r python3 /mnt/5TB/Projects/R7_5800X3D/Ryzen-5800x3d-linux-undervolting/ruv.py -c 8 -o -30
It basically resets the undervolt, for good measure, and re-applies it. The issue I'm having now is the service gets triggered correctly and reports it's working correctly as shown here:
` sudo systemctl status undervolt.service ✔ ○ undervolt.service - Run script at boot and on resume from hibernate Loaded: loaded (/etc/systemd/system/undervolt.service; enabled; preset: disabled) Active: inactive (dead) since Sun 2023-10-29 18:42:03 CET; 1h 22min ago Duration: 42ms Process: 16328 ExecStart=/usr/bin/bash /home/kenneth/uv.sh (code=exited, status=0/SUCCESS) Main PID: 16328 (code=exited, status=0/SUCCESS) CPU: 42ms
Oct 29 18:42:03 Kenneth-Desktop bash[16331]: Offsets set to 0 on all cores! Oct 29 18:42:03 Kenneth-Desktop bash[16336]: Core 0 set to: -30 readback: -30 Oct 29 18:42:03 Kenneth-Desktop bash[16336]: Core 1 set to: -30 readback: -30 Oct 29 18:42:03 Kenneth-Desktop bash[16336]: Core 2 set to: -30 readback: -30 Oct 29 18:42:03 Kenneth-Desktop bash[16336]: Core 3 set to: -30 readback: -30 Oct 29 18:42:03 Kenneth-Desktop bash[16336]: Core 4 set to: -30 readback: -30 Oct 29 18:42:03 Kenneth-Desktop bash[16336]: Core 5 set to: -30 readback: -30 Oct 29 18:42:03 Kenneth-Desktop bash[16336]: Core 6 set to: -30 readback: -30 Oct 29 18:42:03 Kenneth-Desktop bash[16336]: Core 7 set to: -30 readback: -30 Oct 29 18:42:03 Kenneth-Desktop systemd[1]: undervolt.service: Deactivated successfully. ` However when I manually check the undervolt from a terminal by entering:
sudo python3 /mnt/5TB/Projects/R7_5800X3D/Ryzen-5800x3d-linux-undervolting/ruv.py -l -c 8
It returns the following:
sudo python3 /mnt/5TB/Projects/R7_5800X3D/Ryzen-5800x3d-linux-undervolting/ruv.py -l -c 8 ✔ Core 0: 0 Core 1: 0 Core 2: 0 Core 3: 0 Core 4: 0 Core 5: 0 Core 6: 0 Core 7: 0
Indicating the undervolt didn't apply. When I check with Zenmonitor3 I can confirm it didn't apply. To make things stranger it does work on boot, but doesn't work after waking up. The service gets called after waking up but the undervolt doesn't seem to "stick"'.
Would you be able to shed some light on this? Many thanks in advance!
Kind regards.