svenlange2 / ryzen-5800x3d-linux-undervolting Goto Github PK
View Code? Open in Web Editor NEWA Python script to use Ryzen SMU for Linux PBO tunind of 5800x3d CPU. Mostly needed for Ryzen 5800x3d undervolting.
A Python script to use Ryzen SMU for Linux PBO tunind of 5800x3d CPU. Mostly needed for Ryzen 5800x3d undervolting.
Hey, thanks for doing this!
Unfortunately, the script seems to have no effect for me.
On Windows the PBO Tuner seems to reduce temps by ~5-10degrees on idle and never spikes higher then ~76degrees.
Running your script does not result in any changes in temps.
Any idea what it could be?
The readback shows -30.
Thanks in advance!
Ryzen-5800x3d-linux-undervolting$ sudo python3 ruv.py -c 8 -o -30
Core 0 set to: -30 readback: 0
Core 1 set to: -30 readback: 0
Core 2 set to: -30 readback: 0
Core 3 set to: -30 readback: 0
Core 4 set to: -30 readback: 0
Core 5 set to: -30 readback: 0
Core 6 set to: -30 readback: 0
Core 7 set to: -30 readback: 0
?
I would also like to modify the power limit, can you add that feature too?
As the title says, I can't find the source of the opcodes you used.
E.g. why is get_core_offset
using 0x48
? Where does the 0x48
come from?
There are some known commands (https://github.com/leogx9r/ryzen_smu/blob/master/docs/rsmu_commands.md), but the ones used to change the core offset are not in there.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.