INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Undervolting my Ryzen CPU  (Read 186 times)

cochinada

  • Galactic Citizen
  • ****
  • Posts: 303
Undervolting my Ryzen CPU
« on: Yesterday at 10:52:41 am »

Hello,

I'm just sharing my experience in case someone is interested to fine tune their CPU as I got fantastic results with mine although some were quite surprising and even counterintuitive!

This table below summarises the values I got with 4 different methods:
undervolt" border="0

Sensor explanation:
Tctl - CPU die temperature (Tctl = Tdie + offset)
amdgpu edge - iGPU temp (on-chip graphics)
PPT - Package Power drawn by CPU
Sensor 1 - no clue!

As for the stress tests I've used one artificial for the CPU and just played a demanding 4K movie as below:
CPU: stress-ng --cpu 8 --timeout 60s
iGPU: mpv --hwdec=auto --vo=gpu --loop=inf <mkv file>

Before this tuning it was very uncomfortable to touch my fan-less PC chassis when playing a movie but now it is barely warm which was my main goal.
Although I didn't bench score the "stock" CPU, I can say that there are no artifacts or dropped frames when playing the movies, which was my other fundamental goal.
So in the end, total success!

My gear:
ASRock B850M-X AM5 mATX
AMD Ryzen 5 8600G
Crucial Pro Overclocking Edition DDR5 16GB
2 x NMVe PCIe
3 x SSD Sata
Streacom ZeroFlex 240 Power Supply

HTPC-interior" border="0
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2696
Re: Undervolting my Ryzen CPU
« Reply #1 on: Yesterday at 11:36:22 am »

I can't remember if the G variants support cTDP but I have a 7745HS that I set to the lowest cTDP (25W) in the bios and it works perfectly for Jinc and cut down the temps by about 15C. Otherwise I'd only mess with undervolting if the machine was battery or thermally constrained (laptop) and let the scheduler handle other scenarios.
Logged

cochinada

  • Galactic Citizen
  • ****
  • Posts: 303
Re: Undervolting my Ryzen CPU
« Reply #2 on: Yesterday at 05:38:04 pm »

I can't remember if the G variants support cTDP but I have a 7745HS that I set to the lowest cTDP (25W) in the bios and it works perfectly for Jinc and cut down the temps by about 15C. Otherwise I'd only mess with undervolting if the machine was battery or thermally constrained (laptop) and let the scheduler handle other scenarios.

My mobo has what I think is the equivalent to what you're saying, something about an ECO mode but I had already tried that before with terrible results: the video drags.

I have unfortunately found a much more serious issue, not with the CPU but with my 2nd NVMe which for some unknown reason is running incredibly hot and above the ideal range!!! It runs at 88ºC.  :-\

joaquim@HTPC:~$ sudo nvme smart-log /dev/nvme1
Smart Log for NVME device:nvme1 namespace-id:ffffffff
critical_warning                        : 0
temperature                             : 75 °C (348 K)
available_spare                         : 100%
available_spare_threshold               : 10%
percentage_used                         : 0%
endurance group critical warning summary: 0
Data Units Read                         : 773016 (395.78 GB)
Data Units Written                      : 5701057 (2.92 TB)
host_read_commands                      : 3208759
host_write_commands                     : 22722359
controller_busy_time                    : 11
power_cycles                            : 9
power_on_hours                          : 22
unsafe_shutdowns                        : 0
media_errors                            : 0
num_err_log_entries                     : 1
Warning Temperature Time                : 0
Critical Composite Temperature Time     : 0
Temperature Sensor 1           : 88 °C (361 K)
Temperature Sensor 2           : 75 °C (348 K)
Temperature Sensor 3           : 73 °C (346 K)
Thermal Management T1 Trans Count       : 0
Thermal Management T2 Trans Count       : 0
Thermal Management T1 Total Time        : 0
Thermal Management T2 Total Time        : 0


This is the M.2 with the shield (WD-BLACK) that is partly below my PCI 10Gbit Ethernet adapter in the picture.
I know this board can get a bit hot but I have no other option to mount this NVMe and/or board.
I also find it hard to believe this to be the (main) reason for why the disc runs so hot.
To make it even weirder, this disc holds only my audio files so it should be pretty idle when JRiver is playing video because this happens via my 10Gbit Ethernet connection to the NAS where those files are located.

I've raised a ticket to Western Digital as I don't know what else I can do. Perhaps someone here has any thoughts?

I would hate to let go of this NVMe as it didn't come cheap! ::)

Question:
Is there any way to reduce JRiver's file monitoring frequency, if possible? This would give the drive more idle time to transition into power-saving states.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2917
Re: Undervolting my Ryzen CPU
« Reply #3 on: Today at 02:31:04 am »

Nice results :)

JRiver doesn't actively monitor the folders, it just asks the OS to let it know whenever a file changes in the folders it wants to track. This doesn't prevent the disk from sleeping.

Those temps seem excessive. The WD Black 850X is known to get hot, but it should idle below 50C. Maybe those temperature readings are wrong, does it feel very hot to the touch? It's possible that the reported temps need to be divided by 2. Still, the airflow is bad so it would get a bit hot anyway... there are better heatshields, but it won't fit there.

This review for the SN770 suggests that there's a "gaming mode" that should be disabled to allow the drive to sleep:

If WD’s Dashboard software is reading the sensors in the drive correctly, however, the SN770 does get pretty toasty under a sustained load, at least when Game mode is enabled. We saw a peak temperature of 81°C after two complete writes across the entire capacity of the drive in that configuration. With Game mode disabled though, which is how the drive is configured by default, temperatures are a bit lower. Performing the same test with Game mode disabled resulted in a maximum temperature of 75°C. With temps like this, if you’re going to stick the SN770 in a motherboard that doesn’t have M.2 heatsinks, make sure there’s good air-flow over the drive. Enabling Gaming Mode on the SN770 essentially disables any power-saving / sleep features, so the drive is always at the ready. Toggling the feature on and off had only minimal impact on the benchmarks we ran (as you’ll see a little later), but may theoretically minimize stutter or occasional hiccups in games that don't access the storage subsystem very often.

Logged

cochinada

  • Galactic Citizen
  • ****
  • Posts: 303
Re: Undervolting my Ryzen CPU
« Reply #4 on: Today at 05:42:13 am »

Thanks man!

Yes, unfortunately the reading is very true as it almost burns to touch it when it reads above 80ºC.

I've done a couple of things trying to improve the situation:
1) I've removed my Ethernet adapter so I'll stick to using only the motherboard's own internal LAN port. Although it's only 2.5Gbps and I'll loose something in terms of shear copying massive amounts of data when I'm doing backups, etc, it will be more than enough for daily operation and usage.
2) I've also changed the M.2_2 Link speed on the BIOS from Auto to "Gen 2", thus decreasing the speed and hopefully lowering the temperatures.

Very interesting that thing about gaming mode but it seems that it can't be changed in Linux...

joaquim@HTPC:~$ sudo nvme get-feature /dev/nvme1 -f 0xca
NVMe status: Invalid Field in Command: A reserved coded value or an unsupported value in a defined field(0x4002)
joaquim@HTPC:~$


This ouptut, according to chatgpt means that...

"Got it — the error 0x4002 (Invalid Field in Command) means this WD SN850X does not expose Gaming Mode via the standard NVMe Feature ID 0xCA, at least not in a way that's accessible from Linux using nvme-cli.
This strongly suggests:
Gaming Mode is likely enabled by default, and
it can only be toggled via the WD Dashboard software in Windows, which modifies firmware settings through vendor-specific commands."


I'm about to play another movie now with these two actions I did and see the results of the readings again. If it does not improve substantially I might have to do as chatgpt suggests and follow this recipe:

"Option 1: Temporarily plug the SSD into a Windows machine
Install WD Dashboard:
https://support.wdc.com/downloads.aspx
Locate and disable Gaming Mode in the software (reboot if required).
Then move the drive back to your HTPC.
If the setting is stored in firmware (which it usually is), it will persist across reboots and OSes."


Starting temperature:
Temperature Sensor 1           : 48 °C (321 K)

What it that command to show information about the video when it's playing like dropped frames, etc? I forgot...
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2917
Re: Undervolting my Ryzen CPU
« Reply #5 on: Today at 06:44:30 am »

CTRL+J
Logged

cochinada

  • Galactic Citizen
  • ****
  • Posts: 303
Re: Undervolting my Ryzen CPU
« Reply #6 on: Today at 07:25:37 am »

Thanks!

So, I guess this is not good right? 5 dropped frames...

Screenshot-from-2025-04-06-13-21-22" border="0

Film ended and temperature after a bit more than 1h:30min is about 64ºC which is also not good for a drive that was supposed to be idle:

joaquim@HTPC:~$ sudo nvme smart-log /dev/nvme1
Smart Log for NVME device:nvme1 namespace-id:ffffffff
critical_warning                        : 0
temperature                             : 55 °C (328 K)
available_spare                         : 100%
available_spare_threshold               : 10%
percentage_used                         : 0%
endurance group critical warning summary: 0
Data Units Read                         : 774415 (396.50 GB)
Data Units Written                      : 5701057 (2.92 TB)
host_read_commands                      : 3269980
host_write_commands                     : 22722400
controller_busy_time                    : 11
power_cycles                            : 11
power_on_hours                          : 26
unsafe_shutdowns                        : 0
media_errors                            : 0
num_err_log_entries                     : 1
Warning Temperature Time                : 0
Critical Composite Temperature Time     : 0
Temperature Sensor 1           : 64 °C (337 K)
Temperature Sensor 2           : 55 °C (328 K)
Temperature Sensor 3           : 54 °C (327 K)
Thermal Management T1 Trans Count       : 0
Thermal Management T2 Trans Count       : 0
Thermal Management T1 Total Time        : 0
Thermal Management T2 Total Time        : 0


I'm going to try to disable this Gamming mode in Windows and see how it goes back in Ubuntu.
If I don't see improvements I'll have to consider a better dissipator that fits my small case or...
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2917
Re: Undervolting my Ryzen CPU
« Reply #7 on: Today at 09:02:51 am »

Some dropped frames immediately after playback starts is normal. Press CTRL+R to reset stats and then see if they still keep increasing.

I see a few problems on that screenshot however:
- You're playing HDR to an SDR output/screen. This implies tone-mapping, which is computational intensive. Try adjusting the HDR algorithm settings. If you have an HDR-capable TV/Screen, make sure HDR is enabled in Windows.
- Render time is at 21ms average, which means it can only draw about 47 frames per second. However your display is at 60 Hz (and measured 83Hz, which I'm not sure what's that about). If your movie source is not at 60Hz then there will be dropped/duplicated frames as the output needs to match your screen, or a multiple of it. To fix this (and assuming you're outputting to a TV, not a laptop display), you should enable the "automatic refresh rate change" options in MC.
- JRVR seems to be downscaling or upscaling the video, even thought both the input and output seem to be 4K resolution. That's computational intensive too. You can change the scaling algorithm in MC options, but I'm not sure why MC is rescaling - maybe because of the HDR to SDR thing.

Below are my stats on a Ryzen 5 5600G with TDP-down to 45W, HDR-passthrough to a 4K TV.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2917
Re: Undervolting my Ryzen CPU
« Reply #8 on: Today at 09:28:25 am »

Is hardware Acceleration option enabled?
Also, try the Performance or Balanced Preset on JRVR settings. With Quality Preset I also get upscaling/downscaling and processing average of 26ms (which is still OK for 23.976 fps movies, but not for 60Hz). With Balanced I get 8ms.
Logged

cochinada

  • Galactic Citizen
  • ****
  • Posts: 303
Re: Undervolting my Ryzen CPU
« Reply #9 on: Today at 10:10:22 am »

I have a Sony Bravia A80K, HDR capable (HDR10).
But for some stupid reason, JR doesn't think my display is HDR capable.
I'm using Ubuntu and not Windows.

"Unfortunately, Linux GPU drivers (especially AMD) don’t support HDR properly in most desktop environments. Even with VA-API and recent kernels, HDR metadata passthrough isn't standardized.

On Linux:
You may get only SDR output with tone-mapping.

JRiver will not detect the display as HDR capable.

Only workaround: Use Windows if you want real HDR output with JRiver."

Please check these settings:

Screenshot-from-2025-04-06-16-08-00" border="0
Screenshot-from-2025-04-06-16-07-40" border="0
Screenshot-from-2025-04-06-16-07-14" border="0

What are my best settings?
chatgpt said this:

"Option 1: Stay on Linux — Use Tone Mapping
If you want to stick with Ubuntu, you can still:

Use JRVR’s tone mapping, which is decent.
In JRiver: Tools → Options → Video → JRVR Settings → HDR
Set to “Tone map HDR to SDR”
Choose tone mapping algorithm (e.g., ACES, BT.2390, etc.)
Set display mode to 3840x2160 60Hz to avoid scaling artifacts."
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2917
Re: Undervolting my Ryzen CPU
« Reply #10 on: Today at 10:35:47 am »

Right, Linux. I don't think we can compare processing times in that case, as the drivers are completely different.
Missing HDR support sucks and would take Linux completely off the map for my HTPC.

Anyway, check the Automatic mode change in Video>Display settings, should be enabled for smoother playback.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 8210
  • The color of Spring!
Re: Undervolting my Ryzen CPU
« Reply #11 on: Today at 11:33:05 am »

KDE Plasma 6 and GNOME 48 support HDR now, but how well it does is another question entirely. That and if it works for video, if it's Wayland-only (which would mean it may not work for X11/XWayland apps), etc.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit (AMD 7900X CPU/AMD 7800 XT GPU/64GB RAM/2TB M.2 NVMe SSD)
macOS Sequoia 15.4 (M4 Mac Mini 16GB RAM/256GB SSD)
Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Mac + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones
Pages: [1]   Go Up