From 6ef1c2eb5ff1a2cff93a3e86666b2386c08b597b Mon Sep 17 00:00:00 2001 From: morph027 Date: Thu, 15 Jan 2026 20:06:04 +0100 Subject: [PATCH 1/2] ram_temp: add jc42 for DDR4 Signed-off-by: morph027 --- README.md | 4 ++-- src/memory.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 680d3478e8..2e5f45894d 100644 --- a/README.md +++ b/README.md @@ -439,7 +439,7 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu | `procmem`
`procmem_shared`, `procmem_virt`| Displays process' memory usage: resident, shared and/or virtual. `procmem` (resident) also toggles others off if disabled | | `proc_vram` | Display process' VRAM usage | | `ram`
`vram` | Display system RAM/VRAM usage | -| `ram_temp` | Display RAM temperature (only supports DDR5 with `spd5118` driver) | +| `ram_temp` | Display RAM temperature (only supports `jc42` (DDR4) or `spd5118` (DDR5) drivers) | | `read_cfg` | Add to MANGOHUD_CONFIG as first parameter to also load config file. Otherwise only `MANGOHUD_CONFIG` parameters are used | | `reload_cfg=` | Change keybind for reloading the config. Default = `Shift_L+F4` | | `resolution` | Display the current resolution | @@ -686,7 +686,7 @@ Example output: #### Intel notes - GPU temperature for `i915` requires **linux 6.13+** - Fan speed for `i915` requires **linux 6.12+** -- GPU temperature and vram temperature for `xe` requires **linux 6.15+** +- GPU temperature and vram temperature for `xe` requires **linux 6.15+** - Fan speed for `xe` requires **linux 6.16+** - GPU usage and memory usage shows usage of current process, not total system usage (it's an issue on intel's side) - https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14153 diff --git a/src/memory.cpp b/src/memory.cpp index fc117f555d..80ab570c6c 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -43,7 +43,7 @@ void update_mem_temp() { std::string path = "/sys/class/hwmon/"; auto dirs = ls(path.c_str(), "hwmon", LS_DIRS); for (auto &dir : dirs) { - if (read_line(path + dir + "/name") == "spd5118") + if (read_line(path + dir + "/name") == "spd5118" or read_line(path + dir + "/name") == "jc42") mem_temp_files.emplace_back(path + dir + "/temp1_input"); } if (mem_temp_files.empty()) From 8c052c3e47fd22a7964472aa8debe551058fd487 Mon Sep 17 00:00:00 2001 From: morph027 Date: Tue, 17 Feb 2026 14:27:09 +0100 Subject: [PATCH 2/2] squash Signed-off-by: morph027 --- src/memory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/memory.cpp b/src/memory.cpp index 80ab570c6c..2c01c51c04 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -43,7 +43,8 @@ void update_mem_temp() { std::string path = "/sys/class/hwmon/"; auto dirs = ls(path.c_str(), "hwmon", LS_DIRS); for (auto &dir : dirs) { - if (read_line(path + dir + "/name") == "spd5118" or read_line(path + dir + "/name") == "jc42") + const auto name = read_line(path + dir + "/name"); + if (name == "spd5118" || name == "jc42") mem_temp_files.emplace_back(path + dir + "/temp1_input"); } if (mem_temp_files.empty())